/* =========================================================
   APEX Admin — design tokens, layout and components
   ========================================================= */
:root {
  --primary: #004AAD;
  --primary-hover: #00347A;
  --primary-tint: #E6EEF9;
  --primary-ink: #00347A;
  --on-primary: #FFFFFF;
  --ink: #0B0F19;
  --text-2: #364152;
  --muted: #5B6475;
  --bg: #F4F6FA;
  --card: #FFFFFF;
  --surface: #F4F6FA;      /* inset blocks inside cards */
  --surface-2: #EBEFF5;
  --border: #E3E7EF;
  --border-strong: #CBD2DE;
  --hero: #0B0F19;
  --hero-text: #FFFFFF;
  --hero-muted: #A9B3C7;
  --sidebar: #0B0F19;
  --shadow: 0 1px 2px rgba(11,15,25,.04), 0 4px 16px rgba(11,15,25,.04);
  --shadow-lg: 0 20px 50px rgba(11,15,25,.18);
  --ring: 0 0 0 4px rgba(0,74,173,.14);

  --low: #10B981;    --low-ink: #047857;    --low-bg: #E3F6EE;
  --medium: #3B82F6; --medium-ink: #1D4ED8; --medium-bg: #E8EFFE;
  --high: #F59E0B;   --high-ink: #B45309;   --high-bg: #FEF3E2;
  --urgent: #EF4444; --urgent-ink: #B91C1C; --urgent-bg: #FDECEC;
  --pending-ink: #475569; --pending-bg: #EEF0F4;
  --progress-ink: #6D28D9; --progress-bg: #F1EAFE; --progress: #8B5CF6;
  --done-ink: #047857; --done-bg: #E3F6EE; --done: #10B981;
  --danger: #DC2626; --danger-bg: #FDECEC; --danger-ink: #B91C1C; --danger-border: #F8CFCF;

  --r-sm: 10px; --r: 14px; --r-lg: 20px; --r-xl: 24px;
  --sidebar-w: 256px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --primary: #3D82E6;
  --primary-hover: #5B97EE;
  --primary-tint: rgba(61,130,230,.16);
  --primary-ink: #9CC2FF;
  --ink: #E9EDF5;
  --text-2: #C3CAD8;
  --muted: #8E98AC;
  --bg: #080B13;
  --card: #111725;
  --surface: #182033;
  --surface-2: #1E283D;
  --border: #222B3E;
  --border-strong: #344058;
  --hero: #151D30;
  --hero-text: #FFFFFF;
  --hero-muted: #9AA6BE;
  --sidebar: #0B0F19;
  --shadow: none;
  --shadow-lg: 0 20px 60px rgba(0,0,0,.6);
  --ring: 0 0 0 4px rgba(61,130,230,.25);
  --low-ink: #4ADE9F;    --low-bg: rgba(16,185,129,.15);
  --medium-ink: #8AB4FF; --medium-bg: rgba(59,130,246,.17);
  --high-ink: #FBBF4A;   --high-bg: rgba(245,158,11,.16);
  --urgent-ink: #FF8A8A; --urgent-bg: rgba(239,68,68,.16);
  --pending-ink: #B4BDCC; --pending-bg: rgba(148,163,184,.15);
  --progress-ink: #C4A6FF; --progress-bg: rgba(139,92,246,.18);
  --done-ink: #4ADE9F; --done-bg: rgba(16,185,129,.15);
  --danger: #EF4444; --danger-bg: rgba(239,68,68,.13); --danger-ink: #FF8A8A; --danger-border: rgba(239,68,68,.35);
  color-scheme: dark;
}
/* no-JS fallback */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) { --bg: #080B13; --card: #111725; --ink: #E9EDF5; --border: #222B3E; --muted: #8E98AC; --text-2: #C3CAD8; --surface: #182033; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5;
  color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; line-height: 1.25; }
h2 { font-size: 17px; font-weight: 800; }
h3 { font-size: 15px; font-weight: 800; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--card); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Material Symbols — clipped to 1em so the ligature text never leaks if the font is unavailable */
.ms {
  font-family: 'Material Symbols Rounded'; font-weight: normal; font-style: normal;
  font-size: 22px; line-height: 1; width: 1em; height: 1em; overflow: hidden;
  display: inline-block; flex-shrink: 0; white-space: nowrap; letter-spacing: normal; text-transform: none;
  word-wrap: normal; direction: ltr; user-select: none; vertical-align: middle;
  font-feature-settings: 'liga'; -webkit-font-feature-settings: 'liga';
  font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}
.ms.fill { font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24; }
.ms.sm { font-size: 18px; }
.ms.xs { font-size: 16px; }

/* ---------------- Shell ---------------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar { grid-column: 1; grid-row: 1; background: var(--sidebar); color: #fff; z-index: 40; border-right: 1px solid rgba(255,255,255,.04); }
.sb-inner { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 22px 14px 16px; overflow-y: auto; }
.sb-top { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 24px; }
.sb-logo img { width: 168px; height: auto; display: block; }
/* the ISO logo has its own white plate: show it on a white card on dark backgrounds */
.logo-card { display: inline-block; background: #fff; border-radius: 12px; padding: 6px 8px; line-height: 0; }
.sidebar .sb-close { display: none; }
.sb-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.sb-link {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 11px 14px; border-radius: 14px; border: 0; background: transparent; cursor: pointer;
  color: #AEB6C6; font-weight: 600; font-size: 14px; text-align: left;
  transition: background .15s, color .15s;
}
.sb-link .ms { font-size: 22px; }
.sb-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sb-link.active { background: #fff; color: #0B0F19; font-weight: 800; }
.sb-link.active .ms { color: var(--primary); }
:root[data-theme="dark"] .sb-link.active .ms { color: #004AAD; }
.sb-badge {
  margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px;
  background: #EF4444; color: #fff; font-size: 11.5px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.sb-logout { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.08); }
.sb-user {
  display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px;
  border-radius: 16px; background: rgba(255,255,255,.05); color: #fff;
}
.sb-user:hover { background: rgba(255,255,255,.09); color: #fff; }
.sb-user-text { display: flex; flex-direction: column; min-width: 0; }
.sb-user-text strong { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user-text small { color: #8F99AD; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.shell { grid-column: 2; grid-row: 1; min-height: 100vh; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 14px;
  padding: 16px 32px; min-height: 78px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent;
}
.topbar.scrolled { border-bottom-color: var(--border); }
.tb-title { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; }
.tb-title > div { min-width: 0; }
.tb-title h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eyebrow { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.tb-actions { display: flex; align-items: center; gap: 10px; }
.topbar .menu-btn { display: none; }
.tb-bell { position: relative; }
.dot-badge {
  position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 10px; background: #DC2626; color: #fff; font-size: 10.5px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg);
}
.only-dark { display: none !important; }
:root[data-theme="dark"] .only-dark { display: inline-block !important; }
:root[data-theme="dark"] .only-light { display: none !important; }

.main { padding: 8px 32px 56px; max-width: 1360px; }
.scrim { display: none; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: var(--r); border: 1px solid transparent;
  font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s;
  text-decoration: none; -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn .ms { font-size: 20px; }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 6px 16px -6px rgba(0,74,173,.55); }
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-dark { background: var(--ink); color: var(--card); }
.btn-dark:hover { opacity: .9; color: var(--card); }
.btn-ghost { background: var(--card); border-color: var(--border); color: var(--ink); }
.btn-ghost:hover { border-color: var(--border-strong); color: var(--ink); background: var(--surface); }
.btn-soft { background: var(--primary-tint); color: var(--primary-ink); }
.btn-soft:hover { color: var(--primary-ink); filter: brightness(.97); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #B91C1C; color: #fff; }
.btn-danger-soft { background: var(--danger-bg); color: var(--danger-ink); border-color: var(--danger-border); }
.btn-danger-soft:hover { color: var(--danger-ink); filter: brightness(.98); }
.btn-sm { height: 36px; padding: 0 12px; border-radius: 11px; font-size: 13px; }
.btn-sm .ms { font-size: 18px; }
.btn-lg { height: 54px; padding: 0 24px; border-radius: 16px; font-size: 15.5px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--card); color: var(--ink); cursor: pointer; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; position: relative;
}
.icon-btn:hover { border-color: var(--border-strong); color: var(--ink); }
.icon-btn.danger { background: var(--danger-bg); border-color: var(--danger-border); color: var(--danger-ink); }
.icon-btn.sm { width: 36px; height: 36px; border-radius: 11px; }
.icon-btn.sm .ms { font-size: 19px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--primary); font-weight: 700; cursor: pointer; font-size: 13px; }
.link-btn:hover { color: var(--primary-hover); }

/* ---------------- Cards & blocks ---------------- */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-xl);
  padding: 22px; box-shadow: var(--shadow); min-width: 0;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h2 { display: flex; align-items: center; gap: 8px; }
.card-head .link { font-weight: 700; font-size: 13px; white-space: nowrap; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 28px 0 12px; }
.section-title h2 { font-size: 18px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.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)); }
.empty {
  text-align: center; padding: 40px 20px; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.empty .ms { font-size: 40px; color: var(--border-strong); }
.empty strong { color: var(--ink); font-size: 15px; }

/* Alerts */
.alert {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin: 0 0 16px;
  border-radius: var(--r); font-weight: 600; border: 1px solid;
}
.alert > span:not(.ms) { flex: 1; }
.alert-success { background: var(--done-bg); color: var(--done-ink); border-color: color-mix(in srgb, var(--done) 30%, transparent); }
.alert-error { background: var(--danger-bg); color: var(--danger-ink); border-color: var(--danger-border); }
.alert-info { background: var(--primary-tint); color: var(--primary-ink); border-color: color-mix(in srgb, var(--primary) 25%, transparent); }
.alert-x { background: none; border: 0; color: inherit; cursor: pointer; padding: 2px; opacity: .7; display: flex; }
.alert-x:hover { opacity: 1; }

/* Pills */
.pill {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 8px;
  font-size: 12px; font-weight: 800; white-space: nowrap; line-height: 1;
}
.pill .ms { font-size: 14px; }
.pr-low { background: var(--low-bg); color: var(--low-ink); }
.pr-medium { background: var(--medium-bg); color: var(--medium-ink); }
.pr-high { background: var(--high-bg); color: var(--high-ink); }
.pr-urgent { background: var(--urgent-bg); color: var(--urgent-ink); }
.st-pending { background: var(--pending-bg); color: var(--pending-ink); }
.st-in_progress { background: var(--progress-bg); color: var(--progress-ink); }
.st-completed { background: var(--done-bg); color: var(--done-ink); }
.pill-danger { background: var(--danger-bg); color: var(--danger-ink); }
.pill-neutral { background: var(--surface); color: var(--text-2); }
.pill-primary { background: var(--primary-tint); color: var(--primary-ink); }
.cat { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); font-weight: 600; font-size: 13px; white-space: nowrap; min-width: 0; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; display: inline-block; }

/* Avatars */
.avatar {
  width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; letter-spacing: .02em; position: relative;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 36px; height: 36px; border-radius: 11px; font-size: 12.5px; }
.avatar-lg { width: 64px; height: 64px; border-radius: 20px; font-size: 20px; }
.tone0 { background: #E0F2FE; color: #0369A1; }
.tone1 { background: var(--primary-tint); color: var(--primary-ink); }
.tone2 { background: #FEF3E2; color: #B45309; }
.tone3 { background: #E3F6EE; color: #047857; }
.tone4 { background: #F1EAFE; color: #6D28D9; }
.tone5 { background: #FDECEC; color: #B91C1C; }
:root[data-theme="dark"] .tone0 { background: rgba(14,165,233,.16); color: #7DD3FC; }
:root[data-theme="dark"] .tone2 { background: rgba(245,158,11,.16); color: #FBBF4A; }
:root[data-theme="dark"] .tone3 { background: rgba(16,185,129,.15); color: #4ADE9F; }
:root[data-theme="dark"] .tone4 { background: rgba(139,92,246,.18); color: #C4A6FF; }
:root[data-theme="dark"] .tone5 { background: rgba(239,68,68,.15); color: #FF8A8A; }
.presence { position: absolute; right: -3px; bottom: -3px; width: 14px; height: 14px; border-radius: 5px; background: #10B981; border: 2.5px solid var(--card); }

/* Progress */
.progress { height: 8px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 6px; background: var(--primary); }
.progress.sm { height: 6px; }

/* ---------------- Forms ---------------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.label { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.label .opt { text-transform: none; letter-spacing: 0; font-weight: 600; }
.hint { font-size: 12.5px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; min-height: 50px; padding: 12px 16px; border-radius: var(--r);
  border: 1.5px solid var(--border); background: var(--card); color: var(--ink);
  font-size: 15px; font-weight: 500; outline: none; transition: border-color .15s, box-shadow .15s;
}
.input::placeholder, .textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); font-weight: 500; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: var(--ring); }
.input-lg { font-size: 18px; font-weight: 700; min-height: 58px; }
.textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%235B6475' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.select-sm, .input-sm { min-height: 42px; height: 42px; padding-top: 0; padding-bottom: 0; font-size: 14px; border-radius: 12px; }
.select-sm { padding-right: 36px; background-position: right 10px center; }
.input-icon { position: relative; }
.input-icon > .ms { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; font-size: 20px; }
.input-icon > .input { padding-left: 44px; }
.input-affix { position: relative; }
.input-affix .input { padding-right: 116px; }
.input-affix .affix { position: absolute; right: 6px; top: 6px; bottom: 6px; height: auto; }
input[type="date"].input, input[type="time"].input { min-width: 0; }
::-webkit-calendar-picker-indicator { opacity: .6; cursor: pointer; }
:root[data-theme="dark"] ::-webkit-calendar-picker-indicator { filter: invert(1); }

/* Segmented control */
.seg {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px;
  background: var(--card); border: 1.5px solid var(--border); border-radius: 16px; padding: 4px;
}
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
  height: 44px; display: flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 12px; font-weight: 700; font-size: 14px; cursor: pointer; border: 1.5px solid transparent;
  color: var(--text-2); text-align: center; padding: 0 8px; transition: background .15s, border-color .15s;
}
.seg label:hover { background: var(--surface); }
.seg input:focus-visible + label { box-shadow: var(--ring); }
.seg-solid { background: var(--surface); border-color: transparent; }
.seg-solid input:checked + label { background: var(--primary); color: #fff; box-shadow: 0 4px 12px -4px rgba(0,74,173,.6); }
.seg-prio label.p-low { color: var(--low-ink); }
.seg-prio label.p-medium { color: var(--medium-ink); }
.seg-prio label.p-high { color: var(--high-ink); }
.seg-prio label.p-urgent { color: var(--urgent-ink); }
.seg-prio input:checked + label.p-low { background: var(--low-bg); border-color: var(--low); }
.seg-prio input:checked + label.p-medium { background: var(--medium-bg); border-color: var(--medium); }
.seg-prio input:checked + label.p-high { background: var(--high-bg); border-color: var(--high); }
.seg-prio input:checked + label.p-urgent { background: var(--urgent-bg); border-color: var(--urgent); }

/* Period tabs (links) */
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 15px; background: var(--primary-tint); }
.tabs a {
  height: 38px; padding: 0 16px; border-radius: 11px; display: inline-flex; align-items: center;
  font-weight: 600; font-size: 13.5px; color: var(--text-2); white-space: nowrap;
}
.tabs a:hover { color: var(--ink); }
.tabs a.active { background: var(--card); color: var(--primary-ink); font-weight: 800; box-shadow: 0 1px 3px rgba(11,15,25,.12); }

/* Chips (radio/checkbox) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip label {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: 13px; border: 1.5px solid var(--border); background: var(--card);
  font-weight: 700; font-size: 14px; cursor: pointer; color: var(--text-2); transition: all .15s;
}
.chip label:hover { border-color: var(--border-strong); }
.chip input:focus-visible + label { box-shadow: var(--ring); }
.chip input:checked + label { background: var(--chip, var(--primary)); border-color: var(--chip, var(--primary)); color: #fff; }
.chip input:checked + label .dot { background: #fff !important; }

/* Switch */
.switch { position: relative; display: inline-flex; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch .track { width: 52px; height: 30px; border-radius: 16px; background: var(--border-strong); transition: background .2s; position: relative; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked + .track { background: var(--primary); }
.switch input:checked + .track::after { transform: translateX(22px); }
.switch input:focus-visible + .track { box-shadow: var(--ring); }

.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.toggle-row strong { display: block; font-size: 15px; }

/* Upload */
.upload {
  display: flex; align-items: center; gap: 16px; padding: 14px;
  border: 1.5px dashed var(--border-strong); border-radius: var(--r-lg); background: var(--card);
}
.upload-thumb {
  width: 88px; height: 88px; border-radius: 16px; flex-shrink: 0; overflow: hidden;
  background: var(--primary-tint); color: var(--primary); display: flex; align-items: center; justify-content: center;
}
.upload-thumb img { width: 100%; height: 100%; object-fit: cover; }
.upload-thumb .ms { font-size: 30px; }
.upload-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.upload-body strong { font-size: 15px; }
.upload-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.check-inline { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; font-size: 13.5px; }
.check-inline input { width: 18px; height: 18px; accent-color: var(--primary); }

.form-actions { display: flex; gap: 12px; justify-content: flex-end; align-items: center; flex-wrap: wrap; margin-top: 8px; }

/* ---------------- Dashboard ---------------- */
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.dash-grid > .span-2 { grid-column: 1 / -1; }

.hero {
  background: var(--hero); color: var(--hero-text); border-radius: 28px; padding: 26px;
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 22px; min-width: 0;
}
:root[data-theme="dark"] .hero { border: 1px solid var(--border); }
.hero::before {
  content: ''; position: absolute; right: -60px; top: -80px; width: 220px; height: 220px; border-radius: 64px;
  border: 2px solid rgba(255,255,255,.07); transform: rotate(20deg); pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; right: 40px; top: -120px; width: 200px; height: 200px; border-radius: 60px;
  border: 2px solid rgba(0,74,173,.35); transform: rotate(35deg); pointer-events: none;
}
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; position: relative; z-index: 1; }
.hero-label { font-size: 13.5px; font-weight: 600; color: var(--hero-muted); }
.hero-rate { display: flex; align-items: baseline; gap: 12px; margin: 4px 0 2px; flex-wrap: wrap; }
.hero-rate .big { font-size: 52px; font-weight: 800; letter-spacing: -0.04em; line-height: 1.05; }
.delta { font-size: 12.5px; font-weight: 800; padding: 4px 9px; border-radius: 8px; white-space: nowrap; }
.delta.up { background: #5EE0B0; color: #062A1E; }
.delta.down { background: #FCA5A5; color: #450A0A; }
.delta.flat { background: rgba(255,255,255,.14); color: #fff; }
.hero-sub { font-size: 13px; color: var(--hero-muted); }
.hero-count { text-align: right; }
.hero-count .n { font-size: 28px; font-weight: 800; display: block; line-height: 1.1; }
.hero-count small { font-size: 12px; font-weight: 600; color: var(--hero-muted); }
.bars { display: flex; align-items: flex-end; gap: 12px; height: 130px; position: relative; z-index: 1; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; height: 100%; min-width: 0; }
.bar .col { width: 100%; max-width: 48px; border-radius: 10px; background: #2A3550; position: relative; min-height: 6px; }
.bar.today .col { background: #3D82E6; }
.bar .val {
  position: absolute; top: -26px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 800;
  background: #fff; color: #0B0F19; padding: 2px 7px; border-radius: 6px; white-space: nowrap;
}
.bar:not(.today) .val { background: transparent; color: var(--hero-muted); }
.bar .lbl { font-size: 12px; font-weight: 600; color: var(--hero-muted); }
.bar.today .lbl { color: #fff; font-weight: 800; }
.bar-area { display: flex; flex-direction: column; gap: 0; padding-top: 26px; }

.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.kpi {
  background: var(--card); border: 1px solid var(--border); border-radius: 22px; padding: 16px;
  display: flex; flex-direction: column; gap: 10px; color: var(--ink); transition: border-color .15s, transform .15s; min-width: 0;
}
.kpi:hover { border-color: var(--border-strong); color: var(--ink); transform: translateY(-1px); }
.kpi-icon { width: 36px; height: 36px; border-radius: 11px; display: flex; align-items: center; justify-content: center; }
.kpi-icon .ms { font-size: 20px; }
.kpi .n { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.kpi .l { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi.k-total .kpi-icon { background: var(--primary-tint); color: var(--primary); }
.kpi.k-pending .kpi-icon { background: var(--pending-bg); color: var(--pending-ink); }
.kpi.k-progress .kpi-icon { background: var(--progress-bg); color: var(--progress-ink); }
.kpi.k-progress .n { color: var(--progress-ink); }
.kpi.k-done .kpi-icon { background: var(--done-bg); color: var(--done-ink); }
.kpi.k-done .n { color: var(--done-ink); }
.kpi.k-today .kpi-icon { background: var(--high-bg); color: var(--high-ink); }
.kpi.k-today .n { color: var(--high-ink); }
.kpi.k-overdue .kpi-icon { background: var(--card); color: var(--danger-ink); }
.kpi.k-overdue.hot { background: var(--danger-bg); border-color: var(--danger-border); }
.kpi.k-overdue .n, .kpi.k-overdue.hot .l { color: var(--danger-ink); }

.attn { border-color: var(--danger-border); }
.attn .card-head h2 .live { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 4px var(--danger-bg); }
.attn-list { display: flex; flex-direction: column; }
.attn-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; color: var(--ink); border-top: 1px solid var(--border); }
.attn-item:first-child { border-top: 0; padding-top: 0; }
.attn-item:hover { color: var(--ink); }
.attn-item:hover strong { color: var(--primary); }
.attn-item strong { display: block; font-size: 14.5px; }
.attn-item .meta { font-size: 12.5px; color: var(--muted); }
.btn-remind { width: 100%; margin-top: 14px; background: var(--danger-bg); color: var(--danger-ink); border-color: transparent; }
.btn-remind:hover { color: var(--danger-ink); filter: brightness(.97); }

.donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.donut { position: relative; width: 140px; height: 140px; flex-shrink: 0; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-center b { font-size: 28px; font-weight: 800; line-height: 1; }
.donut-center small { font-size: 12px; color: var(--muted); font-weight: 600; }
.legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; flex: 1; min-width: 160px; }
.legend div { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.legend b { color: var(--ink); margin-left: auto; }
.legend .dot { border-radius: 3px; width: 10px; height: 10px; }
.cat-bars { display: flex; flex-direction: column; gap: 14px; }
.cat-bar .row-between { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.cat-bar .row-between span:last-child { color: var(--muted); }

.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.day {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 2px;
  border-radius: 16px; background: var(--surface); color: var(--ink); min-width: 0;
}
.day:hover { color: var(--ink); background: var(--surface-2); }
.day .d { font-size: 11px; font-weight: 700; color: var(--muted); }
.day .num { font-size: 20px; font-weight: 800; }
.day .c { font-size: 11.5px; font-weight: 700; color: var(--muted); min-width: 20px; height: 20px; border-radius: 7px; display: flex; align-items: center; justify-content: center; }
.day.has .c { color: var(--primary-ink); }
.day.today { background: var(--primary); color: #fff; }
.day.today .d { color: rgba(255,255,255,.8); }
.day.today .c { background: #fff; color: var(--primary); }
:root[data-theme="dark"] .day.today .c { color: #004AAD; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -22px; padding: 0 22px; }
.table { width: 100%; border-collapse: collapse; min-width: 560px; }
.table th { text-align: left; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 800; padding: 0 12px 10px; white-space: nowrap; }
.table td { padding: 12px; border-top: 1px solid var(--border); vertical-align: middle; }
.table th:first-child, .table td:first-child { padding-left: 0; }
.table th:last-child, .table td:last-child { padding-right: 0; }
.table tr:hover td { background: color-mix(in srgb, var(--surface) 55%, transparent); }
.rank { font-weight: 800; color: var(--high-ink); width: 28px; }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who strong { display: block; font-size: 14px; white-space: nowrap; }
.who small { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.prog-cell { min-width: 130px; }
.prog-cell .row-between { font-size: 12.5px; font-weight: 800; margin-bottom: 6px; }
.text-danger { color: var(--danger-ink); }
.text-success { color: var(--done-ink); }
.strong { font-weight: 800; }

.feed { display: flex; flex-direction: column; gap: 2px; }
.feed-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; color: var(--text-2); }
.feed-item:hover { color: var(--text-2); }
.feed-item:hover b:last-of-type { color: var(--primary); }
.feed-icon { width: 36px; height: 36px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.feed-icon .ms { font-size: 19px; }
.feed-icon.completed { background: var(--done-bg); color: var(--done-ink); }
.feed-icon.started { background: var(--progress-bg); color: var(--progress-ink); }
.feed-icon.seen { background: var(--primary-tint); color: var(--primary); }
.feed-text { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.45; padding-top: 2px; }
.feed-text b { color: var(--ink); font-weight: 800; }
.feed-time { font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; padding-top: 3px; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: #10B981; box-shadow: 0 0 0 4px var(--done-bg); display: inline-block; }

/* ---------------- Tasks list ---------------- */
.filters { display: grid; grid-template-columns: minmax(200px, 2fr) repeat(4, minmax(0, 1fr)); gap: 10px; align-items: center; }
.filters-2 { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.filters-2 .row { flex-wrap: wrap; }
.group-head { display: flex; align-items: center; gap: 10px; margin: 24px 0 10px; font-weight: 800; font-size: 15px; }
.group-head .count { color: var(--muted); font-weight: 700; font-size: 13px; }
.task-list { display: flex; flex-direction: column; gap: 10px; }
.task-row {
  display: grid; grid-template-columns: 6px minmax(0, 1fr) 170px 150px 24px; align-items: center; gap: 16px;
  background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 16px 18px 16px 16px;
  color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.task-row:hover { border-color: var(--border-strong); color: var(--ink); box-shadow: 0 8px 24px -14px rgba(11,15,25,.25); }
.task-row .accent { width: 6px; align-self: stretch; border-radius: 4px; }
.task-row .t-main { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.task-row .t-title { font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-row.done .t-title { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.t-meta { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.t-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--border-strong); }
.t-dead { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--text-2); white-space: nowrap; }
.t-dead .ms { font-size: 18px; color: var(--muted); }
.t-dead.over, .t-dead.over .ms { color: var(--danger-ink); }
.t-prog { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.t-prog b { color: var(--ink); }
.task-row .chev { color: var(--muted); }
.accent-low { background: var(--low); } .accent-medium { background: var(--medium); }
.accent-high { background: var(--high); } .accent-urgent { background: var(--urgent); }
.result-count { font-weight: 700; color: var(--muted); font-size: 13px; }

/* ---------------- Task form ---------------- */
.form-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.form-layout .stack { gap: 20px; }
.assign-box { display: flex; flex-direction: column; gap: 14px; }
.emp-search { margin-top: 2px; }
.emp-list { max-height: 360px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 2px; margin: 0 -4px; padding: 2px 4px; }
.emp-opt { position: relative; }
.emp-opt input { position: absolute; opacity: 0; pointer-events: none; }
.emp-opt label {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 14px; cursor: pointer;
  border: 1.5px solid transparent; transition: background .12s, border-color .12s;
}
.emp-opt label:hover { background: var(--surface); }
.emp-opt input:focus-visible + label { box-shadow: var(--ring); }
.emp-opt .tick { margin-left: auto; width: 24px; height: 24px; border-radius: 8px; border: 1.5px solid var(--border-strong); display: flex; align-items: center; justify-content: center; color: transparent; flex-shrink: 0; }
.emp-opt .tick .ms { font-size: 18px; }
.emp-opt input:checked + label { background: var(--primary-tint); border-color: color-mix(in srgb, var(--primary) 35%, transparent); }
.emp-opt input:checked + label .tick { background: var(--primary); border-color: var(--primary); color: #fff; }
.emp-opt strong { display: block; font-size: 14px; }
.emp-opt small { color: var(--muted); font-size: 12px; }
.sel-count { font-size: 13px; font-weight: 700; color: var(--primary-ink); }
.everyone-note { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 16px; background: var(--primary-tint); color: var(--primary-ink); font-weight: 600; font-size: 13.5px; }
.sticky-side { position: sticky; top: 96px; }

/* ---------------- Task view ---------------- */
.view-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.task-head { display: flex; flex-direction: column; gap: 12px; }
.task-head .tags { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); font-weight: 600; }
.task-head h2 { font-size: 28px; letter-spacing: -0.03em; line-height: 1.2; overflow-wrap: anywhere; }
.task-desc { font-size: 15px; color: var(--text-2); line-height: 1.65; white-space: pre-line; overflow-wrap: anywhere; }
.task-img { border-radius: 18px; overflow: hidden; border: 1px solid var(--border); cursor: zoom-in; max-width: 520px; background: var(--surface); padding: 0; display: block; }
.task-img img { width: 100%; max-height: 360px; object-fit: cover; }
.remark { display: flex; gap: 10px; padding: 14px 16px; border-radius: 16px; background: var(--high-bg); color: var(--high-ink); font-weight: 600; font-size: 14px; }
.remark span:last-child { white-space: pre-line; overflow-wrap: anywhere; }
.prog-hero { background: var(--primary); color: #fff; border-radius: 26px; padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
:root[data-theme="dark"] .prog-hero { background: #0A3E8A; }
.prog-hero .top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.prog-hero .top strong { font-size: 19px; font-weight: 800; }
.prog-hero .top .pct { font-size: 38px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.segs { display: flex; gap: 6px; }
.segs span { flex: 1; height: 8px; border-radius: 5px; background: rgba(255,255,255,.22); }
.segs span.done { background: #5EE0B0; }
.segs span.prog { background: #B9D3FF; }
.prog-legend { display: flex; gap: 18px; font-size: 13.5px; color: rgba(255,255,255,.82); font-weight: 600; flex-wrap: wrap; }
.facts { display: flex; flex-direction: column; }
.fact { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--border); font-size: 13.5px; }
.fact:first-child { border-top: 0; padding-top: 0; }
.fact span:first-child { color: var(--muted); font-weight: 600; }
.fact span:last-child { font-weight: 700; text-align: right; }
.assignee { padding: 18px; border-radius: 22px; }
.assignee-top { display: flex; align-items: center; gap: 12px; }
.assignee-top .grow strong { display: block; font-size: 15px; }
.assignee-top .grow small { font-size: 13px; color: var(--muted); }
.timeline { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.tl { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; background: var(--surface); font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.tl .ms { font-size: 16px; color: var(--muted); }
.tl.off { color: var(--muted); }
.tl.off .ms { opacity: .6; }
.proof { display: flex; gap: 14px; align-items: flex-start; margin-top: 14px; padding: 14px; border-radius: 16px; background: var(--surface); }
.proof-img { width: 84px; height: 84px; border-radius: 14px; overflow: hidden; flex-shrink: 0; cursor: zoom-in; border: 0; padding: 0; background: var(--card); }
.proof-img img { width: 100%; height: 100%; object-fit: cover; }
.proof p { font-size: 14px; color: var(--text-2); line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.assignee-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.assignee-actions .btn { flex: 1; min-width: 130px; }
.btn-reopen { background: var(--card); border-color: var(--border); color: var(--danger-ink); }
.btn-reopen:hover { color: var(--danger-ink); border-color: var(--danger-border); background: var(--danger-bg); }
.not-seen { color: var(--danger-ink) !important; font-weight: 700; }

/* ---------------- Employees ---------------- */
.emp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.emp-card { display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.emp-card.inactive { background: color-mix(in srgb, var(--card) 60%, var(--bg)); border-style: dashed; }
.emp-card.inactive .avatar { filter: grayscale(1); opacity: .7; }
.emp-card .head { display: flex; align-items: center; gap: 14px; }
.emp-card .head .grow strong { display: block; font-size: 16px; font-weight: 800; }
.emp-card .head .grow small { display: block; color: var(--muted); font-size: 13px; }
.stat3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat3 div { padding: 10px 12px; border-radius: 14px; background: var(--surface); }
.stat3 b { display: block; font-size: 20px; font-weight: 800; line-height: 1.15; }
.stat3 span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stat3 .ok { background: var(--done-bg); } .stat3 .ok b, .stat3 .ok span { color: var(--done-ink); }
.stat3 .bad { background: var(--danger-bg); } .stat3 .bad b, .stat3 .bad span { color: var(--danger-ink); }
.emp-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.emp-actions form { display: contents; }
.contact { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.contact span { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.contact .ms { font-size: 15px; }
.cred-panel { background: var(--hero); color: #fff; border-radius: 26px; padding: 24px; display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; }
:root[data-theme="dark"] .cred-panel { border: 1px solid var(--border); }
.cred-panel .ok-badge { width: 48px; height: 48px; border-radius: 16px; background: #5EE0B0; color: #062A1E; display: flex; align-items: center; justify-content: center; }
.cred-panel h2 { font-size: 20px; }
.cred-panel p { color: var(--hero-muted); }
.creds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.creds div { background: rgba(255,255,255,.07); border-radius: 16px; padding: 12px 14px; min-width: 0; }
.creds small { display: block; color: var(--hero-muted); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.creds b { font-size: 16px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.btn-wa { background: #25D366; color: #06331A; }
.btn-wa:hover { background: #1EBE5A; color: #06331A; }
.cred-panel .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.22); }
.cred-panel .btn-ghost:hover { background: rgba(255,255,255,.08); color: #fff; }
.cred-box { background: var(--primary-tint); border-radius: 22px; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.cred-box .head { display: flex; align-items: center; gap: 10px; color: var(--primary-ink); font-weight: 800; font-size: 15px; }
.cred-box .input { background: var(--card); }

/* ---------------- Categories ---------------- */
.cat-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.cat-card { display: flex; flex-direction: column; gap: 14px; padding: 18px; position: relative; }
.cat-card.editing { border-color: var(--primary); box-shadow: var(--ring); }
.cat-icon { width: 48px; height: 48px; border-radius: 15px; display: flex; align-items: center; justify-content: center; }
.cat-icon .ms { font-size: 24px; }
.cat-card strong { display: block; font-size: 15.5px; font-weight: 800; overflow-wrap: anywhere; }
.cat-card small { color: var(--muted); font-size: 13px; font-weight: 600; }
.cat-card .actions { position: absolute; top: 14px; right: 14px; display: flex; gap: 6px; }
.cat-card .actions form { display: contents; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.swatch { position: relative; }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch label { width: 38px; height: 38px; border-radius: 12px; display: block; cursor: pointer; border: 3px solid transparent; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.swatch input:checked + label { border-color: var(--ink); box-shadow: inset 0 0 0 2px var(--card); }
.swatch input:focus-visible + label { outline: 2px solid var(--primary); outline-offset: 2px; }
.color-custom { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px 0 4px; border-radius: 12px; border: 1.5px solid var(--border); font-size: 13px; font-weight: 700; color: var(--text-2); cursor: pointer; }
.color-custom input[type="color"] { width: 30px; height: 30px; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 8px; }
.color-custom input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-custom input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 8px; }
.color-custom.on { border-color: var(--ink); }
.icons { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.icon-opt { position: relative; }
.icon-opt input { position: absolute; opacity: 0; pointer-events: none; }
.icon-opt label { aspect-ratio: 1; border-radius: 14px; border: 1.5px solid var(--border); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-2); }
.icon-opt label:hover { border-color: var(--border-strong); }
.icon-opt input:checked + label { background: var(--pick-bg, var(--primary-tint)); border-color: var(--pick, var(--primary)); color: var(--pick, var(--primary)); }
.icon-opt input:focus-visible + label { box-shadow: var(--ring); }
.cat-preview { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--surface); }

/* ---------------- Notifications ---------------- */
.notif-list { display: flex; flex-direction: column; }
.notif { display: flex; gap: 14px; padding: 16px 18px; border-top: 1px solid var(--border); color: var(--ink); position: relative; }
.notif:first-child { border-top: 0; }
.notif:hover { background: var(--surface); color: var(--ink); }
.notif.unread { background: color-mix(in srgb, var(--primary-tint) 70%, var(--card)); }
.notif.unread::before { content: ''; position: absolute; left: 0; top: 16px; bottom: 16px; width: 4px; border-radius: 0 4px 4px 0; background: var(--primary); }
.notif-icon { width: 42px; height: 42px; border-radius: 14px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--surface); color: var(--text-2); }
.notif.unread .notif-icon { background: var(--card); }
.notif-body { flex: 1; min-width: 0; }
.notif-body strong { display: block; font-size: 14.5px; overflow-wrap: anywhere; }
.notif-body p { font-size: 13.5px; color: var(--text-2); margin-top: 2px; overflow-wrap: anywhere; }
.notif-time { font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.n-task_completed .notif-icon, .n-task_all_done .notif-icon { color: var(--done-ink); background: var(--done-bg); }
.n-overdue_reminder .notif-icon, .n-deadline_soon .notif-icon { color: var(--high-ink); background: var(--high-bg); }
.n-task_reopened .notif-icon { color: var(--danger-ink); background: var(--danger-bg); }
.card.flush { padding: 0; overflow: hidden; }

/* ---------------- Profile ---------------- */
.profile-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; max-width: 1100px; }
.profile-id { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.profile-id strong { display: block; font-size: 18px; }

/* ---------------- Modal / lightbox ---------------- */
.modal, .lightbox {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(6, 9, 16, .62); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  animation: fade .15s ease;
}
.modal-card {
  width: 100%; max-width: 440px; background: var(--card); border: 1px solid var(--border); border-radius: 26px;
  padding: 24px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 12px;
  animation: pop .18s ease;
}
.modal-card h2 { font-size: 19px; }
.modal-icon { width: 48px; height: 48px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: var(--primary-tint); color: var(--primary); }
.modal-icon.danger { background: var(--danger-bg); color: var(--danger-ink); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.modal-actions .btn { flex: 1; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 80px); border-radius: 16px; box-shadow: var(--shadow-lg); object-fit: contain; }
.lb-close { position: absolute; top: 16px; right: 16px; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); color: #fff; }
.lb-close:hover { color: #fff; border-color: rgba(255,255,255,.4); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
body.no-scroll { overflow: hidden; }

/* ---------------- Login ---------------- */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--bg); }
.login-brand {
  background: #0B0F19; color: #fff; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden; gap: 40px;
}
.login-brand::before, .login-brand::after { content: ''; position: absolute; border-radius: 90px; transform: rotate(24deg); pointer-events: none; }
.login-brand::before { width: 420px; height: 420px; right: -140px; top: -120px; border: 2px solid rgba(255,255,255,.06); }
.login-brand::after { width: 520px; height: 520px; right: -60px; bottom: -300px; border: 2px solid rgba(0,74,173,.45); }
.login-brand .logo img { width: 232px; height: auto; display: block; }
.dev-credit { text-align: center; letter-spacing: .02em; }
.dev-credit strong, .login-foot strong { color: var(--ink); font-weight: 800; }
.login-foot strong { color: #C9D2E3; }
.login-brand h1 { font-size: 46px; font-weight: 800; letter-spacing: -0.04em; line-height: 1.08; max-width: 520px; }
.login-brand h1 span { color: #5B9BF0; }
.login-brand p { color: #A9B3C7; font-size: 16px; margin-top: 14px; max-width: 460px; line-height: 1.6; }
.login-points { display: flex; flex-direction: column; gap: 14px; position: relative; z-index: 1; }
.login-points div { display: flex; align-items: center; gap: 12px; color: #D5DBE7; font-weight: 600; }
.login-points .ms { width: 38px; height: 38px; font-size: 20px; border-radius: 12px; background: rgba(255,255,255,.07); display: inline-flex; align-items: center; justify-content: center; color: #8DB8F5; }
.login-foot { color: #6B768C; font-size: 13px; position: relative; z-index: 1; }
.login-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; position: relative; }
.login-card { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 22px; }
.login-card .card { padding: 30px; border-radius: 28px; }
.login-card h2 { font-size: 28px; letter-spacing: -0.03em; }
.login-mobile-logo { display: none; }
.login .theme-fab { position: absolute; top: 20px; right: 20px; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 52px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.pw-toggle:hover { color: var(--ink); background: var(--surface); }

/* ---------------- Sales & Purchase ---------------- */
:root { --sale: #059669; --sale-ink: #047857; --sale-bg: #E3F6EE; --purchase: #EA580C; --purchase-ink: #C2410C; --purchase-bg: #FFEDE0; }
:root[data-theme="dark"] { --sale: #10B981; --sale-ink: #4ADE9F; --sale-bg: rgba(16,185,129,.15); --purchase: #FB923C; --purchase-ink: #FDBA74; --purchase-bg: rgba(251,146,60,.15); }
.ledger-head .month-nav { display: flex; align-items: center; gap: 8px; }
.ledger-head .month-nav form { margin: 0; }
.month-input { width: 170px; font-weight: 700; }
.icon-btn.disabled { opacity: .4; pointer-events: none; }
.ledger-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.lk { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; min-width: 0; box-shadow: var(--shadow); }
.lk-top { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: var(--muted); }
.lk .kpi-icon { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.lk .kpi-icon .ms { font-size: 19px; }
.lk-n { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; overflow-wrap: anywhere; }
.lk-sub { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.lk-sale .kpi-icon { background: var(--sale-bg); color: var(--sale-ink); }
.lk-sale .lk-n { color: var(--sale-ink); }
.lk-purchase .kpi-icon { background: var(--purchase-bg); color: var(--purchase-ink); }
.lk-purchase .lk-n { color: var(--purchase-ink); }
.lk-net { background: var(--hero); border-color: transparent; }
.lk-net .lk-top, .lk-net .lk-sub { color: var(--hero-muted); }
.lk-net .lk-n { color: #fff; }
.lk-net .kpi-icon { background: rgba(255,255,255,.1); color: #fff; }
.lk-net.neg .lk-n { color: #FF9B9B; }
.lk-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 2px; }
.lk-split small { display: block; font-size: 12px; color: var(--muted); font-weight: 700; }
.lk-split b { font-size: 17px; font-weight: 800; overflow-wrap: anywhere; }
.ledger-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.ledger-search { margin: -4px 0 12px; }
.ledger-table .num { text-align: right; }
.ledger-table th.num { text-align: right; }
.ledger-table tfoot td { border-top: 2px solid var(--border-strong); padding-top: 14px; }
.ledger-table tr.editing td { background: var(--primary-tint); }
.ledger-party strong { display: block; font-size: 14px; }
.ledger-party small { display: block; max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill-sale { background: var(--sale-bg); color: var(--sale-ink); }
.pill-purchase { background: var(--purchase-bg); color: var(--purchase-ink); }
.seg-ledger input:checked + label.t-sale { background: var(--sale-bg); border-color: var(--sale); color: var(--sale-ink); }
.seg-ledger input:checked + label.t-purchase { background: var(--purchase-bg); border-color: var(--purchase); color: var(--purchase-ink); }
.seg-ledger label .ms { font-size: 19px; }
.mlegend { display: flex; gap: 14px; font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.mlegend span { display: inline-flex; align-items: center; gap: 6px; }
.mlegend i { width: 10px; height: 10px; border-radius: 3px; }
.mlegend i.s, .mbar-cols .s { background: var(--sale); }
.mlegend i.p, .mbar-cols .p { background: var(--purchase); }
.mbars { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; height: 170px; }
.mbar { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); border-radius: 12px; padding: 8px 0 6px; }
.mbar:hover { background: var(--surface); color: var(--ink); }
.mbar.on { background: var(--primary-tint); color: var(--primary-ink); }
.mbar small { font-size: 12px; font-weight: 800; }
.mbar-cols { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 4px; }
.mbar-cols span { width: 34%; max-width: 22px; border-radius: 6px 6px 3px 3px; min-height: 3px; }
@media (max-width: 1440px) {
  .ledger-layout { grid-template-columns: minmax(0, 1fr); }
  .ledger-layout #entryForm { order: -1; position: static; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; }
  #entryForm > .row-between, #entryForm > .alert { grid-column: 1 / -1; }
  #entryForm > .seg-ledger { align-self: end; }
  #entryForm > .f-pay, #entryForm > .f-note { grid-column: span 2; }
  #entryForm .textarea { min-height: 50px; height: 50px; }
  #entryForm .input-lg { min-height: 50px; font-size: 16px; }
}
@media (max-width: 1280px) { .ledger-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .ledger-layout #entryForm { display: flex; }
  .ledger-head .btn { display: inline-flex; }
  .ledger-head { gap: 10px; }
  .month-input { width: 150px; }
  .lk { padding: 14px; border-radius: 18px; }
  .lk-n { font-size: 20px; }
  .mbars { height: 140px; gap: 4px; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 1280px) {
  .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filters .f-search { grid-column: 1 / -1; }
  .cat-layout { grid-template-columns: minmax(0, 1fr) 340px; }
}
@media (max-width: 1120px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .form-layout, .view-layout { grid-template-columns: minmax(0, 1fr); }
  .sticky-side { position: static; }
  .cat-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1024px) {
  :root { --sidebar-w: 280px; }
  .app { display: block; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); transform: translateX(-100%); transition: transform .25s ease, visibility .25s; visibility: hidden; box-shadow: none; }
  .sb-inner { height: 100%; }
  body.drawer-open .sidebar { visibility: visible; }
  body.drawer-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  body.drawer-open .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(6,9,16,.5); }
  .sidebar .sb-close { display: inline-flex; background: transparent; border-color: rgba(255,255,255,.15); color: #fff; }
  .topbar .menu-btn { display: inline-flex; }
  .topbar { padding: 14px 24px; }
  .main { padding: 8px 24px 48px; }
  .task-row { grid-template-columns: 6px minmax(0, 1fr) 150px 24px; }
  .task-row .t-prog { display: none; }
}
@media (max-width: 760px) {
  .topbar { padding: 12px 16px; gap: 10px; min-height: 68px; }
  .tb-title h1 { font-size: 19px; }
  .eyebrow { font-size: 11.5px; }
  .tb-new span:not(.ms) { display: none; }
  .tb-new { width: 44px; padding: 0; }
  .tb-actions { gap: 8px; }
  .tb-bell { display: none; }
  .main { padding: 4px 16px 40px; }
  .card { padding: 18px; border-radius: 22px; }
  .table-wrap { margin: 0 -18px; padding: 0 18px; }
  .grid-2, .grid-3, .form-grid, .profile-layout { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 14px 12px; border-radius: 20px; }
  .kpi .n { font-size: 24px; }
  .kpi .l { font-size: 12px; }
  .hero { padding: 20px; border-radius: 26px; }
  .hero-rate .big { font-size: 42px; }
  .bars { gap: 8px; height: 110px; }
  .days { gap: 5px; }
  .day { padding: 8px 0; border-radius: 13px; }
  .day .num { font-size: 17px; }
  .day .d { font-size: 10px; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task-row { grid-template-columns: 5px minmax(0, 1fr); gap: 12px; padding: 14px; border-radius: 18px; }
  .task-row .accent { width: 5px; grid-row: span 2; }
  .task-row .t-dead { grid-column: 2; }
  .task-row .chev { display: none; }
  .task-head h2 { font-size: 23px; }
  .emp-grid { grid-template-columns: minmax(0, 1fr); }
  .creds { grid-template-columns: minmax(0, 1fr); }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cat-card { padding: 16px; border-radius: 22px; }
  .icons { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
  .seg label { font-size: 13px; padding: 0 4px; }
  .upload-thumb { width: 72px; height: 72px; }
  .form-actions .btn { flex: 1; }
  .dash-head .tabs { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dash-head .tabs a { justify-content: center; padding: 0 6px; }
  .dash-head .btn { display: none; }
  .modal-card { padding: 20px; }
  .notif { padding: 14px; }
  .login { grid-template-columns: minmax(0, 1fr); }
  .login-brand { display: none; }
  .login-mobile-logo { display: block; margin-bottom: 4px; }
  .login-mobile-logo img { width: 190px; height: auto; }
  :root[data-theme="dark"] .login-mobile-logo .lg-light { display: none; }
  .login-card .card { padding: 22px; }
}
.login-mobile-logo .lg-dark { display: none; }
:root[data-theme="dark"] .login-mobile-logo .lg-dark { display: block; }
@media (max-width: 400px) {
  .kpi .kpi-icon { width: 32px; height: 32px; border-radius: 10px; }
  .hero-count .n { font-size: 22px; }
  .tabs a { font-size: 12.5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------------- Send notification ---------------- */
.pill-success { background: var(--done-bg); color: var(--done-ink); }
.n-announcement .notif-icon { color: var(--primary-ink); background: var(--primary-tint); }
.bc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.bc-compose { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; align-items: start; }
.bc-preview { display: flex; flex-direction: column; gap: 8px; }
.bc-preview-cap { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.bc-phone { padding: 18px 12px; border-radius: 22px; background: linear-gradient(160deg, #0B3B8C, #004AAD 55%, #2C6BD6); min-height: 150px; }
.bc-note { background: rgba(255,255,255,.96); color: #10151F; border-radius: 16px; padding: 11px 13px; box-shadow: 0 8px 24px -10px rgba(0,0,0,.45); }
.bc-note-top { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #5B6475; font-weight: 600; margin-bottom: 4px; }
.bc-note-top img { border-radius: 4px; }
.bc-note strong { display: block; font-size: 13.5px; overflow-wrap: anywhere; }
.bc-note p { font-size: 12.5px; color: #3A4252; margin-top: 2px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.bc-item:hover { background: none; }
.bc-item .notif-icon { color: var(--primary-ink); background: var(--primary-tint); }
.bc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; min-width: 0; }
.bc-meta .ellipsis { max-width: 100%; }
.bc-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.bc-dl { display: grid; gap: 8px; margin: 0; }
.bc-dl div { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.bc-dl dt { color: var(--muted); font-weight: 600; }
.bc-dl dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.bc-steps { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13.5px; color: var(--text-2); }
@media (max-width: 1180px) {
  .bc-layout { grid-template-columns: minmax(0, 1fr); }
  .bc-layout .sticky-side { position: static; order: -1; }
}
@media (max-width: 720px) {
  .bc-compose { grid-template-columns: minmax(0, 1fr); }
  .bc-preview { display: none; }
}

/* ---------------- Login (v2) ---------------- */
.login { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.login-brand {
  background: radial-gradient(120% 90% at 0% 0%, #0A4FC0 0%, #06357F 45%, #041F4D 100%);
  padding: 40px 56px; justify-content: space-between; gap: 32px; isolation: isolate;
}
.login-brand::before { width: 520px; height: 520px; right: -220px; top: -200px; border: 2px solid rgba(255,255,255,.08); z-index: -1; }
.login-brand::after { width: 640px; height: 640px; left: -320px; bottom: -380px; right: auto; border: 2px solid rgba(255,255,255,.06); z-index: -1; }
.lb-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.lb-logo { display: inline-flex; background: #fff; border-radius: 14px; padding: 8px 10px; box-shadow: 0 10px 30px -12px rgba(0,0,0,.5); }
.lb-logo img { width: 200px; height: auto; display: block; }
.lb-badge { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); color: #DCE7FA; font-size: 12.5px; font-weight: 700; }
.lb-badge .ms { font-size: 16px; color: #8FD4A8; }
.lb-hero h1 { font-size: clamp(34px, 3.4vw, 48px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.08; color: #fff; }
.lb-hero h1 span { color: #9CC3FF; }
.lb-hero p { color: #C3D3EE; font-size: 16px; margin-top: 14px; max-width: 470px; line-height: 1.6; }

.lb-showcase { position: relative; height: 300px; max-width: 520px; width: 100%; }
.lb-card { position: absolute; background: rgba(255,255,255,.97); color: #10151F; border-radius: 20px; box-shadow: 0 24px 50px -20px rgba(0,0,0,.55); }
.lb-main { left: 0; top: 0; width: 330px; padding: 18px 20px; }
.lb-row { display: flex; justify-content: space-between; align-items: center; }
.lb-cap { font-size: 12px; font-weight: 800; color: #5B6475; text-transform: uppercase; letter-spacing: .06em; }
.lb-chip { font-size: 11px; font-weight: 800; color: #0F7A3D; background: #DDF5E6; padding: 3px 8px; border-radius: 999px; }
.lb-ring-row { display: flex; align-items: center; gap: 18px; margin-top: 14px; }
.lb-ring { --p: 70; width: 84px; height: 84px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: conic-gradient(#004AAD calc(var(--p) * 1%), #E6EEF9 0); position: relative; }
.lb-ring::before { content: ''; position: absolute; inset: 9px; border-radius: 50%; background: #fff; }
.lb-ring b { position: relative; font-size: 19px; font-weight: 800; letter-spacing: -0.03em; }
.lb-stats { display: grid; grid-template-columns: repeat(3, auto); gap: 14px; }
.lb-stats strong { display: block; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.lb-stats small { font-size: 11.5px; color: #5B6475; font-weight: 600; }
.lb-stats div:nth-child(3) strong { color: #C2410C; }
.lb-bars { display: flex; align-items: flex-end; gap: 7px; height: 52px; margin-top: 16px; }
.lb-bars i { flex: 1; height: var(--h); border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, #3D82E6, #004AAD); opacity: .85; }
.lb-bars i:last-child { background: linear-gradient(180deg, #7FB0F5, #3D82E6); }
.lb-toast, .lb-sales { display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; }
.lb-toast { right: 0; top: 150px; width: 280px; animation: lbFloat 6s ease-in-out infinite; }
.lb-sales { left: 120px; bottom: 0; animation: lbFloat 7s ease-in-out -2s infinite; }
.lb-toast strong, .lb-sales strong { display: block; font-size: 13.5px; font-weight: 800; }
.lb-sales strong { font-size: 18px; letter-spacing: -0.02em; }
.lb-toast small, .lb-sales small { display: block; font-size: 12px; color: #5B6475; font-weight: 600; }
.lb-ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; flex-shrink: 0; }
.lb-ic .ms { font-size: 21px; }
.lb-ic-done { background: #DDF5E6; color: #0F7A3D; }
.lb-ic-sale { background: #E6EEF9; color: #004AAD; }
@keyframes lbFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .lb-toast, .lb-sales { animation: none; } }

.lb-points { display: flex; flex-wrap: wrap; gap: 10px; }
.lb-points span { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); color: #E3ECFA; font-size: 13.5px; font-weight: 600; }
.lb-points .ms { font-size: 18px; color: #9CC3FF; }

.login-main { padding: 40px 28px; }
.login-card { max-width: 400px; gap: 24px; }
.lc-head { display: flex; flex-direction: column; gap: 6px; }
.lc-icon { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: var(--primary-tint); color: var(--primary); margin-bottom: 10px; }
.lc-icon .ms { font-size: 26px; }
.lc-head h2 { font-size: 30px; letter-spacing: -0.03em; }
.lc-head p { font-size: 15px; }
.lc-form { gap: 18px; }
.lc-form .input { min-height: 54px; border-radius: 14px; font-size: 15.5px; }
.lc-form .btn-lg { min-height: 54px; border-radius: 14px; font-size: 16px; margin-top: 4px; }
.lc-secure { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; color: var(--muted); font-weight: 600; margin: 0; }
.lc-secure .ms { font-size: 15px; color: var(--done, #16A34A); }
.lc-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted); }
.lc-dev strong { color: var(--ink); font-weight: 800; letter-spacing: .02em; }

@media (max-width: 1180px) {
  .login-brand { padding: 36px 40px; }
  .lb-showcase { transform: scale(.88); transform-origin: left top; height: 270px; }
}
@media (max-height: 760px) and (min-width: 901px) {
  .lb-showcase { display: none; }
}
@media (max-width: 900px) {
  .login { grid-template-columns: minmax(0, 1fr); }
  .login-brand { display: none; }
  .login-mobile-logo { display: block; }
  .login-main { align-items: flex-start; padding: 72px 16px 32px; }
  .lc-foot { justify-content: center; text-align: center; }
}
.lb-showcase { max-width: 580px; height: 330px; }
.lb-main { width: 340px; }
.lb-toast { right: 0; left: auto; top: 28px; }
.lb-sales { left: 200px; bottom: 6px; }
@media (min-width: 1600px) and (min-height: 900px) {
  .lb-showcase { transform: scale(1.12); transform-origin: left center; }
}
@media (max-width: 1180px) {
  .lb-toast { top: 190px; right: 10px; }
  .lb-sales { display: none; }
}
@media (max-width: 900px) { .lc-icon { display: none; } }
