:root {
  --bg: #080d16;
  --sidebar: #09111e;
  --surface: #101827;
  --surface-2: #151f2e;
  --surface-3: #1b2636;
  --text: #f5f7fb;
  --muted: #94a3b8;
  --line: #22324a;
  --primary: #2f80ed;
  --primary-bright: #5aa7ff;
  --cyan: #56c7dc;
  --green: #35c78a;
  --amber: #f1b84b;
  --red: #ef6b73;
  --shadow: 0 18px 50px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Segoe UI", Inter, system-ui, -apple-system, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 78% -10%, rgba(47,128,237,.12), transparent 28rem),
    var(--bg);
}
body.light {
  --bg: #edf3fa;
  --sidebar: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f2f6fb;
  --surface-3: #e7eef7;
  --text: #172033;
  --muted: #66758a;
  --line: #d7e0ec;
  --shadow: 0 16px 40px rgba(42,66,99,.12);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 268px minmax(0, 1fr); }
.sidebar {
  position: fixed; z-index: 30; inset: 0 auto 0 0; width: 268px;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--sidebar), rgba(7,13,24,.96));
  border-right: 1px solid var(--line);
}
body.light .sidebar { background: var(--sidebar); }
.brand { height: 82px; display: flex; align-items: center; gap: 11px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(90,167,255,.35); border-radius: 11px; background: linear-gradient(145deg, #174f92, #0d2443); box-shadow: 0 8px 20px rgba(47,128,237,.16); }
.brand-mark svg { width: 22px; fill: #fff; }
.brand strong, .brand span { display: block; letter-spacing: .08em; }
.brand strong { font-size: 12px; }
.brand span { margin-top: 3px; color: var(--primary-bright); font-size: 10px; letter-spacing: .22em; }
.nav-list { flex: 1; overflow-y: auto; padding: 12px 10px; scrollbar-width: thin; }
.nav-item {
  width: 100%; min-height: 42px; display: flex; align-items: center; gap: 12px;
  border: 0; border-radius: 8px; padding: 8px 12px; margin: 2px 0;
  color: var(--muted); background: transparent; text-align: left; font-size: 13px;
  transition: .18s ease;
}
.nav-item svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; flex: none; }
.nav-item:hover { color: var(--text); background: var(--surface-2); }
.nav-item.active { color: #fff; background: linear-gradient(90deg, rgba(47,128,237,.30), rgba(47,128,237,.06)); box-shadow: inset 3px 0 var(--primary-bright); }
body.light .nav-item.active { color: #fff; background: linear-gradient(90deg, #397ec9, #60a3ef); }
.sidebar-footer { height: 66px; display: flex; align-items: center; gap: 10px; padding: 0 20px; border-top: 1px solid var(--line); }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px rgba(53,199,138,.7); }
.sidebar-footer strong, .sidebar-footer span { display: block; }
.sidebar-footer strong { font-size: 12px; }
.sidebar-footer span { color: var(--muted); font-size: 10px; margin-top: 2px; }
.main-area { grid-column: 2; min-width: 0; }
.topbar {
  position: sticky; z-index: 20; top: 0; height: 82px; display: flex; align-items: center; gap: 16px;
  padding: 0 32px; border-bottom: 1px solid var(--line);
  background: rgba(8,13,22,.92); backdrop-filter: blur(16px);
}
body.light .topbar { background: rgba(248,250,252,.92); }
.global-search { position: relative; width: min(430px, 42vw); }
.global-search > svg { position:absolute; width:18px; height:18px; left:14px; top:12px; fill:none; stroke:var(--muted); stroke-width:2; }
.global-search input {
  width:100%; height:42px; border:1px solid var(--line); border-radius:9px; padding:0 14px 0 42px;
  color:var(--text); background:var(--surface); outline:none;
}
.global-search input:focus { border-color:var(--primary); box-shadow:0 0 0 3px rgba(47,128,237,.12); }
.search-results { position:absolute; top:48px; left:0; right:0; max-height:380px; overflow:auto; border:1px solid var(--line); border-radius:10px; background:var(--surface); box-shadow:var(--shadow); }
.search-result { width:100%; display:block; border:0; border-bottom:1px solid var(--line); padding:12px 14px; color:var(--text); background:transparent; text-align:left; }
.search-result:hover { background:var(--surface-2); }
.top-actions { margin-left:auto; display:flex; align-items:center; gap:8px; }
.icon-btn, .theme-btn { height:40px; border:1px solid var(--line); border-radius:9px; color:var(--muted); background:var(--surface); }
.icon-btn { position:relative; width:40px; display:grid; place-items:center; }
.icon-btn svg, .theme-btn svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; }
.icon-btn:hover, .theme-btn:hover { color:var(--text); border-color:var(--primary); }
.notification-badge { position:absolute; right:-4px; top:-4px; min-width:16px; height:16px; display:none; place-items:center; border-radius:8px; background:var(--primary); color:#fff; font-size:9px; }
.notification-badge.visible { display:grid; }
.theme-btn { display:flex; align-items:center; gap:8px; padding:0 12px; }
.menu-btn { display:none; }
.content { padding:28px 32px 50px; max-width:1600px; margin:0 auto; }
.page-header { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; margin-bottom:24px; }
.page-header h1 { margin:0; font-size:27px; letter-spacing:-.02em; }
.page-header p { margin:7px 0 0; color:var(--muted); max-width:650px; font-size:14px; line-height:1.6; }
.eyebrow { color:var(--primary-bright); font-size:10px; font-weight:700; letter-spacing:.18em; text-transform:uppercase; margin-bottom:7px; }
.grid { display:grid; gap:16px; }
.grid-2 { grid-template-columns:repeat(2,minmax(0,1fr)); }
.grid-3 { grid-template-columns:repeat(3,minmax(0,1fr)); }
.grid-4 { grid-template-columns:repeat(4,minmax(0,1fr)); }
.card {
  border:1px solid var(--line); border-radius:12px; background:linear-gradient(145deg,var(--surface),rgba(16,24,39,.72));
  box-shadow:var(--shadow);
}
body.light .card { background:var(--surface); }
.card-header { display:flex; align-items:center; justify-content:space-between; min-height:58px; padding:0 18px; border-bottom:1px solid var(--line); }
.card-header h2, .card-header h3 { margin:0; font-size:14px; }
.card-body { padding:18px; }
.metric { position:relative; min-height:122px; padding:18px; overflow:hidden; }
.metric::after { content:""; position:absolute; width:90px; height:90px; right:-35px; bottom:-45px; border-radius:50%; background:rgba(47,128,237,.08); }
.metric-icon { width:34px; height:34px; display:grid; place-items:center; border-radius:8px; color:var(--primary-bright); background:rgba(47,128,237,.13); }
.metric-icon svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.8; }
.metric-value { margin-top:13px; font-size:27px; font-weight:750; }
.metric-label { margin-top:4px; color:var(--muted); font-size:12px; }
.status { display:inline-flex; align-items:center; gap:6px; border-radius:20px; padding:5px 9px; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; }
.status::before { content:""; width:6px; height:6px; border-radius:50%; background:currentColor; }
.status-blue { color:var(--primary-bright); background:rgba(47,128,237,.12); }
.status-green { color:var(--green); background:rgba(53,199,138,.12); }
.status-amber { color:var(--amber); background:rgba(241,184,75,.12); }
.status-red { color:var(--red); background:rgba(239,107,115,.12); }
.btn { min-height:40px; border:1px solid var(--line); border-radius:8px; padding:0 14px; display:inline-flex; align-items:center; justify-content:center; gap:8px; color:var(--text); background:var(--surface-2); font-weight:650; font-size:12px; text-decoration:none; }
.btn-primary { border-color:var(--primary); color:#fff; background:linear-gradient(135deg,#2f80ed,#2065bd); box-shadow:0 8px 22px rgba(47,128,237,.18); }
.btn:hover { filter:brightness(1.08); }
.btn-small { min-height:32px; padding:0 10px; font-size:11px; }
.btn-danger { color:var(--red); }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.field { display:flex; flex-direction:column; gap:7px; }
.field.full { grid-column:1/-1; }
.field label { color:var(--muted); font-size:11px; font-weight:650; }
.field input, .field select, .field textarea {
  width:100%; border:1px solid var(--line); border-radius:8px; color:var(--text); background:var(--bg); outline:none;
  padding:10px 11px; min-height:42px;
}
.field textarea { min-height:92px; resize:vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color:var(--primary); box-shadow:0 0 0 3px rgba(47,128,237,.10); }
.table-wrap { overflow-x:auto; }
table { width:100%; border-collapse:collapse; font-size:12px; }
th { height:42px; color:var(--muted); background:var(--surface-2); font-size:10px; letter-spacing:.06em; text-transform:uppercase; text-align:left; }
th, td { padding:10px 14px; border-bottom:1px solid var(--line); }
tr:last-child td { border-bottom:0; }
.empty { padding:38px 20px; text-align:center; color:var(--muted); }
.empty svg { width:32px; height:32px; margin-bottom:10px; fill:none; stroke:var(--primary); stroke-width:1.5; }
.activity-row { display:flex; gap:12px; align-items:flex-start; padding:10px 0; border-bottom:1px solid var(--line); }
.activity-row:last-child { border-bottom:0; }
.activity-icon { width:32px; height:32px; display:grid; place-items:center; flex:none; border-radius:8px; color:var(--primary-bright); background:rgba(47,128,237,.12); }
.activity-copy strong { display:block; font-size:12px; }
.activity-copy span { display:block; margin-top:4px; color:var(--muted); font-size:11px; }
.quick-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.quick-link { min-height:70px; display:flex; align-items:center; gap:11px; border:1px solid var(--line); border-radius:9px; padding:10px; color:var(--text); background:var(--surface-2); text-align:left; }
.quick-link:hover { border-color:var(--primary); }
.quick-link .metric-icon { flex:none; }
.quick-link strong { display:block; font-size:12px; }
.quick-link span { display:block; margin-top:3px; color:var(--muted); font-size:10px; }
.notice { border:1px solid rgba(47,128,237,.24); border-left:3px solid var(--primary); border-radius:8px; padding:13px 14px; color:var(--muted); background:rgba(47,128,237,.07); font-size:12px; line-height:1.65; }
.notice strong { color:var(--text); }
.list { display:flex; flex-direction:column; gap:8px; }
.list-item { display:flex; align-items:flex-start; gap:10px; padding:10px; border:1px solid var(--line); border-radius:8px; background:var(--surface-2); }
.list-item input { margin-top:2px; accent-color:var(--primary); }
.list-item label { flex:1; font-size:12px; }
.comparison-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:8px; }
.comparison { border:1px solid var(--line); border-radius:8px; padding:12px 6px; text-align:center; background:var(--surface-2); }
.comparison strong { display:block; font-size:18px; }
.comparison span { color:var(--muted); font-size:10px; }
.risk-meter { height:8px; border-radius:5px; background:var(--surface-3); overflow:hidden; }
.risk-meter span { display:block; height:100%; width:0; transition:.3s; }
.service-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.service-card { padding:16px; }
.service-card .service-icon { width:38px; height:38px; display:grid; place-items:center; border-radius:9px; color:var(--primary-bright); background:rgba(47,128,237,.12); margin-bottom:13px; }
.service-card h3 { margin:0 0 7px; font-size:14px; }
.service-card p { min-height:48px; margin:0 0 14px; color:var(--muted); font-size:12px; line-height:1.55; }
.filter-bar { display:flex; gap:8px; margin-bottom:14px; }
.filter-bar input, .filter-bar select { height:38px; border:1px solid var(--line); border-radius:8px; padding:0 10px; color:var(--text); background:var(--surface); }
.toast-stack { position:fixed; z-index:100; right:20px; bottom:20px; display:flex; flex-direction:column; gap:8px; }
.toast { min-width:260px; border:1px solid var(--line); border-left:3px solid var(--primary); border-radius:9px; padding:12px 14px; color:var(--text); background:var(--surface); box-shadow:var(--shadow); font-size:12px; animation:toast-in .2s ease; }
@keyframes toast-in { from { opacity:0; transform:translateY(8px); } }
.record-actions { display:flex; gap:6px; }
.creator-banner {
  position:fixed; z-index:25; right:22px; bottom:20px; width:300px; overflow:hidden;
  border:1px solid rgba(95,164,255,.55); border-radius:12px;
  background:rgba(10,18,31,.84); box-shadow:0 10px 32px rgba(0,0,0,.32);
  opacity:.4; backdrop-filter:blur(8px);
  transition:opacity .2s ease, box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}
.creator-banner:hover, .creator-banner:focus-within {
  opacity:1; border-color:#64b5ff;
  box-shadow:0 0 0 1px rgba(91,177,255,.62), 0 0 18px rgba(47,128,237,.72), 0 0 38px rgba(47,128,237,.36);
  transform:translateY(-2px);
}
.creator-banner-link { display:block; color:inherit; text-decoration:none; outline-offset:-3px; }
.creator-banner-link img {
  display:block; width:100%; height:96px; object-fit:cover; object-position:center 50%;
}
.creator-banner-caption {
  display:flex; justify-content:space-between; align-items:center;
  padding:7px 12px 4px; color:#e7f2ff; font-size:11px; font-weight:700;
}
.creator-banner-caption span { color:#80c5ff; font-size:14px; }
.creator-whatsapp {
  min-height:36px; display:flex; align-items:center; gap:7px;
  padding:5px 12px 9px; color:#9fe8c6; text-decoration:none; font-size:10px;
}
.creator-whatsapp:hover, .creator-whatsapp:focus-visible { color:#fff; text-decoration:underline; }
.creator-whatsapp svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.6; flex:none; }
.creator-whatsapp strong { margin-left:auto; color:#f5fbff; font-size:11px; white-space:nowrap; }
@media (max-width:1100px) {
  .grid-4 { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .service-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:760px) {
  .app-shell { display:block; }
  .sidebar { transform:translateX(-100%); transition:.25s; box-shadow:var(--shadow); }
  .sidebar.open { transform:translateX(0); }
  .main-area { width:100%; }
  .topbar { height:68px; padding:0 14px; }
  .menu-btn { display:grid; }
  .global-search { flex:1; width:auto; }
  .theme-btn span, #notification-btn { display:none; }
  .content { padding:20px 14px 40px; }
  .grid-2, .grid-3, .grid-4, .service-grid { grid-template-columns:1fr; }
  .form-grid { grid-template-columns:1fr; }
  .field.full { grid-column:auto; }
  .page-header { flex-direction:column; }
  .quick-grid { grid-template-columns:1fr; }
  .comparison-grid { grid-template-columns:repeat(3,1fr); }
  .creator-banner { right:12px; bottom:12px; width:min(250px,calc(100vw - 24px)); }
  .creator-banner-link img { height:78px; }
}
