:root {
  --brand: #00A7B5;
  --brand-dark: #007C91;
  --ink: #101827;
  --muted: #66717d;
  --line: #dcebed;
  --soft: #f3fbfc;
  --danger: #9f2436;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--soft); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { min-height: 100%; margin: 0; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 24px; padding: 24px; background: #fff; border-right: 1px solid var(--line); }
.brand img { display: block; width: 190px; max-width: 100%; }
.nav { display: grid; gap: 8px; }
.nav a { min-height: 44px; display: flex; align-items: center; padding: 0 14px; border-radius: 10px; color: #31414c; text-decoration: none; font-weight: 850; }
.nav a.is-active { background: var(--soft); color: var(--brand-dark); }
.ghost { margin-top: auto; min-height: 42px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--brand-dark); font-weight: 900; cursor: pointer; }
.main { min-width: 0; padding: 32px; }
.hidden { display: none !important; }

.login-card { width: min(460px, 100%); margin: 7vh auto 0; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 30px; box-shadow: 0 24px 70px rgba(0,124,145,.10); }
.login-card img { width: 190px; display: block; margin-bottom: 28px; }
.login-card h1 { margin: 0 0 8px; font-size: 34px; line-height: 1; letter-spacing: 0; }
.login-card p { color: var(--muted); line-height: 1.45; }
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 7px; color: #102a33; font-weight: 850; }
.form input, .form textarea, .form select { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 13px; background: #fff; outline-color: var(--brand); }
.compact-form { margin-top: 12px; }
.compact-form label { font-size: 13px; }
.compact-form textarea { resize: vertical; min-height: 64px; }
.form button, .primary { min-height: 46px; border: 0; border-radius: 999px; background: linear-gradient(135deg,var(--brand),var(--brand-dark)); color: #fff; padding: 0 20px; font-weight: 950; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.secondary { min-height: 42px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--brand-dark); padding: 0 16px; font-weight: 900; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.error { min-height: 20px; color: var(--danger); font-weight: 800; }

.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 24px; }
.eyebrow { color: var(--brand-dark); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; font-weight: 950; }
.topbar h1 { margin: 7px 0 0; font-size: 44px; line-height: 1; letter-spacing: 0; }
.order-link { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; padding: 0 18px; background: #102a33; color: #fff; text-decoration: none; font-weight: 900; }
.content { display: grid; gap: 18px; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi, .panel, .card, .empty { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: 0 18px 50px rgba(0,124,145,.08); }
.kpi strong { display: block; color: var(--brand-dark); font-size: 34px; line-height: 1; }
.kpi span { display: block; color: var(--muted); font-weight: 850; margin-top: 6px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.card { display: grid; gap: 12px; }
.card-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.card h2, .card h3, .panel h2 { margin: 0; line-height: 1.1; letter-spacing: 0; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; background: #e8f9fb; color: #006a7a; padding: 7px 10px; font-size: 12px; font-weight: 950; white-space: nowrap; }
.muted { color: var(--muted); line-height: 1.45; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tabs button { border: 1px solid var(--line); border-radius: 999px; background: #fff; min-height: 38px; padding: 0 14px; font-weight: 850; cursor: pointer; }
.tabs button.is-active { background: var(--brand-dark); color: #fff; border-color: var(--brand-dark); }
.creator-card { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 12px; }
.candidate-list { display: grid; gap: 12px; }
.candidate { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-top: 10px; }
.candidate h3 { margin: 2px 0 6px; line-height: 1.1; }
.avatar { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg,var(--brand),var(--brand-dark)); color: #fff; font-weight: 950; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags small { background: var(--soft); color: #006a7a; border-radius: 999px; padding: 5px 8px; font-weight: 850; }
.videos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.videos a { min-height: 58px; display: grid; place-items: center; text-decoration: none; background: linear-gradient(145deg,#102a33,#007C91); color: #fff; border-radius: 10px; font-weight: 900; }
.message-list { display: grid; gap: 10px; max-height: 420px; overflow: auto; padding-right: 4px; }
.message { border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 12px; padding: 12px; background: #fff; }
.message strong { display: block; color: var(--brand-dark); margin-bottom: 4px; }
.message p { margin: 0; color: #26313a; line-height: 1.4; }
.message small { display: block; color: var(--muted); margin-top: 6px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }

@media (max-width: 920px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 16px; }
  .nav { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .nav a { justify-content: center; padding: 0 8px; font-size: 13px; }
  .main { padding: 18px; }
  .topbar { display: block; }
  .topbar h1 { font-size: 34px; }
  .order-link { margin-top: 14px; }
  .kpis, .grid, .split { grid-template-columns: 1fr; }
}
