:root {
  --ink:#151e26;
  --muted:#59636d;
  --subtle:#65717d;
  --line:#e1e8de;
  --surface:#fff;
  --surface-inset:#f4f7f1;
  --hover:#edf4e8;
  --bg:#f4f6f3;
  --sidebar:#fbfcfa;
  --sidebar-text:#495761;
  --sidebar-selected:#e8f4d5;
  --accent:#3a621c;
  --accent-hover:#294713;
  --accent-soft:#e8f5d9;
  --accent-ink:#fff;
  --focus:#5d832d;
  --syndi-lime:#c7ff48;
  --brand-navy:#111826;
  --good:#146944;
  --good-soft:#e4f5e9;
  --warn:#80530c;
  --warn-soft:#fff2d9;
  --danger:#a73550;
  --danger-soft:#fae8ee;
}

:root[data-theme="dark"] {
  color-scheme:dark;
  --ink:#edf1f5;
  --muted:#aab6c5;
  --subtle:#a4b1bf;
  --line:#2b3645;
  --surface:#161f2c;
  --surface-inset:#111926;
  --hover:#202d3a;
  --bg:#0b101b;
  --sidebar:#111925;
  --sidebar-text:#b9c5d2;
  --sidebar-selected:#263523;
  --accent:#c7ff48;
  --accent-hover:#dcff8e;
  --accent-soft:#283822;
  --accent-ink:#17220b;
  --focus:#b8dc72;
  --good:#8fe0aa;
  --good-soft:#1d392d;
  --warn:#f1c57c;
  --warn-soft:#3c2e1b;
  --danger:#ff9bb4;
  --danger-soft:#432b39;
}

button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,.search:focus-within { outline-color:var(--focus); }
.sidebar { background:var(--sidebar); color:var(--sidebar-text); border-right:1px solid var(--line); }
.brand { color:var(--ink); font-size:22px; }
.brand small,.workspace span,.nav-label,.preview-label,.profile-copy small { color:var(--muted); }
.brand-mark { object-fit:cover; border-radius:9px; background:var(--brand-navy); box-shadow:none; }
.workspace { background:var(--surface-inset); border-color:var(--line); }
.workspace-mark,.nav-count,.avatar,.profile .avatar { background:var(--accent-soft); color:var(--accent); }
.workspace strong,.profile-copy strong { color:var(--ink); }
.nav a,.nav i,.preview-label i,.profile { color:var(--sidebar-text); }
.nav a:hover,.profile:hover { background:var(--hover); }
.nav a[aria-current="page"] { background:var(--sidebar-selected); color:var(--accent-hover); border-color:transparent; }
.nav a[aria-current="page"] i { color:var(--accent); }
.profile { border-color:var(--line); }
.topbar,.card,.metric,.icon-button,dialog,.form input,.form select,.form textarea,.toolbar select,.button.outline,.login-card { background:var(--surface); border-color:var(--line); }
.breadcrumb strong,.form label,.detail-message { color:var(--ink); }
.breadcrumb i,.icon-button,.toolbar select,.search { color:var(--muted); }
.icon-button:hover,.button.outline:hover { background:var(--hover); color:var(--accent-hover); border-color:var(--line); }
.bell span { background:var(--focus); border-color:var(--surface); }
.hero,.admin-hero { background:var(--brand-navy); box-shadow:0 10px 29px -21px #0d15234f; }
.hero p,.admin-hero p,.meta-tag,.admin-badge { color:#cbd4e1; }
.hero { justify-content:space-between; }
.hero-copy { flex:1; min-width:0; }
.hero-banner { width:clamp(280px,45%,560px); height:auto; object-fit:contain; margin:-22px 0; flex:none; }
.admin-hero { background:radial-gradient(ellipse at 96% 58%,#33451665,transparent 55%),var(--brand-navy); }
.button.primary { background:var(--accent); color:var(--accent-ink); box-shadow:none; }
.button.primary:hover { background:var(--accent-hover); }
.button.light { background:var(--syndi-lime); color:#1d2c0c; }
.button.light:hover { background:#dcff8e; }
.button.outline { color:var(--ink); }
.metric-icon,.activity-icon,.login-lock { background:var(--accent-soft); color:var(--accent); }
.metric-icon.green,.activity-icon.payment,.status.good,.password-success { background:var(--good-soft); color:var(--good); }
.metric-icon.gold,.activity-icon.waiting,.status.warn { background:var(--warn-soft); color:var(--warn); }
.status.bad,.form-error { background:var(--danger-soft); color:var(--danger); }
.metric-label,thead,.status { color:var(--muted); }
thead,.status,.detail-message { background:var(--surface-inset); }
tbody tr:hover { background:var(--hover); }
tbody tr+tr,.table-note,.activity-list li+li,.activity-footer,.search,.admin-tabs { border-color:var(--line); }
:root[data-theme="dark"] .account-icon { color:#9cb7ff; background:#253550; }
.admin-tabs a { color:var(--muted); }
.toast { background:var(--brand-navy); color:#fff; }
.toast i { color:var(--syndi-lime); }
.login-story { background:var(--brand-navy); padding-inline:clamp(30px,6vw,100px); }
.login-main { background:var(--bg); position:relative; }
.login-theme { position:absolute; top:24px; right:26px; z-index:2; }
.login-banner { mix-blend-mode:lighten; }
.password-field button:hover,.profile-dropdown button:hover { background:var(--hover); color:var(--accent-hover); }
.password-success { font-size:12px; padding:8px 10px; border-radius:7px; line-height:1.4; }
.profile-control { position:relative; }
.top-avatar { width:36px; height:36px; padding:0; border-radius:10px; background:var(--brand-navy); }
.top-avatar img { display:block; width:100%; height:100%; object-fit:cover; border-radius:inherit; }
.profile-dropdown {
  position:absolute; z-index:8; top:calc(100% + 11px); right:0; width:max-content; min-width:208px;
  border:1px solid var(--line); border-radius:12px; padding:5px; color:var(--ink); background:var(--surface);
  box-shadow:0 10px 30px #0b15212b;
}
.profile-dropdown-heading { display:grid; gap:3px; padding:9px 10px; border-bottom:1px solid var(--line); margin-bottom:4px; }
.profile-dropdown-heading small { color:var(--muted); font-size:11.5px; }
.profile-dropdown button { display:flex; align-items:center; width:100%; min-height:38px; gap:9px; border:0; border-radius:7px; padding:6px 9px; color:var(--ink); background:none; text-align:left; }
.profile-dropdown button i { width:16px; height:16px; color:var(--muted); }

@media (max-width: 850px) {
  .hero-banner { width:39%; }
}
@media (max-width: 760px) {
  .login-story { padding:20px 22px; }
  .login-theme { position:fixed; top:22px; right:20px; }
}
@media (max-width: 620px) {
  .hero { flex-direction:column-reverse; align-items:start; justify-content:center; }
  .hero-banner { width:min(285px,78%); max-height:104px; margin:0 0 -10px 11px; object-position:left center; }
  .hero-copy { flex:none; }
}
