/* ============================================================
   CNC SHOP FLOOR — Premium SaaS theme
   Blue & White • Glassmorphism • Dark mode • Mobile-first
   ============================================================ */

/* ---------- My Day 2.0: motivational hero, badges, priority ---------- */
.hero {
  position:relative; overflow:hidden; border-radius:22px; padding:22px 24px; color:#fff;
  background:linear-gradient(120deg,#1e66f5 0%,#7a5af8 55%,#06aed4 120%);
  box-shadow:0 14px 34px rgba(30,102,245,.32);
}
.hero::after { content:""; position:absolute; right:-40px; top:-40px; width:190px; height:190px; border-radius:50%; background:rgba(255,255,255,.12); }
.hero::before { content:""; position:absolute; right:60px; bottom:-70px; width:150px; height:150px; border-radius:50%; background:rgba(255,255,255,.08); }
.hero-row { position:relative; z-index:1; display:flex; align-items:center; gap:20px; flex-wrap:wrap; }
.hero-greet { font-size:22px; font-weight:800; letter-spacing:-.3px; }
.hero-msg { font-size:14px; opacity:.95; margin-top:4px; font-weight:500; }
.hero-score { flex:0 0 auto; text-align:center; }
.hero-score .hs-num { font-size:34px; font-weight:800; line-height:1; }
.hero-score .hs-cap { font-size:11px; opacity:.85; text-transform:uppercase; letter-spacing:.6px; }
.hero-ring { --p:0; width:92px; height:92px; border-radius:50%; display:grid; place-items:center;
  background:conic-gradient(#fff calc(var(--p)*1%), rgba(255,255,255,.25) 0); }
.hero-ring > div { width:74px; height:74px; border-radius:50%; background:linear-gradient(120deg,#2a6bf2,#6a54e6); display:grid; place-items:center; }
.streak-pill { display:inline-flex; align-items:center; gap:6px; background:rgba(255,255,255,.2); padding:6px 12px; border-radius:30px; font-weight:700; font-size:13px; }
.badges-row { display:flex; gap:8px; flex-wrap:wrap; margin-top:14px; position:relative; z-index:1; }
.badge-chip { display:inline-flex; align-items:center; gap:6px; background:rgba(255,255,255,.18); border:1px solid rgba(255,255,255,.28); padding:6px 12px; border-radius:30px; font-size:12.5px; font-weight:600; backdrop-filter:blur(4px); }

.pri { display:inline-flex; align-items:center; gap:4px; padding:2px 9px; border-radius:20px; font-size:10.5px; font-weight:800; text-transform:uppercase; letter-spacing:.4px; }
.pri.high { background:var(--red-bg); color:var(--red); }
.pri.medium { background:var(--amber-bg); color:var(--amber); }
.pri.low { background:var(--green-bg); color:var(--green); }
.pri-group-label { font-size:11.5px; font-weight:800; text-transform:uppercase; letter-spacing:.6px; color:var(--text-mute); margin:6px 2px 2px; display:flex; align-items:center; gap:6px; }

.tips { display:flex; flex-direction:column; gap:9px; }
.tip-item { display:flex; gap:10px; align-items:flex-start; padding:11px 13px; border-radius:12px; background:var(--surface-solid); border:1px solid var(--line); border-left:3px solid var(--violet); font-size:13.5px; font-weight:500; }

@keyframes pop { 0%{transform:scale(.6);opacity:0} 60%{transform:scale(1.15)} 100%{transform:scale(1);opacity:1} }
.celebrate { position:fixed; inset:0; z-index:90; pointer-events:none; display:grid; place-items:center; }
.celebrate .cbox { background:var(--surface-solid); border:1px solid var(--glass-border); box-shadow:var(--glass-shadow); border-radius:20px; padding:22px 30px; text-align:center; animation:pop .5s ease; }
.celebrate .cbox .cem { font-size:46px; }
.confetti { position:absolute; top:-10px; width:9px; height:14px; border-radius:2px; animation:fall linear forwards; }
@keyframes fall { to { transform:translateY(105vh) rotate(540deg); opacity:.2; } }

@media (max-width:560px){ .hero-greet{font-size:19px;} .hero-row{gap:14px;} }

:root {
  --blue-50:#eef4ff; --blue-100:#dbe7ff; --blue-200:#bcd2ff;
  --blue-300:#8fb4ff; --blue-400:#5b8dff; --blue-500:#1e66f5;
  --blue-600:#1550d6; --blue-700:#123fa8; --blue-800:#122f75;

  --bg:#eef3fb;
  --bg-grad-1:#dbe7ff; --bg-grad-2:#eef4ff; --bg-grad-3:#f7faff;
  --surface: rgba(255,255,255,0.72);
  --surface-solid:#ffffff;
  --glass-border: rgba(255,255,255,0.85);
  --glass-shadow: 0 10px 30px rgba(21,80,214,0.10), 0 2px 8px rgba(18,47,117,0.06);

  --text:#0f1b33; --text-soft:#43506b; --text-mute:#7b879e;
  --line: rgba(18,47,117,0.10);
  --line-strong: rgba(18,47,117,0.16);

  --green:#12b76a; --green-bg:#e7f8f0;
  --amber:#f79009; --amber-bg:#fef3e2;
  --red:#f04438;   --red-bg:#fdecea;
  --violet:#7a5af8; --cyan:#06aed4; --pink:#ee46bc;

  --radius:18px; --radius-sm:12px; --radius-lg:26px;
  --gap:16px;
  --shadow-btn:0 6px 16px rgba(30,102,245,0.30);
  --sidebar-w:250px; --topbar-h:64px;
  --font:'Inter',system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
}

[data-theme="dark"] {
  --bg:#070b17;
  --bg-grad-1:#0b1533; --bg-grad-2:#0a1024; --bg-grad-3:#070b17;
  --surface: rgba(20,28,52,0.66);
  --surface-solid:#111a30;
  --glass-border: rgba(120,150,220,0.16);
  --glass-shadow: 0 12px 34px rgba(0,0,0,0.45);
  --text:#eaf0ff; --text-soft:#aeb9d6; --text-mute:#7f8bab;
  --line: rgba(150,175,235,0.12);
  --line-strong: rgba(150,175,235,0.20);
  --green-bg:rgba(18,183,106,0.14); --amber-bg:rgba(247,144,9,0.14); --red-bg:rgba(240,68,56,0.16);
  --blue-50:rgba(30,102,245,0.14);
}

* { box-sizing:border-box; }
/* The [hidden] attribute must always win over display rules (.modal-host uses
   display:grid, .login-screen uses display:flex, etc.) */
[hidden] { display:none !important; }
html,body { margin:0; padding:0; }
body {
  font-family:var(--font);
  color:var(--text);
  background:
    radial-gradient(1200px 700px at 12% -8%, var(--bg-grad-1), transparent 60%),
    radial-gradient(1100px 700px at 108% 10%, var(--bg-grad-2), transparent 55%),
    var(--bg);
  min-height:100vh;
  -webkit-font-smoothing:antialiased;
  transition:background .3s ease, color .3s ease;
}
button { font-family:inherit; cursor:pointer; }
input,select,textarea { font-family:inherit; }
a { color:var(--blue-500); }
code { background:var(--blue-50); color:var(--blue-700); padding:1px 6px; border-radius:6px; font-size:.85em; }

/* ---------- Glass ---------- */
.glass {
  background:var(--surface);
  border:1px solid var(--glass-border);
  box-shadow:var(--glass-shadow);
  backdrop-filter:blur(18px) saturate(140%);
  -webkit-backdrop-filter:blur(18px) saturate(140%);
}

/* ---------- Buttons ---------- */
.btn {
  border:1px solid var(--line-strong);
  background:var(--surface-solid);
  color:var(--text);
  padding:10px 16px; border-radius:var(--radius-sm);
  font-weight:600; font-size:14px; line-height:1;
  display:inline-flex; align-items:center; gap:8px; justify-content:center;
  transition:transform .08s ease, box-shadow .2s ease, background .2s ease, opacity .2s;
  white-space:nowrap;
}
.btn:hover { transform:translateY(-1px); }
.btn:active { transform:translateY(0); }
.btn-primary { background:linear-gradient(135deg,var(--blue-500),var(--blue-600)); color:#fff; border-color:transparent; box-shadow:var(--shadow-btn); }
.btn-success { background:linear-gradient(135deg,#12b76a,#0e9d5b); color:#fff; border-color:transparent; box-shadow:0 6px 16px rgba(18,183,106,.3); }
.btn-danger  { background:linear-gradient(135deg,#f04438,#d92d20); color:#fff; border-color:transparent; box-shadow:0 6px 16px rgba(240,68,56,.3); }
.btn-ghost   { background:transparent; }
.btn-lg { padding:15px 22px; font-size:16px; border-radius:var(--radius); }
.btn-block { width:100%; }
.btn-sm { padding:7px 11px; font-size:12.5px; border-radius:9px; }
.btn:disabled { opacity:.5; cursor:not-allowed; transform:none; }
.icon-btn {
  width:40px; height:40px; border-radius:12px; border:1px solid var(--line);
  background:var(--surface-solid); color:var(--text); font-size:17px;
  display:inline-flex; align-items:center; justify-content:center; position:relative;
  transition:background .2s, transform .08s;
}
.icon-btn:hover { background:var(--blue-50); transform:translateY(-1px); }
.link-btn { background:none; border:none; color:var(--blue-500); font-weight:600; font-size:13px; padding:0; }

/* ---------- Fields ---------- */
.field { display:flex; flex-direction:column; gap:6px; margin-bottom:14px; }
.field > span { font-size:12.5px; font-weight:600; color:var(--text-soft); }
input[type=text],input[type=password],input[type=number],input[type=date],input[type=time],input[type=tel],input[type=url],select,textarea {
  width:100%; padding:12px 14px; border-radius:var(--radius-sm);
  border:1px solid var(--line-strong); background:var(--surface-solid); color:var(--text);
  font-size:15px; outline:none; transition:border .2s, box-shadow .2s;
}
input:focus,select:focus,textarea:focus { border-color:var(--blue-400); box-shadow:0 0 0 4px rgba(30,102,245,.14); }
textarea { resize:vertical; min-height:64px; }
label.inline { display:flex; align-items:center; gap:8px; font-size:14px; color:var(--text-soft); }

/* ============================================================
   LOGIN
   ============================================================ */
.login-screen { min-height:100vh; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:24px; position:relative; overflow:hidden; }
.login-bg {
  position:absolute; inset:0; z-index:0;
  background:
    radial-gradient(600px 400px at 20% 20%, rgba(30,102,245,.25), transparent 60%),
    radial-gradient(600px 500px at 85% 80%, rgba(122,90,248,.20), transparent 60%);
  animation:floaty 12s ease-in-out infinite alternate;
}
@keyframes floaty { to { transform:translate3d(0,0,0) scale(1.05); } }
.login-card { position:relative; z-index:1; width:100%; max-width:400px; padding:34px 30px; border-radius:var(--radius-lg); }
.brand { display:flex; align-items:center; gap:14px; margin-bottom:24px; }
.brand-logo { width:52px; height:52px; border-radius:16px; background:linear-gradient(135deg,var(--blue-500),var(--blue-700)); color:#fff; display:grid; place-items:center; font-size:26px; box-shadow:var(--shadow-btn); }
.brand-name { font-size:20px; font-weight:800; letter-spacing:.4px; }
.brand-sub { font-size:12.5px; color:var(--text-mute); font-weight:500; }
.login-error { background:var(--red-bg); color:var(--red); padding:10px 12px; border-radius:10px; font-size:13px; margin-bottom:12px; font-weight:600; }
.login-hint { margin-top:18px; padding-top:16px; border-top:1px solid var(--line); display:flex; flex-direction:column; gap:4px; font-size:12.5px; color:var(--text-soft); }
.login-hint strong { color:var(--text); margin-bottom:2px; }
.login-foot { position:relative; z-index:1; margin-top:20px; color:var(--text-mute); font-size:12px; }

/* ============================================================
   APP SHELL
   ============================================================ */
.app { min-height:100vh; }
.topbar {
  position:fixed; top:0; left:0; right:0; height:var(--topbar-h); z-index:40;
  display:flex; align-items:center; gap:12px; padding:0 16px;
  border-radius:0; border-left:0; border-right:0; border-top:0;
}
.menu-toggle { display:none; }
.topbar-brand { display:flex; align-items:center; gap:9px; }
.topbar-logo { width:34px; height:34px; border-radius:10px; background:linear-gradient(135deg,var(--blue-500),var(--blue-700)); color:#fff; display:grid; place-items:center; font-size:18px; }
.topbar-title { font-weight:800; letter-spacing:.4px; font-size:15px; }
.topbar-actions { margin-left:auto; display:flex; align-items:center; gap:10px; }
.clock { font-weight:700; font-variant-numeric:tabular-nums; color:var(--blue-600); background:var(--blue-50); padding:8px 12px; border-radius:11px; font-size:14px; }
.notif-btn .notif-dot { position:absolute; top:7px; right:8px; width:9px; height:9px; background:var(--red); border-radius:50%; border:2px solid var(--surface-solid); }
.user-chip { display:flex; align-items:center; gap:9px; padding:5px 12px 5px 6px; border-radius:40px; background:var(--surface-solid); border:1px solid var(--line); }
.avatar { width:32px; height:32px; border-radius:50%; background:linear-gradient(135deg,var(--blue-400),var(--blue-600)); color:#fff; font-weight:700; display:grid; place-items:center; font-size:13px; }
.user-meta { display:flex; flex-direction:column; line-height:1.2; }
.user-name { font-weight:700; font-size:13px; }
.user-role { font-size:11px; color:var(--text-mute); text-transform:capitalize; }

.sidebar {
  position:fixed; top:var(--topbar-h); left:0; bottom:0; width:var(--sidebar-w); z-index:30;
  padding:18px 14px; display:flex; flex-direction:column;
  border-radius:0; border-top:0; border-bottom:0; border-left:0;
  transition:transform .28s cubic-bezier(.4,0,.2,1);
}
.nav { display:flex; flex-direction:column; gap:4px; flex:1; overflow-y:auto; }
.nav-item {
  display:flex; align-items:center; gap:12px; padding:12px 14px; border-radius:13px;
  color:var(--text-soft); font-weight:600; font-size:14.5px; border:1px solid transparent;
  transition:background .18s, color .18s;
}
.nav-item .ni-ico { font-size:18px; width:22px; text-align:center; }
.nav-item:hover { background:var(--blue-50); color:var(--blue-700); }
.nav-item.active { background:linear-gradient(135deg,var(--blue-500),var(--blue-600)); color:#fff; box-shadow:var(--shadow-btn); }
.nav-section { font-size:11px; text-transform:uppercase; letter-spacing:.8px; color:var(--text-mute); font-weight:700; padding:14px 14px 6px; }
.sidebar-foot { padding-top:12px; border-top:1px solid var(--line); }
.mini-note { font-size:11.5px; color:var(--text-mute); text-align:center; }

.scrim { display:none; position:fixed; inset:0; background:rgba(8,14,30,.45); z-index:25; }

.content {
  margin-left:var(--sidebar-w); padding:calc(var(--topbar-h) + 22px) 26px 40px;
  max-width:1400px;
}

/* ---------- Page header ---------- */
.page-head { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:22px; flex-wrap:wrap; }
.page-title { font-size:24px; font-weight:800; letter-spacing:-.3px; }
.page-sub { color:var(--text-mute); font-size:13.5px; margin-top:3px; }
.head-actions { display:flex; gap:10px; flex-wrap:wrap; }

/* ---------- Cards / grid ---------- */
.grid { display:grid; gap:var(--gap); }
.card { background:var(--surface); border:1px solid var(--glass-border); box-shadow:var(--glass-shadow); backdrop-filter:blur(16px) saturate(140%); -webkit-backdrop-filter:blur(16px) saturate(140%); border-radius:var(--radius); padding:20px; }
.card-solid { background:var(--surface-solid); }
.card-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; }
.card-title { font-weight:700; font-size:15.5px; }
.card-hint { font-size:12px; color:var(--text-mute); }

/* Stat cards */
.stats { grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); }
.stat { position:relative; overflow:hidden; }
.stat .stat-ico { position:absolute; right:14px; top:14px; font-size:26px; opacity:.28; }
.stat-label { font-size:12.5px; color:var(--text-mute); font-weight:600; }
.stat-value { font-size:30px; font-weight:800; margin-top:6px; letter-spacing:-.5px; }
.stat-delta { font-size:12px; margin-top:6px; font-weight:600; }
.stat-delta.up { color:var(--green); } .stat-delta.down { color:var(--red); }
.stat-bar-track { height:6px; background:var(--line); border-radius:6px; margin-top:12px; overflow:hidden; }
.stat-bar-fill { height:100%; border-radius:6px; background:linear-gradient(90deg,var(--blue-400),var(--blue-600)); transition:width .5s; }

/* ---------- Badges / status ---------- */
.badge { display:inline-flex; align-items:center; gap:5px; padding:4px 10px; border-radius:30px; font-size:11.5px; font-weight:700; }
.badge.green { background:var(--green-bg); color:var(--green); }
.badge.amber { background:var(--amber-bg); color:var(--amber); }
.badge.red { background:var(--red-bg); color:var(--red); }
.badge.blue { background:var(--blue-50); color:var(--blue-600); }
.badge.gray { background:var(--line); color:var(--text-soft); }
.dot { width:8px; height:8px; border-radius:50%; display:inline-block; }
.dot.green { background:var(--green); box-shadow:0 0 0 3px var(--green-bg); }
.dot.red { background:var(--red); box-shadow:0 0 0 3px var(--red-bg); }

/* ---------- Progress ---------- */
.progress { height:12px; border-radius:10px; background:var(--line); overflow:hidden; }
.progress > i { display:block; height:100%; border-radius:10px; background:linear-gradient(90deg,var(--blue-400),var(--blue-600)); transition:width .5s ease; }
.progress.green > i { background:linear-gradient(90deg,#3ddc97,#12b76a); }
.progress.amber > i { background:linear-gradient(90deg,#ffc65c,#f79009); }

/* Ring */
.ring-wrap { display:flex; align-items:center; gap:18px; }
.ring { position:relative; width:120px; height:120px; }
.ring .ring-label { position:absolute; inset:0; display:grid; place-items:center; text-align:center; }
.ring .ring-pct { font-size:26px; font-weight:800; }
.ring .ring-cap { font-size:11px; color:var(--text-mute); }

/* ---------- Table ---------- */
.table-wrap { overflow-x:auto; border-radius:var(--radius-sm); }
table.data { width:100%; border-collapse:collapse; font-size:13.5px; min-width:560px; }
table.data th, table.data td { padding:12px 12px; text-align:left; border-bottom:1px solid var(--line); white-space:nowrap; }
table.data th { font-size:11.5px; text-transform:uppercase; letter-spacing:.5px; color:var(--text-mute); font-weight:700; position:sticky; top:0; background:var(--surface-solid); }
table.data tbody tr { transition:background .15s; }
table.data tbody tr:hover { background:var(--blue-50); }
table.data td.num { font-variant-numeric:tabular-nums; }
.rank-badge { width:26px; height:26px; border-radius:8px; display:inline-grid; place-items:center; font-weight:800; font-size:12px; background:var(--line); color:var(--text-soft); }
.rank-badge.gold { background:linear-gradient(135deg,#ffd76e,#f5a623); color:#5a3d00; }
.rank-badge.silver { background:linear-gradient(135deg,#e2e8f0,#b7c0cf); color:#3a4051; }
.rank-badge.bronze { background:linear-gradient(135deg,#f0b088,#d0805a); color:#4a2410; }

/* ---------- Toolbar (search/filter) ---------- */
.toolbar { display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-bottom:16px; }
.search { position:relative; flex:1; min-width:180px; }
.search input { padding-left:38px; }
.search::before { content:"🔍"; position:absolute; left:12px; top:50%; transform:translateY(-50%); font-size:14px; opacity:.6; }
.seg { display:inline-flex; background:var(--surface-solid); border:1px solid var(--line); border-radius:12px; padding:3px; gap:2px; }
.seg button { border:none; background:transparent; color:var(--text-soft); padding:8px 14px; border-radius:9px; font-weight:600; font-size:13px; }
.seg button.active { background:linear-gradient(135deg,var(--blue-500),var(--blue-600)); color:#fff; }

/* ---------- Task rows (employee) ---------- */
.task-list { display:flex; flex-direction:column; gap:12px; }
.task-item { display:grid; grid-template-columns:auto 1fr auto; gap:14px; align-items:center; padding:14px 16px; border-radius:var(--radius-sm); background:var(--surface-solid); border:1px solid var(--line); transition:box-shadow .2s, transform .1s; }
.task-item:hover { box-shadow:var(--glass-shadow); }
.task-cat-ico { width:44px; height:44px; border-radius:12px; display:grid; place-items:center; font-size:20px; background:var(--blue-50); color:var(--blue-600); }
.task-main { min-width:0; }
.task-name { font-weight:700; font-size:14.5px; }
.task-meta { font-size:12px; color:var(--text-mute); margin-top:3px; display:flex; gap:10px; flex-wrap:wrap; }
.task-num { text-align:right; }
.task-num b { font-size:18px; } .task-num small { color:var(--text-mute); }
.task-actions { display:flex; gap:6px; }

/* quick category chips */
.chips { display:flex; gap:8px; flex-wrap:wrap; }
.chip { padding:9px 14px; border-radius:30px; border:1px solid var(--line-strong); background:var(--surface-solid); font-weight:600; font-size:13px; color:var(--text-soft); display:inline-flex; gap:7px; align-items:center; transition:.15s; }
.chip:hover { border-color:var(--blue-400); color:var(--blue-600); background:var(--blue-50); }

/* ---------- Modal ---------- */
.modal-host { position:fixed; inset:0; z-index:60; display:grid; place-items:center; padding:18px; }
.modal-scrim { position:absolute; inset:0; background:rgba(8,14,30,.5); backdrop-filter:blur(3px); }
.modal { position:relative; width:100%; max-width:520px; max-height:90vh; overflow:auto; border-radius:var(--radius-lg); padding:24px; }
.modal-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; }
.modal-head h3 { margin:0; font-size:18px; font-weight:800; }
.modal-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.modal-foot { display:flex; gap:10px; justify-content:flex-end; margin-top:20px; }

/* ---------- Toast ---------- */
.toast-host { position:fixed; bottom:20px; right:20px; z-index:80; display:flex; flex-direction:column; gap:10px; }
.toast { background:var(--surface-solid); border:1px solid var(--line-strong); border-left:4px solid var(--blue-500); box-shadow:var(--glass-shadow); padding:13px 16px; border-radius:12px; font-size:14px; font-weight:600; min-width:220px; max-width:340px; animation:toastIn .3s ease; }
.toast.success { border-left-color:var(--green); }
.toast.error { border-left-color:var(--red); }
.toast.warn { border-left-color:var(--amber); }
@keyframes toastIn { from { opacity:0; transform:translateX(30px); } }

/* ---------- Notification panel ---------- */
.notif-panel { position:fixed; top:calc(var(--topbar-h) + 6px); right:16px; width:340px; max-width:calc(100vw - 24px); max-height:70vh; overflow:auto; z-index:70; border-radius:var(--radius); padding:14px; }
.notif-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.notif-list { display:flex; flex-direction:column; gap:8px; }
.notif-card { padding:11px 13px; border-radius:12px; background:var(--surface-solid); border:1px solid var(--line); border-left:3px solid var(--blue-500); }
.notif-card.warn { border-left-color:var(--amber); } .notif-card.red { border-left-color:var(--red); } .notif-card.green { border-left-color:var(--green); }
.notif-card .nt { font-weight:700; font-size:13px; }
.notif-card .nb { font-size:12.5px; color:var(--text-soft); margin-top:2px; }
.notif-card .nx { font-size:11px; color:var(--text-mute); margin-top:4px; }
.empty { text-align:center; color:var(--text-mute); padding:26px 10px; font-size:13.5px; }

/* ---------- WhatsApp preview ---------- */
.wa-preview { background:#0b141a; color:#e9edef; border-radius:16px; padding:16px; font-size:13px; line-height:1.55; white-space:pre-wrap; font-family:ui-monospace,Menlo,Consolas,monospace; max-height:420px; overflow:auto; }
[data-theme="dark"] .wa-preview { border:1px solid var(--line); }

/* ---------- misc ---------- */
.row { display:flex; gap:12px; flex-wrap:wrap; align-items:center; }
.spread { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.muted { color:var(--text-mute); }
.mt { margin-top:16px; } .mb { margin-bottom:16px; }
.text-c { text-align:center; }
.kv { display:flex; justify-content:space-between; padding:8px 0; border-bottom:1px dashed var(--line); font-size:13.5px; }
.kv:last-child { border-bottom:0; }
.kv b { font-weight:700; }
.legend { display:flex; flex-wrap:wrap; gap:12px; margin-top:12px; }
.legend span { display:inline-flex; align-items:center; gap:6px; font-size:12.5px; color:var(--text-soft); }
.legend i { width:11px; height:11px; border-radius:3px; display:inline-block; }
.hgrid-2 { grid-template-columns:1.4fr 1fr; }
.hgrid-3 { grid-template-columns:repeat(3,1fr); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width:1000px) {
  .hgrid-2, .hgrid-3 { grid-template-columns:1fr; }
}
@media (max-width:860px) {
  :root { --sidebar-w:260px; }
  .menu-toggle { display:inline-flex; }
  .sidebar { transform:translateX(-100%); box-shadow:var(--glass-shadow); }
  .app.nav-open .sidebar { transform:translateX(0); }
  .app.nav-open .scrim { display:block; }
  .content { margin-left:0; padding:calc(var(--topbar-h) + 16px) 14px 34px; }
  .user-meta { display:none; }
  .user-chip { padding:5px; }
  .clock { display:none; }
  .topbar-title { display:none; }
}
@media (max-width:560px) {
  .page-title { font-size:20px; }
  .stat-value { font-size:26px; }
  .modal-grid { grid-template-columns:1fr; }
  .task-item { grid-template-columns:auto 1fr; }
  .task-num { grid-column:2; text-align:left; }
  .task-actions { grid-column:1 / -1; }
  .head-actions .btn span.lbl { display:none; }
}
