:root {
  color-scheme: light;
  --bg: #160f24;
  --panel: rgba(28, 22, 45, 0.94);
  --panel-soft: rgba(31, 25, 54, 0.92);
  --border: rgba(164, 139, 224, 0.26);
  --text: #f8f5ff;
  --muted: #b9afd2;
  --coral: #ff745f;
  --violet: #7b36d9;
  --blue: #18aef5;
  --green: #25dc41;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #241235 0%, #101323 48%, #181d2b 100%);
  color: var(--text);
  font-family: Inter, Segoe UI, Arial, sans-serif;
}

button,
input {
  font: inherit;
}

.admin-shell {
  width: min(1180px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 34px 0 64px;
}

.admin-hero {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 26px;
}

.admin-hero img {
  width: 88px;
  height: 88px;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  object-fit: cover;
}

.admin-hero h1,
.admin-panel h2,
.upload-card h2 {
  margin: 4px 0 0;
  letter-spacing: 0;
}

.admin-hero h1 {
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1;
}

.admin-hero p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.eyebrow {
  margin: 0;
  color: #a48be0;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-panel,
.upload-card,
.client-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.admin-panel {
  padding: 24px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.admin-form,
.upload-card {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

input {
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(10, 7, 18, 0.7);
  color: var(--text);
  padding: 0 14px;
}

input[type="file"] {
  padding: 11px 14px;
}

button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #7b36d9, #075e85);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.ghost-button {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--border);
  background: rgba(31, 25, 54, 0.92);
}

.client-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.client-card {
  min-height: 118px;
  padding: 18px;
  text-align: left;
  transition:
    border-color 0.16s ease,
    transform 0.16s ease,
    background 0.16s ease;
}

.client-card:hover,
.client-card.is-selected {
  border-color: var(--blue);
  background: rgba(31, 25, 54, 0.98);
  transform: translateY(-1px);
}

.client-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.18rem;
}

.client-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.upload-card {
  margin-top: 18px;
  padding: 22px;
}

.status-message {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.status-message.ok {
  color: var(--green);
}

.status-message.updating {
  color: var(--blue);
}

.status-message.error {
  color: var(--coral);
}

.status-message a {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.status-message a:hover {
  text-decoration: underline;
}

.hidden {
  display: none;
}

.app-footer {
  position: fixed;
  left: 50%;
  bottom: 9px;
  transform: translateX(-50%);
  color: rgba(248, 245, 255, 0.36);
  font-size: 7px;
  background: transparent;
}

@media (max-width: 760px) {
  .admin-shell {
    width: min(100% - 24px, 1180px);
    padding-top: 20px;
  }

  .admin-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .client-grid {
    grid-template-columns: 1fr;
  }
}
