/* ═══════════════════════════════════════════════════════════════
   iRepair Pro — Dark Gamer Luxury Theme
   โทนมืด + นีออนเขียวมรกต/ไซแอน + glassmorphism + glow
   ═══════════════════════════════════════════════════════════════ */

:root {
    /* ── Base (dark) ── */
    --bg-0:      #070b12;          /* พื้นนอกสุด */
    --bg-1:      #0c1220;          /* พื้นเนื้อหา */
    --bg-2:      #121a2b;          /* การ์ด */
    --bg-3:      #18233a;          /* การ์ดยก */
    --surface:   rgba(22, 32, 53, .72);
    --surface-2: rgba(30, 43, 70, .55);
    --line:      rgba(120, 150, 200, .14);
    --line-2:    rgba(120, 150, 200, .26);

    /* ── Ink ── */
    --ink:       #eaf2ff;
    --ink-2:     #aebed9;
    --ink-3:     #6b7d9e;

    /* ── Theme accent (emerald default) ── */
    --acc:       #10b981;
    --acc-2:     #34d399;
    --acc-3:     #6ee7b7;
    --acc-glow:  rgba(16, 185, 129, .45);
    --acc-soft:  rgba(16, 185, 129, .14);
    --acc-ink:   #052e23;

    /* ── Status palette ── */
    --c-sky:#38bdf8; --c-violet:#a78bfa; --c-amber:#fbbf24; --c-cyan:#22d3ee;
    --c-indigo:#818cf8; --c-pink:#f472b6; --c-emerald:#34d399; --c-green:#4ade80;
    --c-rose:#fb7185; --c-slate:#94a3b8; --c-red:#ef4444;

    --radius:   16px;
    --radius-sm:11px;
    --radius-lg:22px;
    --shadow:   0 18px 50px -18px rgba(0,0,0,.7);
    --shadow-sm:0 8px 24px -12px rgba(0,0,0,.6);
    --glow:     0 0 0 1px var(--acc-soft), 0 14px 40px -14px var(--acc-glow);
    --ease:     cubic-bezier(.4, .14, .3, 1);
    --sidebar-w:268px;
}

/* ── Theme variants ── */
[data-theme="cyan"]   { --acc:#06b6d4; --acc-2:#22d3ee; --acc-3:#67e8f9; --acc-glow:rgba(34,211,238,.45); --acc-soft:rgba(34,211,238,.14); --acc-ink:#053345; }
[data-theme="violet"] { --acc:#8b5cf6; --acc-2:#a78bfa; --acc-3:#c4b5fd; --acc-glow:rgba(139,92,246,.45); --acc-soft:rgba(139,92,246,.14); --acc-ink:#2e1065; }
[data-theme="amber"]  { --acc:#f59e0b; --acc-2:#fbbf24; --acc-3:#fcd34d; --acc-glow:rgba(245,158,11,.45); --acc-soft:rgba(245,158,11,.14); --acc-ink:#451a03; }
[data-theme="rose"]   { --acc:#f43f5e; --acc-2:#fb7185; --acc-3:#fda4af; --acc-glow:rgba(244,63,94,.45); --acc-soft:rgba(244,63,94,.14); --acc-ink:#4c0519; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: 'Sarabun', 'Kanit', system-ui, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(1100px 600px at 12% -8%, rgba(16,185,129,.10), transparent 60%),
        radial-gradient(900px 600px at 105% 10%, rgba(34,211,238,.08), transparent 55%),
        var(--bg-0);
    min-height: 100dvh;
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4,h5,.font-display { font-family: 'Kanit', system-ui, sans-serif; font-weight: 600; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--acc-glow); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(120,150,200,.22); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(120,150,200,.4); background-clip: padding-box; }

/* ═══════════ APP SHELL ═══════════ */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100dvh; }

/* ── Sidebar ── */
.sidebar {
    position: sticky; top: 0; align-self: start; height: 100dvh;
    background: linear-gradient(180deg, #0a1020, #070b14 70%);
    border-right: 1px solid var(--line);
    display: flex; flex-direction: column;
    overflow-y: auto; z-index: 40;
}
.sb-head { padding: 20px 18px 14px; }
.sb-brand { display: flex; align-items: center; gap: 12px; }
.sb-logo {
    width: 46px; height: 46px; border-radius: 14px; flex: none;
    display: grid; place-items: center; font-size: 23px; color: #fff;
    background: linear-gradient(135deg, var(--acc), var(--acc-2));
    box-shadow: var(--glow); position: relative;
}
.sb-logo::after { content:""; position:absolute; inset:-4px; border-radius:18px; background:var(--acc-glow); filter:blur(14px); opacity:.5; z-index:-1; }
.sb-brand-text strong { display: block; font-family:'Kanit'; font-size: 17px; letter-spacing:.3px; }
.sb-brand-text span { font-size: 11.5px; color: var(--ink-3); }

.sb-clock {
    margin: 6px 14px 4px; padding: 12px 14px; border-radius: 14px;
    background: var(--surface); border: 1px solid var(--line);
    backdrop-filter: blur(10px);
}
.sb-clock .t { font-family:'Kanit'; font-size: 26px; font-weight: 700; letter-spacing: 1px;
    font-variant-numeric: tabular-nums; color: var(--acc-2); text-shadow: 0 0 18px var(--acc-glow); }
.sb-clock .d { font-size: 12px; color: var(--ink-2); }

.sb-user { margin: 8px 14px 6px; padding: 10px 12px; border-radius: 14px;
    background: var(--surface); border: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.sb-nav { padding: 8px 10px 90px; flex: 1; }
.sb-group { margin-top: 16px; }
.sb-group-title { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase;
    color: var(--ink-3); padding: 0 12px 7px; display: flex; align-items: center; gap: 7px; font-weight: 700; }
.sb-group-title::before { content:""; width: 6px; height: 6px; border-radius: 50%;
    background: var(--acc); box-shadow: 0 0 8px var(--acc-glow); }
.sb-link {
    display: flex; align-items: center; gap: 12px; padding: 10px 13px; border-radius: 11px;
    color: var(--ink-2); font-size: 14.5px; position: relative; margin-bottom: 2px;
    transition: all .2s var(--ease);
}
.sb-link i { font-size: 18px; width: 22px; text-align: center; }
.sb-link:hover { background: var(--surface-2); color: var(--ink); }
.sb-link.active {
    background: linear-gradient(90deg, var(--acc-soft), transparent);
    color: #fff;
}
.sb-link.active::before { content:""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px;
    border-radius: 0 4px 4px 0; background: linear-gradient(var(--acc), var(--acc-2)); box-shadow: 0 0 12px var(--acc-glow); }
.sb-link.active i { color: var(--acc-2); }
.sb-badge { margin-left: auto; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 99px;
    background: var(--c-rose); color: #fff; }

/* ── Main ── */
.main { display: flex; flex-direction: column; min-width: 0; }
.navbar {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; gap: 14px;
    padding: 13px 22px;
    background: rgba(8,12,20,.78); backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
}
.nav-pageicon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
    font-size: 20px; color: var(--acc-2); background: var(--acc-soft); border: 1px solid var(--line); }
.nav-title strong { font-family:'Kanit'; font-size: 17px; display: block; line-height: 1.2; }
.nav-title span { font-size: 12px; color: var(--ink-3); }
.nav-spacer { flex: 1; }
.nav-search { position: relative; max-width: 280px; flex: 1; display: none; }
.nav-search input { width: 100%; padding: 9px 14px 9px 38px; border-radius: 11px; }
.nav-search i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
@media (min-width: 980px) { .nav-search { display: block; } }
.pill {
    display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 99px;
    background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--ink-2);
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--acc-2); box-shadow: 0 0 8px var(--acc-2); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }
.icon-btn { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; cursor: pointer;
    background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); position: relative; transition: all .2s var(--ease); }
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); transform: translateY(-1px); }
.icon-btn .dotbadge { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--c-rose); box-shadow: 0 0 0 2px var(--bg-1); }

.content { padding: 22px; flex: 1; }
@media (max-width: 720px) { .content { padding: 14px; } }

/* ── Avatar ── */
.avatar { border-radius: 50%; flex: none; display: grid; place-items: center; font-family:'Kanit'; font-weight: 600;
    color: #fff; background: linear-gradient(135deg, var(--acc), var(--acc-2)); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 36px; height: 36px; font-size: 14px; }
.avatar.md { width: 44px; height: 44px; font-size: 16px; }
.avatar.lg { width: 64px; height: 64px; font-size: 24px; }

/* ── Role chips ── */
.role-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 11px; border-radius: 99px;
    font-size: 11.5px; font-weight: 700; font-family:'Kanit'; }
.role-chip i { font-size: 12px; }
.role-chip-admin      { background: linear-gradient(135deg,#fde68a,#fbbf24); color:#78350f; }
.role-chip-manager    { background: linear-gradient(135deg,#bfdbfe,#60a5fa); color:#1e3a8a; }
.role-chip-technician { background: linear-gradient(135deg,#a7f3d0,#34d399); color:#065f46; }
.role-chip-frontdesk  { background: linear-gradient(135deg,#ddd6fe,#a78bfa); color:#4c1d95; }

/* ═══════════ CARDS ═══════════ */
.card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    backdrop-filter: blur(14px); box-shadow: var(--shadow-sm);
}
.card-pad { padding: 18px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.card-head h3 { margin: 0; font-size: 15.5px; }
.card-head .ci { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
    background: var(--acc-soft); color: var(--acc-2); font-size: 16px; }

/* ── KPI strip ── */
.kpi-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
@media (max-width: 1200px){ .kpi-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 620px) { .kpi-grid { grid-template-columns: repeat(2,1fr); gap: 10px; } }
.kpi {
    position: relative; overflow: hidden; padding: 16px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    backdrop-filter: blur(14px); transition: transform .25s var(--ease), border-color .25s;
}
.kpi:hover { transform: translateY(-3px); border-color: var(--line-2); }
.kpi::before { content:""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg,var(--k1,var(--acc)),var(--k2,var(--acc-2))); }
.kpi-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px;
    background: linear-gradient(135deg, var(--k1,var(--acc)), var(--k2,var(--acc-2))); color: #04121e; box-shadow: 0 8px 20px -8px var(--k1, var(--acc-glow)); }
.kpi-val { font-family:'Kanit'; font-size: 28px; font-weight: 700; line-height: 1.1; margin-top: 10px; font-variant-numeric: tabular-nums; }
.kpi-label { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.kpi-delta { font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 3px; margin-top: 6px; }
.kpi-delta.up { color: var(--c-emerald); } .kpi-delta.down { color: var(--c-rose); }
.kpi-spark { position: absolute; right: 10px; bottom: 8px; width: 64px; height: 26px; opacity: .8; }

/* ── Status badges ── */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600;
    background: color-mix(in srgb, var(--bc, var(--c-slate)) 16%, transparent); color: var(--bc, var(--c-slate));
    border: 1px solid color-mix(in srgb, var(--bc, var(--c-slate)) 32%, transparent); }
.badge i { font-size: 12px; }
.badge.sky{--bc:var(--c-sky)} .badge.violet{--bc:var(--c-violet)} .badge.amber{--bc:var(--c-amber)}
.badge.cyan{--bc:var(--c-cyan)} .badge.indigo{--bc:var(--c-indigo)} .badge.pink{--bc:var(--c-pink)}
.badge.emerald{--bc:var(--c-emerald)} .badge.green{--bc:var(--c-green)} .badge.rose{--bc:var(--c-rose)}
.badge.slate{--bc:var(--c-slate)} .badge.red{--bc:var(--c-red)}

/* ═══════════ BUTTONS ═══════════ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
    padding: 10px 18px; border-radius: 12px; font-family:'Kanit'; font-size: 14.5px; font-weight: 500;
    border: 1px solid transparent; transition: all .2s var(--ease); position: relative; overflow: hidden; user-select: none; }
.btn i { font-size: 16px; }
.btn-primary { background: linear-gradient(135deg, var(--acc), var(--acc-2)); color: #04121e; box-shadow: 0 10px 26px -10px var(--acc-glow); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 32px -10px var(--acc-glow); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--line-2); transform: translateY(-1px); }
.btn-danger { background: linear-gradient(135deg,#f43f5e,#ef4444); color: #fff; box-shadow: 0 10px 26px -10px rgba(244,63,94,.5); }
.btn-danger:hover { transform: translateY(-1px); }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn .ripple { position: absolute; border-radius: 50%; transform: scale(0); background: rgba(255,255,255,.4); animation: ripple .6s linear; pointer-events: none; }
@keyframes ripple { to { transform: scale(3.2); opacity: 0; } }

/* ═══════════ FORMS ═══════════ */
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; font-weight: 500; }
.field > label .req { color: var(--c-rose); }
input, select, textarea, .input {
    width: 100%; padding: 11px 14px; border-radius: 11px; font-family: inherit; font-size: 14.5px;
    background: rgba(8,13,22,.6); border: 1px solid var(--line); color: var(--ink); transition: all .18s var(--ease);
}
textarea { resize: vertical; min-height: 92px; }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); background: rgba(8,13,22,.85); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%236b7d9e' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--c-rose); box-shadow: 0 0 0 3px rgba(251,113,133,.18); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
@media (max-width: 640px){ .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.shake { animation: shake .4s; }
@keyframes shake { 0%,100%{transform:translateX(0)} 20%,60%{transform:translateX(-7px)} 40%,80%{transform:translateX(7px)} }

/* ── Section title ── */
.sec-title { display: flex; align-items: center; gap: 9px; font-family:'Kanit'; font-size: 15px; font-weight: 600; margin: 0 0 14px; }
.sec-title i { color: var(--acc-2); }

/* ═══════════ TABLE ═══════════ */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table thead th { text-align: left; padding: 11px 14px; color: var(--ink-3); font-weight: 600; font-size: 12px;
    text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table tbody td { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.data-table tbody tr { transition: background .15s; }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table tbody tr:last-child td { border-bottom: none; }
@media (max-width: 768px) {
    .data-table thead { display: none; }
    .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; }
    .data-table tr { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
    .data-table td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); text-align: right; }
    .data-table td:last-child { border-bottom: none; }
    .data-table td::before { content: attr(data-label); font-weight: 600; color: var(--ink-3); font-size: 12px; text-align: left; }
}

/* ═══════════ TOOLBAR / CHIPS ═══════════ */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.chip-group { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.chip { padding: 7px 14px; border-radius: 9px; font-size: 13px; color: var(--ink-2); cursor: pointer; transition: all .18s; white-space: nowrap; }
.chip:hover { color: var(--ink); }
.chip.active { background: linear-gradient(135deg,var(--acc),var(--acc-2)); color: #04121e; font-weight: 600; }

/* ═══════════ CARD GRID (jobs etc) ═══════════ */
.auto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 14px; }
.job-card { padding: 16px; cursor: pointer; transition: transform .22s var(--ease), border-color .22s; }
.job-card:hover { transform: translateY(-3px); border-color: var(--acc); box-shadow: var(--glow); }
.job-card .jc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.job-card .jc-no { font-family:'Kanit'; font-weight: 600; font-size: 14px; color: var(--acc-2); }
.job-card .jc-device { font-family:'Kanit'; font-size: 16px; font-weight: 600; margin: 8px 0 2px; }
.job-card .jc-meta { font-size: 12.5px; color: var(--ink-3); }
.job-card .jc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }

/* ═══════════ SKELETON ═══════════ */
.skeleton { background: linear-gradient(90deg, var(--bg-2) 25%, var(--bg-3) 37%, var(--bg-2) 63%); background-size: 400% 100%;
    animation: sk 1.4s ease infinite; border-radius: 10px; }
@keyframes sk { 0%{background-position:100% 0} 100%{background-position:-100% 0} }

/* ═══════════ MODAL ═══════════ */
.modal { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; padding: 18px; }
.modal.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4,8,14,.7); backdrop-filter: blur(6px); animation: fade .25s; }
@keyframes fade { from{opacity:0} to{opacity:1} }
.modal-card { position: relative; width: 100%; max-width: 720px; max-height: 90vh; overflow-y: auto;
    background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius-lg); box-shadow: var(--shadow); animation: pop .3s var(--ease); }
@keyframes pop { from{opacity:0; transform: translateY(18px) scale(.97)} to{opacity:1; transform:none} }
.modal-header { padding: 22px; background: linear-gradient(135deg, var(--acc-soft), transparent); border-bottom: 1px solid var(--line); position: relative; }
.modal-close { position: absolute; top: 16px; right: 16px; }
.modal-body { padding: 22px; }
.modal-foot { padding: 16px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 540px) {
    .modal { align-items: flex-end; padding: 0; }
    .modal-card { max-width: 100%; max-height: 92vh; border-radius: 22px 22px 0 0; animation: sheet .3s var(--ease); }
    @keyframes sheet { from{transform:translateY(100%)} to{transform:none} }
}

/* mini stat in modal */
.mini-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.mini-stat { padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); text-align: center; }
.mini-stat .v { font-family:'Kanit'; font-size: 20px; font-weight: 700; }
.mini-stat .l { font-size: 11.5px; color: var(--ink-3); }

/* ═══════════ QC CHECKLIST ═══════════ */
.qc-list { display: flex; flex-direction: column; gap: 6px; }
.qc-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.qc-item .qc-name { flex: 1; font-size: 13.5px; }
.qc-seg { display: inline-flex; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.qc-seg button { padding: 4px 10px; font-size: 12px; background: transparent; border: none; color: var(--ink-3); cursor: pointer; font-family:'Kanit'; }
.qc-seg button.on[data-v="ok"] { background: var(--c-emerald); color: #04121e; }
.qc-seg button.on[data-v="fail"] { background: var(--c-rose); color: #fff; }
.qc-seg button.on[data-v="na"] { background: var(--c-slate); color: #04121e; }

/* ═══════════ TIMELINE ═══════════ */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content:""; position: absolute; left: 8px; top: 4px; bottom: 4px; width: 2px; background: var(--line-2); }
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item::before { content:""; position: absolute; left: -22px; top: 3px; width: 12px; height: 12px; border-radius: 50%;
    background: var(--acc); box-shadow: 0 0 0 3px var(--bg-2), 0 0 10px var(--acc-glow); }
.tl-item .tl-t { font-size: 12px; color: var(--ink-3); }

/* ═══════════ PROGRESS WORKFLOW ═══════════ */
.flow { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 4px; }
.flow-step { flex: 1; min-width: 84px; text-align: center; position: relative; padding-top: 22px; font-size: 11px; color: var(--ink-3); }
.flow-step::before { content:""; position: absolute; top: 6px; left: 50%; width: 14px; height: 14px; border-radius: 50%; transform: translateX(-50%);
    background: var(--bg-3); border: 2px solid var(--line-2); }
.flow-step::after { content:""; position: absolute; top: 12px; left: 50%; right: -50%; height: 2px; background: var(--line-2); z-index: -1; }
.flow-step:last-child::after { display: none; }
.flow-step.done { color: var(--acc-2); }
.flow-step.done::before { background: var(--acc); border-color: var(--acc); box-shadow: 0 0 10px var(--acc-glow); }
.flow-step.current::before { background: var(--acc-2); border-color: var(--acc-2); animation: pulse 1.6s infinite; }

/* ═══════════ EMPTY STATE ═══════════ */
.empty { text-align: center; padding: 50px 20px; color: var(--ink-3); }
.empty i { font-size: 52px; opacity: .4; display: block; margin-bottom: 12px; }
.empty h4 { color: var(--ink-2); margin: 0 0 6px; font-size: 16px; }

/* ═══════════ FOOTER ═══════════ */
.footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    padding: 16px 22px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 12.5px; }
.footer .dev { display: flex; align-items: center; gap: 10px; }
.footer .dev img { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--acc); box-shadow: 0 0 12px var(--acc-glow); object-fit: cover; }
.ver-pill { padding: 2px 9px; border-radius: 99px; background: var(--acc-soft); color: var(--acc-2); font-weight: 700; font-size: 11px; }
@media (max-width: 540px){ .footer { flex-direction: column-reverse; text-align: center; } }

/* ═══════════ SVG CHARTS ═══════════ */
.chart-svg { width: 100%; height: auto; display: block; }
.donut-legend { display: flex; flex-direction: column; gap: 8px; }
.donut-legend .dl { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.donut-legend .dot { width: 11px; height: 11px; border-radius: 3px; }

/* utility */
.muted { color: var(--ink-3); }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.mt-0{margin-top:0}.mt-2{margin-top:14px}.mt-3{margin-top:22px}.mb-0{margin-bottom:0}
.text-acc { color: var(--acc-2); }
.fade-in { animation: fade .4s var(--ease); }
.stagger > * { animation: rise .5s var(--ease) both; }
.stagger > *:nth-child(1){animation-delay:.04s}.stagger > *:nth-child(2){animation-delay:.10s}
.stagger > *:nth-child(3){animation-delay:.16s}.stagger > *:nth-child(4){animation-delay:.22s}
.stagger > *:nth-child(5){animation-delay:.28s}.stagger > *:nth-child(6){animation-delay:.34s}
@keyframes rise { from{opacity:0; transform: translateY(14px)} to{opacity:1; transform:none} }

/* ═══════════ SIDEBAR TOGGLE (mobile) ═══════════ */
.sb-toggle { display: none; }
.sb-backdrop { display: none; }
@media (max-width: 980px) {
    .app { grid-template-columns: 1fr; }
    .sidebar { position: fixed; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform .3s var(--ease); }
    .sidebar.open { transform: none; box-shadow: var(--shadow); }
    .sb-toggle { display: grid; }
    .sb-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 39; }
}

/* ═══════════ MOBILE BOTTOM NAV ═══════════ */
.bottom-nav { display: none; }
@media (max-width: 720px) {
    .content { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
    .bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
        background: rgba(10,15,25,.96); backdrop-filter: blur(20px); border-top: 1px solid var(--line);
        padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; align-items: center; }
    .bn-item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 10px; min-width: 56px; min-height: 44px;
        color: var(--ink-3); font-size: 10.5px; position: relative; }
    .bn-item.active { color: var(--acc-2); }
    .bn-item i { font-size: 20px; }
    .bn-fab { margin-top: -24px; }
    .bn-fab .fab { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 24px;
        background: linear-gradient(135deg,var(--acc),var(--acc-2)); color: #04121e; border: 4px solid var(--bg-0); box-shadow: 0 8px 20px var(--acc-glow); }
}

/* ═══════════ THEME PICKER ═══════════ */
.theme-dots { display: inline-flex; gap: 6px; }
.theme-dots button { width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.theme-dots button.active { border-color: #fff; box-shadow: 0 0 10px rgba(255,255,255,.4); }
.td-emerald{background:#10b981}.td-cyan{background:#06b6d4}.td-violet{background:#8b5cf6}.td-amber{background:#f59e0b}.td-rose{background:#f43f5e}

@media print {
    .sidebar, .navbar, .footer, .bottom-nav, .sd-no-print { display: none !important; }
    body { background: #fff; color: #000; }
    .content { padding: 0; }
}
