:root {
    --accent: #06b6d4;
    --accent-2: #0ea5e9;
    --accent-glow: rgba(6, 182, 212, 0.35);
    --radius: 18px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);

    /* status colours (theme-independent) */
    --ok: #10b981;        --ok-bg: rgba(16, 185, 129, 0.12);
    --warn: #f59e0b;      --warn-bg: rgba(245, 158, 11, 0.12);
    --danger: #ef4444;    --danger-bg: rgba(239, 68, 68, 0.12);
}

[data-theme="dark"] {
    --bg: #0a0f1a;
    --bg-2: #0e1626;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-hover: rgba(255, 255, 255, 0.07);
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.7);
    --grid: rgba(255, 255, 255, 0.025);
}

[data-theme="light"] {
    --bg: #eef2f7;
    --bg-2: #f8fafc;
    --surface: rgba(255, 255, 255, 0.85);
    --surface-hover: #ffffff;
    --border: rgba(15, 23, 42, 0.08);
    --border-strong: rgba(15, 23, 42, 0.14);
    --text: #0f172a;
    --text-muted: #64748b;
    --shadow: 0 20px 45px -15px rgba(15, 23, 42, 0.25);
    --grid: rgba(15, 23, 42, 0.03);
}

[data-theme="premium"] {
    --accent: #fb923c;
    --accent-2: #f97316;
    --accent-glow: rgba(249, 115, 22, 0.38);
    --bg: #0a0805;
    --bg-2: #161009;
    --surface: rgba(255, 255, 255, 0.035);
    --surface-hover: rgba(251, 146, 60, 0.07);
    --border: rgba(251, 146, 60, 0.12);
    --border-strong: rgba(251, 146, 60, 0.28);
    --text: #faf4ec;
    --text-muted: #a89880;
    --shadow: 0 22px 55px -12px rgba(0, 0, 0, 0.85);
    --grid: rgba(251, 146, 60, 0.035);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* ---------- Theme-matched scrollbars ---------- */
* { scrollbar-width: thin; scrollbar-color: var(--accent) transparent; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--accent), var(--accent-2));
    border-radius: 99px;
    border: 3px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { filter: brightness(1.15); }
::-webkit-scrollbar-corner { background: var(--bg); }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 0.5s var(--ease), color 0.5s var(--ease);
    -webkit-font-smoothing: antialiased;
}

.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 75%);
    pointer-events: none;
    z-index: 0;
}
.bg-glow {
    position: fixed;
    top: -25%;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 700px;
    background: radial-gradient(circle, var(--accent-glow), transparent 60%);
    filter: blur(40px);
    opacity: 0.6;
    pointer-events: none;
    z-index: 0;
}

/* ---------- Brand mark ---------- */
.brand-mark { display: inline-flex; align-items: center; gap: 14px; }
.brand-logo {
    width: 56px; height: 56px;
    border-radius: 16px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 10px 30px -6px var(--accent-glow);
    flex-shrink: 0;
}
.brand-logo svg { width: 32px; height: 32px; stroke: #fff; }
.brand-text { line-height: 1; }
.brand-text .name {
    font-size: 1.6rem; font-weight: 900; letter-spacing: 0.04em;
}
.brand-text .name span { color: var(--accent); }
.brand-text .sub {
    font-size: 0.7rem; font-weight: 600; letter-spacing: 0.42em;
    color: var(--text-muted); text-transform: uppercase; margin-top: 6px;
}

/* ---------- Screens ---------- */
.screen {
    position: fixed; inset: 0;
    display: flex; align-items: center; justify-content: center;
    z-index: 2;
    opacity: 0; visibility: hidden;
    transition: opacity 0.6s var(--ease), visibility 0.6s var(--ease);
}
.screen.active { opacity: 1; visibility: visible; }

/* ---------- Splash ---------- */
#splash { flex-direction: column; gap: 40px; background: var(--bg); z-index: 50; }
#splash .splash-brand { transform: scale(1.25); opacity: 0; animation: splashIn 1s var(--ease) 0.15s forwards; }
.splash-bar {
    width: 200px; height: 4px; border-radius: 99px;
    background: var(--border); overflow: hidden;
    opacity: 0; animation: fadeIn 0.5s ease 0.8s forwards;
}
.splash-bar i {
    display: block; height: 100%; width: 0;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border-radius: 99px;
    animation: load 1.8s var(--ease) 0.9s forwards;
}
@keyframes splashIn { to { transform: scale(1); opacity: 1; } }
@keyframes load { to { width: 100%; } }
@keyframes fadeIn { to { opacity: 1; } }

/* ---------- Login ---------- */
.card {
    position: relative;
    width: 100%; max-width: 410px;
    margin: 24px;
    padding: 40px 36px;
    background: var(--surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
}
.login-head { text-align: center; margin-bottom: 30px; }
.login-head .brand-mark { flex-direction: column; gap: 16px; }
.login-head h2 { font-size: 1.3rem; font-weight: 700; margin-top: 22px; }
.login-head p { color: var(--text-muted); font-size: 0.88rem; margin-top: 6px; }

.field { margin-bottom: 16px; }
.field label {
    display: block; font-size: 0.78rem; font-weight: 600;
    color: var(--text-muted); margin-bottom: 8px; letter-spacing: 0.02em;
}
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap svg {
    position: absolute; left: 14px; width: 18px; height: 18px;
    stroke: var(--text-muted); pointer-events: none;
}
.field input {
    width: 100%;
    padding: 13px 14px 13px 44px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 0.95rem; font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.field input::placeholder { color: var(--text-muted); opacity: 0.6; }

/* remember-me row + switch */
.remember-row {
    display: flex; align-items: center; justify-content: space-between;
    margin: 4px 0 20px;
}
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track {
    width: 40px; height: 23px; border-radius: 99px;
    background: var(--bg-2); border: 1px solid var(--border-strong);
    position: relative; transition: background 0.25s, border-color 0.25s;
    flex-shrink: 0;
}
.switch .track::after {
    content: ''; position: absolute; top: 2px; left: 2px;
    width: 17px; height: 17px; border-radius: 50%;
    background: var(--text-muted);
    transition: transform 0.25s var(--ease), background 0.25s;
}
.switch input:checked + .track {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-color: transparent;
}
.switch input:checked + .track::after { transform: translateX(17px); background: #fff; }
.switch .switch-label { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); }
.login-link { font-size: 0.8rem; font-weight: 600; color: var(--accent); cursor: pointer; }

.btn-primary {
    width: 100%; margin-top: 0;
    padding: 14px;
    border: none; border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff; font-size: 0.98rem; font-weight: 700; font-family: inherit;
    cursor: pointer;
    box-shadow: 0 10px 24px -8px var(--accent-glow);
    transition: transform 0.15s var(--ease), box-shadow 0.2s, filter 0.2s;
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.07); }
.btn-primary:active { transform: translateY(0); }

.login-error {
    display: none;
    margin-bottom: 16px; padding: 11px 14px;
    background: var(--danger-bg);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #f87171; border-radius: 10px;
    font-size: 0.85rem; font-weight: 500;
    align-items: center; gap: 8px;
}
.login-error.show { display: flex; animation: shake 0.4s; }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-6px)} 75%{transform:translateX(6px)} }

.login-hint {
    text-align: center; margin-top: 22px; line-height: 1.9;
    font-size: 0.78rem; color: var(--text-muted);
}
.login-hint code {
    background: var(--bg-2); border: 1px solid var(--border);
    padding: 2px 7px; border-radius: 6px; color: var(--accent);
    font-size: 0.78rem;
}

/* ---------- Shared app shell (owner + staff) ---------- */
.app-screen { display: block; overflow-y: auto; padding: 0; }
.topbar {
    position: sticky; top: 0; z-index: 10;
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px;
    padding: 16px 28px;
    background: var(--surface);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
.topbar .brand-text .name { font-size: 1.15rem; }
.topbar .brand-logo { width: 42px; height: 42px; border-radius: 12px; }
.topbar .brand-logo svg { width: 24px; height: 24px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
    width: 42px; height: 42px;
    display: grid; place-items: center;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 12px; cursor: pointer; color: var(--text);
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.icon-btn:hover { background: var(--surface-hover); border-color: var(--border-strong); transform: translateY(-1px); }
.icon-btn svg { width: 20px; height: 20px; stroke: currentColor; }
.icon-btn.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-color: transparent; color: #fff;
    box-shadow: 0 8px 20px -8px var(--accent-glow);
}
.icon-btn.active:hover { filter: brightness(1.08); }
.icon-btn.danger:hover { border-color: var(--danger); color: var(--danger); }

.user-chip {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 14px 6px 6px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 99px; font-size: 0.85rem; font-weight: 600;
}
.user-chip .avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 0.8rem;
}
.user-chip .uname-wrap { display: flex; flex-direction: column; line-height: 1.15; }
.user-chip .urole { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--text-muted); }

/* ---------- Owner dashboard ---------- */
.dash-body { max-width: 1180px; margin: 0 auto; padding: 40px 28px 80px; }
.dash-hero { margin-bottom: 32px; }
.dash-hero h1 { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; }
.dash-hero h1 .accent { color: var(--accent); }
.dash-hero p { color: var(--text-muted); margin-top: 8px; font-size: 0.95rem; }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 18px;
}

.tile {
    position: relative;
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    overflow: hidden;
    text-align: left;
    font-family: inherit; color: var(--text);
    transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s, box-shadow 0.3s;
    opacity: 0; transform: translateY(16px);
    animation: tileIn 0.5s var(--ease) forwards;
}
@keyframes tileIn { to { opacity: 1; transform: translateY(0); } }
.tile::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 50% 0%, var(--accent-glow), transparent 70%);
    opacity: 0; transition: opacity 0.35s;
}
.tile:hover {
    transform: translateY(-5px);
    border-color: var(--border-strong);
    background: var(--surface-hover);
    box-shadow: var(--shadow);
}
.tile:hover::after { opacity: 0.5; }
.tile:hover .tile-icon { transform: scale(1.06) rotate(-3deg); }

.tile-icon {
    position: relative; z-index: 1;
    width: 54px; height: 54px;
    display: grid; place-items: center;
    border-radius: 14px;
    margin-bottom: 18px;
    background: linear-gradient(135deg, var(--ic1), var(--ic2));
    box-shadow: 0 8px 20px -8px var(--ic1);
    transition: transform 0.35s var(--ease);
}
.tile-icon svg { width: 26px; height: 26px; stroke: #fff; stroke-width: 2; }
.tile h3 { position: relative; z-index: 1; font-size: 1.05rem; font-weight: 700; }
.tile p { position: relative; z-index: 1; font-size: 0.8rem; color: var(--text-muted); margin-top: 5px; }
.tile .arrow {
    position: absolute; top: 22px; right: 22px; z-index: 1;
    color: var(--text-muted); opacity: 0;
    transform: translateX(-6px); transition: opacity 0.3s, transform 0.3s, color 0.3s;
}
.tile:hover .arrow { opacity: 1; transform: translateX(0); color: var(--accent); }
.tile.exit .tile-icon { --ic1: #ef4444; --ic2: #f97316; box-shadow: 0 8px 20px -8px #ef4444; }

/* ---------- Staff floor view ---------- */
.staff-body { max-width: 1100px; margin: 0 auto; padding: 32px 24px 120px; }

.chip {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 6px 13px; border-radius: 99px;
    background: var(--surface); border: 1px solid var(--border);
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em;
    color: var(--text-muted);
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }

.staff-hero { margin: 18px 0 26px; }
.staff-hero h1 { font-size: 1.85rem; font-weight: 800; letter-spacing: -0.02em; }
.staff-hero h1 .accent { color: var(--accent); }
.staff-hero p { color: var(--text-muted); margin-top: 6px; font-size: 0.92rem; }

.stats-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
    margin-bottom: 26px;
}
.stat-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px;
    transition: border-color 0.25s, transform 0.25s;
}
.stat-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.stat-chip {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 0.72rem; font-weight: 600; color: var(--text-muted); margin-bottom: 12px;
}
.stat-chip i { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.stat-chip i.g { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
.stat-chip i.a { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-bg); }
.stat-num { font-size: 2.1rem; font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.stat-num .ghost { color: var(--text-muted); opacity: 0.5; font-size: 1.2rem; }
.stat-note { font-size: 0.74rem; color: var(--text-muted); margin-top: 6px; }

.floor-tabs {
    display: flex; gap: 6px; padding: 5px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 14px; margin-bottom: 18px;
}
.floor-tab {
    flex: 1; min-width: 0;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 12px; border: none; border-radius: 10px;
    background: transparent; color: var(--text-muted);
    font-family: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer;
    white-space: nowrap; transition: background 0.2s, color 0.2s;
}
.floor-tab .ft-dot { width: 8px; height: 8px; border-radius: 50%; }
.floor-tab .ft-dot.g { background: var(--ok); }
.floor-tab .ft-dot.a { background: var(--warn); }
.floor-tab .ft-count {
    background: var(--bg-2); color: var(--text-muted);
    font-size: 0.72rem; font-weight: 700; padding: 1px 8px; border-radius: 99px;
}
.floor-tab.on {
    background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
    box-shadow: 0 8px 20px -10px var(--accent-glow);
}
.floor-tab.on .ft-count { background: rgba(255, 255, 255, 0.25); color: #fff; }
.floor-tab.on .ft-dot { background: rgba(255, 255, 255, 0.9); }

.tab-panel { display: none; }
.tab-panel.on { display: block; animation: fadeUp 0.3s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.job-card {
    background: var(--surface); border: 1px solid var(--border);
    border-left: 3px solid var(--border-strong);
    border-radius: 14px; padding: 16px 18px; margin-bottom: 12px;
    transition: border-color 0.25s, transform 0.2s, box-shadow 0.25s;
}
.job-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.job-card.live { border-left-color: var(--ok); }
.job-card.queue { border-left-color: var(--warn); }
.job-card.ready { border-left-color: var(--accent); }

.job-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.job-customer { font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.job-car { font-size: 0.78rem; color: var(--text-muted); margin-top: 3px; }
.tier-badge {
    font-size: 0.6rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
    padding: 2px 8px; border-radius: 99px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
}
.tier-badge.vip { background: linear-gradient(135deg, #a855f7, #7c3aed); }

.job-badge {
    font-size: 0.65rem; font-weight: 700; letter-spacing: 0.04em;
    padding: 5px 11px; border-radius: 99px; white-space: nowrap;
}
.job-badge.live { background: var(--ok-bg); color: var(--ok); border: 1px solid var(--ok); }
.job-badge.wait { background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn); }
.job-badge.rdy  { background: var(--accent-glow); color: var(--accent); border: 1px solid var(--accent); }
.job-badge.muted { background: var(--bg-2); color: var(--text-muted); border: 1px solid var(--border-strong); }

.job-service {
    font-size: 0.85rem; font-weight: 600; padding: 9px 0; margin-bottom: 8px;
    border-top: 1px dashed var(--border); border-bottom: 1px dashed var(--border);
}
.job-prog { display: flex; align-items: center; gap: 12px; margin-bottom: 9px; }
.job-prog-bar { flex: 1; height: 7px; background: var(--bg-2); border-radius: 99px; overflow: hidden; }
.job-prog-bar i { display: block; height: 100%; border-radius: 99px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.5s var(--ease); }
.job-prog-bar i.green { background: linear-gradient(90deg, var(--ok), #34d399); }
.job-pct { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); min-width: 60px; text-align: right; }
.job-meta {
    display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    font-size: 0.76rem; color: var(--text-muted);
}
.job-meta strong { color: var(--text); font-weight: 600; }
.job-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

.btn-sm {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; border-radius: 10px;
    border: 1px solid var(--border-strong); background: var(--surface);
    color: var(--text); font-family: inherit; font-size: 0.78rem; font-weight: 600; cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.12s;
}
.btn-sm:hover { border-color: var(--accent); transform: translateY(-1px); }
.btn-sm:active { transform: translateY(0); }
.btn-sm.solid { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-color: transparent; }
.btn-sm.ghost { background: transparent; color: var(--text-muted); }

.floor-hint {
    margin-top: 14px; padding: 13px 16px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
    font-size: 0.8rem; color: var(--text-muted); line-height: 1.6;
}
.floor-hint strong { color: var(--text); }

.bottom-bar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
    background: var(--surface); backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    padding: 14px 24px;
    box-shadow: 0 -10px 40px -20px rgba(0, 0, 0, 0.5);
}
.bottom-bar-inner {
    max-width: 1100px; margin: 0 auto;
    display: flex; align-items: center; gap: 12px;
}
.bottom-bar .spacer { flex: 1; }
.btn-lg {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 22px; border-radius: 12px; border: none;
    background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
    font-family: inherit; font-size: 0.92rem; font-weight: 700; cursor: pointer;
    box-shadow: 0 10px 24px -10px var(--accent-glow);
    transition: transform 0.15s var(--ease), filter 0.2s;
}
.btn-lg:hover { transform: translateY(-2px); filter: brightness(1.07); }
.btn-lg:active { transform: translateY(0); }

/* ---------- Toast ---------- */
#toast {
    position: fixed; bottom: 28px; left: 50%;
    transform: translate(-50%, 200%);
    z-index: 100;
    display: flex; align-items: center; gap: 14px;
    padding: 14px 20px 14px 16px;
    background: var(--surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    box-shadow: var(--shadow);
    transition: transform 0.5s var(--ease);
    max-width: 90vw;
}
#toast.show { transform: translate(-50%, 0); }
#toast .toast-icon {
    width: 40px; height: 40px; flex-shrink: 0;
    display: grid; place-items: center; border-radius: 11px;
    background: linear-gradient(135deg, #f59e0b, #f97316);
}
#toast .toast-icon svg { width: 22px; height: 22px; stroke: #fff; }
#toast .toast-title { font-weight: 700; font-size: 0.92rem; }
#toast .toast-sub { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }

/* ---------- Intake wizard ---------- */
#wizard { display: block; overflow-y: auto; padding: 0; }
.wiz-top {
    position: sticky; top: 0; z-index: 10; gap: 12px;
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 24px;
    background: var(--surface); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
.wiz-mini {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 6px 13px; border-radius: 99px;
    background: var(--surface); border: 1px solid var(--border);
    font-size: 0.72rem; font-weight: 700; color: var(--text-muted);
}
.wiz-mini .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }

.progress-wrap { max-width: 620px; margin: 0 auto; padding: 18px 24px 0; }
.progress-head { display: flex; justify-content: space-between;
    font-size: 0.74rem; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
.progress-head .cur { color: var(--accent); font-weight: 700; }
.progress-bar { height: 7px; background: var(--bg-2); border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 99px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.4s var(--ease); }

.wizard { max-width: 620px; margin: 0 auto; padding: 26px 24px 120px; }
.wstep { display: none; animation: fadeUp 0.3s var(--ease); }
.wstep.on { display: block; }
.step-label { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.step-title { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 8px; }
.step-title em { font-style: normal; color: var(--accent); }
.step-sub { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 22px; }

.wfield { margin-bottom: 18px; }
.wfield > label { display: block; font-size: 0.76rem; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; letter-spacing: 0.02em; }
.wfield .req { color: var(--accent); }
.winput, .wselect, .wtextarea {
    width: 100%; padding: 13px 15px;
    background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px;
    color: var(--text); font-family: inherit; font-size: 0.95rem; outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.winput:focus, .wselect:focus, .wtextarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.winput.big { font-size: 1.25rem; font-weight: 700; text-align: center; letter-spacing: 0.04em; }
.wtextarea { resize: vertical; min-height: 80px; }
.whint { font-size: 0.74rem; color: var(--text-muted); margin-top: 6px; }
.phone-row { display: flex; gap: 8px; }
.phone-row .wselect { flex: 0 0 110px; }
.phone-row .winput { flex: 1; }

.wdivider { display: flex; align-items: center; gap: 14px; margin: 18px 0; color: var(--text-muted); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; }
.wdivider::before, .wdivider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.found-card { text-align: center; padding: 24px 20px; margin-bottom: 18px;
    background: var(--surface); border: 1.5px solid var(--accent); border-radius: 18px; }
.found-avatar { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
    display: grid; place-items: center; font-weight: 800; font-size: 1.4rem; }
.found-name { font-size: 1.25rem; font-weight: 800; }
.found-tier { display: inline-block; margin-top: 6px; padding: 3px 12px; border-radius: 99px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-size: 0.65rem; font-weight: 800; letter-spacing: 0.1em; }
.found-stats { display: flex; justify-content: center; gap: 18px; margin-top: 14px; padding-top: 14px;
    border-top: 1px dashed var(--border); font-size: 0.78rem; color: var(--text-muted); flex-wrap: wrap; }
.found-stats strong { color: var(--text); }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(95px, 1fr)); gap: 10px; }
.choice-card { padding: 14px 10px; text-align: center; cursor: pointer;
    background: var(--bg-2); border: 1.5px solid var(--border); border-radius: 14px;
    color: var(--text); font-family: inherit; transition: border-color 0.2s, transform 0.15s, background 0.2s; }
.choice-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.choice-card.on { border-color: var(--accent); background: var(--accent-glow); }
.choice-card .ci { font-size: 1.4rem; display: block; margin-bottom: 5px; }
.choice-card .cl { font-size: 0.82rem; font-weight: 600; }
.choice-card .cs { font-size: 0.66rem; color: var(--text-muted); margin-top: 2px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-pick { padding: 9px 15px; border-radius: 99px; cursor: pointer;
    background: var(--bg-2); border: 1.5px solid var(--border); color: var(--text);
    font-family: inherit; font-size: 0.82rem; font-weight: 600; transition: all 0.15s; }
.chip-pick:hover { border-color: var(--accent); }
.chip-pick.on { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-color: transparent; }

.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.photo-slot { position: relative; aspect-ratio: 4/3; border-radius: 12px; cursor: pointer; overflow: hidden;
    border: 2px dashed var(--border-strong); background: var(--bg-2);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; color: var(--text); transition: border-color 0.2s; }
.photo-slot:hover { border-color: var(--accent); }
.photo-slot.filled { border-style: solid; border-color: var(--accent); }
.photo-slot input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photo-slot .ps-ico { font-size: 1.3rem; opacity: 0.5; }
.photo-slot .ps-lbl { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.photo-slot.filled .ps-lbl { color: var(--accent); }
.photo-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-slot .ps-x { position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; border-radius: 50%;
    background: rgba(0,0,0,0.6); color: #fff; border: none; cursor: pointer; display: none;
    align-items: center; justify-content: center; font-size: 0.8rem; z-index: 2; }
.photo-slot.filled .ps-x { display: flex; }
.photo-count { margin-top: 10px; padding: 8px 12px; border-radius: 10px; background: var(--bg-2); font-size: 0.74rem; color: var(--text-muted); text-align: center; }

.car-wrap { display: grid; gap: 16px; }
@media (min-width: 680px) { .car-wrap { grid-template-columns: 230px 1fr; align-items: start; } }
.car-diagram { position: relative; aspect-ratio: 4/5; max-width: 230px; margin: 0 auto; cursor: crosshair;
    background: var(--bg-2); border: 2px dashed var(--border-strong); border-radius: 14px; padding: 12px; }
.car-diagram svg { width: 100%; height: 100%; display: block; }
.car-diagram .marks { position: absolute; inset: 0; pointer-events: none; }
.car-hint { text-align: center; font-size: 0.68rem; color: var(--text-muted); margin-top: 6px; letter-spacing: 0.06em; text-transform: uppercase; }
.car-hint.live { color: var(--accent); font-weight: 700; }
.dmg-empty { padding: 16px; text-align: center; font-size: 0.78rem; color: var(--text-muted); line-height: 1.6;
    background: var(--bg-2); border: 1.5px dashed var(--border-strong); border-radius: 12px; }
.dmg-card { display: grid; grid-template-columns: 28px 1fr 30px; gap: 10px; align-items: start;
    padding: 12px; margin-bottom: 8px; border-radius: 12px;
    background: var(--danger-bg); border: 1.5px solid var(--danger); animation: fadeUp 0.2s; }
.dmg-num { width: 26px; height: 26px; border-radius: 50%; background: var(--danger); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 0.72rem; }
.dmg-chips { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 7px; }
.dmg-chip { padding: 4px 10px; border-radius: 99px; font-size: 0.64rem; cursor: pointer;
    background: var(--surface); border: 1px solid var(--border-strong); color: var(--text-muted); }
.dmg-chip.on { background: var(--danger); color: #fff; border-color: var(--danger); }
.dmg-desc { width: 100%; padding: 7px 10px; border-radius: 8px; font-size: 0.78rem; font-family: inherit;
    background: var(--bg-2); border: 1px solid var(--border-strong); color: var(--text); }
.dmg-x { width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
    background: var(--bg-2); border: 1px solid var(--border-strong); color: var(--danger); font-size: 0.85rem; }

.svc-card { display: flex; align-items: center; gap: 12px; cursor: pointer;
    padding: 13px 15px; margin-bottom: 9px; border-radius: 12px;
    background: var(--bg-2); border: 1.5px solid var(--border); transition: border-color 0.2s, background 0.2s; }
.svc-card:hover { border-color: var(--accent); }
.svc-card.on { border-color: var(--accent); background: var(--accent-glow); }
.svc-check { width: 24px; height: 24px; border-radius: 7px; flex-shrink: 0; border: 2px solid var(--border-strong);
    display: grid; place-items: center; transition: all 0.15s; }
.svc-card.on .svc-check { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; }
.svc-card.on .svc-check::after { content: '✓'; color: #fff; font-weight: 800; font-size: 0.75rem; }
.svc-body { flex: 1; min-width: 0; }
.svc-name { font-size: 0.9rem; font-weight: 600; }
.svc-meta { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }
.svc-warr { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 99px; font-size: 0.6rem; font-weight: 700;
    background: var(--ok-bg); color: var(--ok); border: 1px solid var(--ok); }
.svc-price { font-size: 1rem; font-weight: 800; white-space: nowrap; }
.svc-price .u { font-size: 0.62rem; color: var(--text-muted); font-weight: 600; margin-right: 2px; }
.qty-group { display: none; align-items: center; gap: 7px; }
.svc-card.on .qty-group { display: flex; }
.qty-btn { width: 26px; height: 26px; border-radius: 7px; cursor: pointer;
    background: var(--surface); border: 1px solid var(--border-strong); color: var(--text); font-size: 0.9rem; font-weight: 700; }
.qty-num { min-width: 22px; text-align: center; font-weight: 700; font-size: 0.85rem; }

.total-banner { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 14px 16px; margin-top: 14px; border-radius: 12px; background: var(--accent-glow); border: 1.5px solid var(--accent); }
.total-banner .tl { font-size: 0.72rem; color: var(--text-muted); }
.total-banner .ta { font-size: 1.4rem; font-weight: 800; }
.total-banner .ta .u { font-size: 0.7rem; color: var(--text-muted); margin-right: 3px; }

.eta-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.eta-card { text-align: center; padding: 16px 10px; border-radius: 14px; background: var(--bg-2); border: 1.5px solid var(--border); }
.eta-card.hl { background: var(--accent-glow); border-color: var(--accent); }
.eta-lbl { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 5px; }
.eta-val { font-size: 1.3rem; font-weight: 800; line-height: 1; }
.eta-card.hl .eta-val { color: var(--accent); }
.eta-note { font-size: 0.66rem; color: var(--text-muted); margin-top: 4px; }
.floor-snap { margin-top: 14px; padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.snap-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 0.8rem; color: var(--text-muted); }
.snap-row .v { color: var(--text); font-weight: 600; }

.pay-summary { padding: 16px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); margin-bottom: 18px; }
.pay-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 0.85rem; }
.pay-row .pl { color: var(--text-muted); }
.pay-row.total { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 13px; font-size: 1.15rem; font-weight: 800; }

.sig-grid { display: grid; gap: 12px; }
@media (min-width: 560px) { .sig-grid { grid-template-columns: 1fr 1fr; } }
.sig-pad { padding: 12px; border-radius: 14px; background: var(--bg-2); border: 1.5px dashed var(--border-strong); }
.sig-pad.signed { border-style: solid; border-color: var(--accent); }
.sig-lbl { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }
.sig-canvas { width: 100%; aspect-ratio: 3/1; border-radius: 8px; background: #fff; touch-action: none; cursor: crosshair; display: block; }
.sig-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 7px; font-size: 0.7rem; color: var(--text-muted); }
.sig-clear { background: none; border: none; color: var(--danger); cursor: pointer; font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }

.success-icon { width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 18px;
    display: grid; place-items: center; font-size: 2.4rem; color: var(--accent);
    background: var(--accent-glow); border: 3px solid var(--accent); }
.success-title { text-align: center; font-size: 1.8rem; font-weight: 800; }
.success-sub { text-align: center; color: var(--text-muted); margin: 6px 0 22px; }
.success-card { padding: 16px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--border); margin-bottom: 16px; }
.success-r { display: flex; justify-content: space-between; padding: 8px 0; font-size: 0.82rem; border-bottom: 1px solid var(--border); }
.success-r:last-child { border-bottom: none; }
.success-r .sl { color: var(--text-muted); }
.success-r .sv { font-weight: 600; }
.success-actions { display: grid; gap: 8px; }

.wiz-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
    display: flex; gap: 10px; padding: 14px 24px;
    background: var(--surface); backdrop-filter: blur(20px); border-top: 1px solid var(--border); }
.wiz-nav .btn-lg { flex: 1; justify-content: center; }
.wiz-nav .btn-back { flex: 0 0 auto; }

@media (max-width: 720px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .step-title { font-size: 1.35rem; }
}
@media (max-width: 560px) {
    .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
    .dash-hero h1, .staff-hero h1 { font-size: 1.5rem; }
    .topbar { padding: 14px 18px; }
    .user-chip .uname-wrap { display: none; }
    .floor-tab span.lbl { display: none; }
    .bottom-bar { padding: 12px 16px; }
    .btn-lg { padding: 13px 16px; font-size: 0.86rem; }
}
/* ============================================================
   ====  STAFF PANEL — FULL-PARITY ADDITIONS  ================
   ============================================================ */

/* ---------- Login: PIN button + secondary actions ---------- */
.btn-secondary {
    width: 100%; margin-top: 12px; padding: 13px;
    border: 1px solid var(--border-strong); border-radius: 12px;
    background: var(--surface); color: var(--text);
    font-size: 0.95rem; font-weight: 700; font-family: inherit; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.btn-secondary:hover { border-color: var(--accent); background: var(--surface-hover); transform: translateY(-1px); }
.btn-secondary svg { width: 18px; height: 18px; stroke: currentColor; }
.pw-eye { position: absolute; right: 12px; width: 20px; height: 20px; cursor: pointer; stroke: var(--text-muted); }
.pw-eye:hover { stroke: var(--accent); }

/* ---------- Generic modal overlay ---------- */
.modal-overlay {
    position: fixed; inset: 0; z-index: 120;
    display: none; align-items: center; justify-content: center;
    padding: 20px;
    background: rgba(2, 6, 16, 0.62); backdrop-filter: blur(6px);
    opacity: 0; transition: opacity 0.3s var(--ease);
}
.modal-overlay.open { display: flex; opacity: 1; }
.modal-box {
    width: 100%; max-width: 480px;
    background: var(--bg-2); border: 1px solid var(--border-strong);
    border-radius: 22px; box-shadow: var(--shadow);
    padding: 24px; transform: translateY(14px) scale(0.98);
    transition: transform 0.3s var(--ease); max-height: 92vh; overflow-y: auto;
}
.modal-overlay.open .modal-box { transform: translateY(0) scale(1); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.modal-title { font-size: 1.15rem; font-weight: 800; }
.modal-sub { font-size: 0.84rem; color: var(--text-muted); margin-bottom: 16px; }
.modal-x {
    width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px; cursor: pointer;
    background: var(--surface); border: 1px solid var(--border); color: var(--text);
    display: grid; place-items: center; font-size: 1rem;
}
.modal-x:hover { border-color: var(--danger); color: var(--danger); }

/* ---------- Signature tap-cards (step 10) ---------- */
.sig-grid { display: grid; gap: 12px; }
@media (min-width: 560px) { .sig-grid { grid-template-columns: 1fr 1fr; } }
.sig-tap-card {
    padding: 16px; border-radius: 16px; cursor: pointer;
    background: var(--bg-2); border: 1.5px dashed var(--border-strong);
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
    display: flex; flex-direction: column; gap: 10px; min-height: 150px;
}
.sig-tap-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.sig-tap-card.signed { border-style: solid; border-color: var(--accent); background: var(--accent-glow); }
.sig-tap-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sig-tap-lbl { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); }
.sig-tap-card.signed .sig-tap-lbl { color: var(--accent); }
.sig-tap-pen {
    width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
    display: grid; place-items: center;
    background: var(--surface); border: 1px solid var(--border); color: var(--accent);
}
.sig-tap-preview {
    flex: 1; border-radius: 10px; background: #fff; min-height: 78px;
    display: grid; place-items: center; overflow: hidden;
}
.sig-tap-preview img { width: 100%; height: 100%; object-fit: contain; }
.sig-tap-preview .ghosthint { color: #94a3b8; font-size: 0.78rem; font-weight: 600; padding: 8px; text-align: center; }
.sig-tap-status { font-size: 0.72rem; color: var(--text-muted); }

/* ---------- Full-screen signature modal ---------- */
#sigModal .modal-box { max-width: 720px; }
.sig-big-wrap {
    position: relative; width: 100%; aspect-ratio: 16/7; min-height: 200px;
    border-radius: 14px; background: #fff; overflow: hidden;
    border: 1.5px solid var(--border-strong); touch-action: none;
}
#sigBigCanvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
.sig-big-placeholder {
    position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 6px; pointer-events: none; color: #b6c0cf;
}
.sig-big-placeholder .sbp-line { width: 60%; max-width: 280px; border-bottom: 2px dashed #cbd5e1; margin-bottom: 8px; }
.sig-big-placeholder span { font-size: 0.82rem; font-weight: 600; }
.sig-big-foot { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.sig-big-foot .btn-sm, .sig-big-foot .btn-lg { flex: 1; justify-content: center; }

/* ---------- Per-damage close-up photo ---------- */
.dmg-card { grid-template-columns: 28px 1fr auto; }
.dmg-photo-btn {
    position: relative; width: 46px; height: 46px; border-radius: 10px; overflow: hidden; cursor: pointer;
    border: 1.5px dashed var(--border-strong); background: var(--bg-2);
    display: grid; place-items: center; font-size: 1rem; color: var(--text-muted); align-self: start;
}
.dmg-photo-btn.filled { border-style: solid; border-color: var(--accent); }
.dmg-photo-btn img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dmg-photo-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dmg-side { display: flex; flex-direction: column; gap: 6px; align-items: center; }

/* ---------- Window tint per-zone config ---------- */
.tint-config {
    display: none; margin-top: 12px; padding: 16px;
    border-radius: 14px; background: var(--bg-2); border: 1.5px solid var(--accent);
    animation: fadeUp 0.25s var(--ease);
}
.tint-config.show { display: block; }
.tint-zone { padding: 11px 0; border-bottom: 1px dashed var(--border); }
.tint-zone:last-of-type { border-bottom: none; }
.tint-zone-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; }
.tint-zone-name { font-size: 0.85rem; font-weight: 600; }
.tint-zone-val { font-size: 0.78rem; font-weight: 700; color: var(--accent); }
.tint-pct-group { display: flex; gap: 6px; flex-wrap: wrap; }
.tint-pct {
    flex: 1; min-width: 44px; padding: 7px 4px; border-radius: 9px; cursor: pointer;
    background: var(--surface); border: 1px solid var(--border-strong); color: var(--text-muted);
    font-family: inherit; font-size: 0.74rem; font-weight: 700; transition: all 0.15s;
}
.tint-pct:hover { border-color: var(--accent); }
.tint-pct.on { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-color: transparent; }
.tint-summary { margin-top: 12px; padding: 9px 12px; border-radius: 10px; font-size: 0.76rem; background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); }
.tint-summary.ok { color: var(--ok); }
.tint-summary.warn { color: var(--warn); }

/* ---------- PIN pad ---------- */
#pinModal .modal-box { max-width: 360px; text-align: center; }
.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 20px 0; }
.pin-dot { width: 15px; height: 15px; border-radius: 50%; background: var(--bg-2); border: 1.5px solid var(--border-strong); transition: all 0.15s; }
.pin-dot.filled { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; }
.pin-error { color: var(--danger); font-size: 0.8rem; font-weight: 600; min-height: 18px; margin-bottom: 8px; }
.pin-error.shake { animation: shake 0.4s; }
.pin-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pin-key {
    padding: 16px 0; border-radius: 14px; cursor: pointer;
    background: var(--surface); border: 1px solid var(--border); color: var(--text);
    font-family: inherit; font-size: 1.3rem; font-weight: 700;
    transition: background 0.15s, transform 0.1s;
}
.pin-key:hover { background: var(--surface-hover); }
.pin-key:active { transform: scale(0.95); }
.pin-key.ghost { background: transparent; border: none; font-size: 0.8rem; font-weight: 700; color: var(--text-muted); }

/* ---------- Language modal ---------- */
.lang-list { display: flex; flex-direction: column; gap: 9px; }
.lang-opt {
    display: flex; align-items: center; gap: 13px; padding: 13px 15px; cursor: pointer;
    background: var(--bg-2); border: 1.5px solid var(--border); border-radius: 13px;
    color: var(--text); font-family: inherit; transition: border-color 0.2s, background 0.2s;
}
.lang-opt:hover { border-color: var(--accent); }
.lang-opt.on { border-color: var(--accent); background: var(--accent-glow); }
.lang-opt .lflag { font-size: 1.5rem; }
.lang-opt .lname { font-weight: 700; font-size: 0.95rem; }
.lang-opt .lnative { font-size: 0.78rem; color: var(--text-muted); }
.lang-opt .lcheck { margin-left: auto; color: var(--accent); opacity: 0; font-weight: 800; }
.lang-opt.on .lcheck { opacity: 1; }

/* ---------- Invoice modal ---------- */
#invoiceModal .modal-box { max-width: 560px; }
.inv-doc { background: #ffffff; color: #0f172a; border-radius: 12px; padding: 22px; font-size: 0.84rem; }
.inv-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid #0f172a; padding-bottom: 14px; margin-bottom: 14px; }
.inv-brand { font-size: 1.3rem; font-weight: 900; letter-spacing: 0.03em; }
.inv-brand span { color: #06b6d4; }
.inv-meta { text-align: right; font-size: 0.74rem; color: #475569; line-height: 1.6; }
.inv-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #e2e8f0; }
.inv-row.tot { border-bottom: none; border-top: 2px solid #0f172a; margin-top: 6px; padding-top: 10px; font-size: 1.05rem; font-weight: 800; }
.inv-sec-title { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #64748b; margin: 14px 0 6px; }
.inv-foot { margin-top: 16px; font-size: 0.72rem; color: #64748b; text-align: center; }

/* ---------- Payment advance chips ---------- */
.adv-chips { display: flex; gap: 8px; margin-top: 10px; }
.adv-chip {
    flex: 1; padding: 9px 6px; border-radius: 10px; cursor: pointer;
    background: var(--bg-2); border: 1.5px solid var(--border); color: var(--text-muted);
    font-family: inherit; font-size: 0.8rem; font-weight: 700; transition: all 0.15s;
}
.adv-chip:hover { border-color: var(--accent); }
.adv-chip.on { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-color: transparent; }

/* ---------- Language pill button (topbar) ---------- */
.icon-btn.lang-btn { width: auto; padding: 0 12px; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.04em; }

/* ---------- RTL adjustments ---------- */
[dir="rtl"] .input-wrap svg { left: auto; right: 14px; }
[dir="rtl"] .field input { padding: 13px 44px 13px 14px; }
[dir="rtl"] .pw-eye { right: auto; left: 12px; }
[dir="rtl"] .tile .arrow { right: auto; left: 22px; }
[dir="rtl"] .photo-slot input { right: 0; }
[dir="rtl"] .step-title, [dir="rtl"] .step-sub, [dir="rtl"] .staff-hero, [dir="rtl"] .dash-hero { text-align: right; }
[dir="rtl"] .modal-head { flex-direction: row-reverse; }
[dir="rtl"] .lang-opt .lcheck { margin-left: 0; margin-right: auto; }

/* ---------- Success thumbnails ---------- */
.success-thumbs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.success-thumbs img { width: 38px; height: 30px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }

/* ============================================================
   ====  FULL A4 INVOICE DOCUMENT (preview)  ================
   ============================================================ */
#invoiceModal .modal-box { max-width: 760px; }
#invoiceModal .invoice-doc-wrap { padding: 8px 0; }
.invoice-doc-wrap { width: 100%; overflow: hidden; }
.invoice-doc {
    background: #ffffff; color: #0a0b0f;
    font-family: 'Inter', -apple-system, sans-serif;
    padding: 56px 48px; width: 794px; max-width: none; min-height: 1123px;
    box-sizing: border-box;
    box-shadow: 0 10px 40px rgba(10, 11, 15, 0.15), 0 2px 8px rgba(10, 11, 15, 0.08);
    margin: 0 auto; line-height: 1.5; transform-origin: top left;
}
.invoice-header { display: grid; grid-template-columns: 1fr auto; gap: 14px; padding-bottom: 18px; border-bottom: 2px solid #0a0b0f; margin-bottom: 20px; position: relative; }
.invoice-header::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 80px; height: 2px; background: linear-gradient(90deg, #ff6b2c, #ff8c52); }
.invoice-brand { font-size: 26px; font-weight: 800; letter-spacing: -0.04em; color: #0a0b0f; margin-bottom: 8px; line-height: 1; }
.invoice-brand-em { font-weight: 600; background: linear-gradient(135deg, #ff6b2c, #ff8c52); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-left: 8px; font-size: 17px; }
.invoice-contact { font-size: 10.5px; color: #666; line-height: 1.6; }
.invoice-header-right { text-align: right; }
.invoice-chip { font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: #ff6b2c; font-weight: 700; margin-bottom: 2px; }
.invoice-num { font-size: 22px; font-weight: 700; color: #0a0b0f; margin: 2px 0; line-height: 1; }
.invoice-date { font-size: 11px; color: #666; margin: 4px 0 8px; }
.invoice-section-head { font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; color: #0a0b0f; border-bottom: 1.5px solid #ff6b2c; padding-bottom: 3px; margin: 16px 0 10px; display: inline-block; padding-right: 24px; }
.invoice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-bottom: 14px; }
.invoice-main-line { font-size: 17px; font-weight: 600; color: #0a0b0f; margin-bottom: 3px; line-height: 1.25; }
.invoice-sub-line { font-size: 12px; color: #666; margin-bottom: 2px; }
.invoice-table { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.invoice-table th { background: #f5f1e4; font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: #888; padding: 8px; text-align: left; font-weight: 600; }
.invoice-table th.right, .invoice-table td.right { text-align: right; }
.invoice-table td { padding: 10px 8px; border-bottom: 1px solid #eae4d4; font-size: 13px; color: #0a0b0f; }
.invoice-table .mono-inv { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 12px; }
.invoice-totals-box { background: #f9f9fb; color: #0a0b0f; padding: 18px 20px; border-radius: 10px; border: 1px solid #e7e7ec; border-left: 4px solid #ea580c; }
.invoice-total-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 12px; }
.invoice-total-row.gold { color: #c2410c; }
.invoice-total-row.big { font-size: 22px; font-weight: 700; padding-top: 10px; border-top: 1px solid #e7e7ec; margin-top: 8px; color: #0a0b0f; }
.invoice-total-row.big .mono-inv { color: #b45309; }
.invoice-photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.invoice-photo-item { display: flex; flex-direction: column; }
.invoice-photo-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 6px; border: 1px solid #e8e2d2; display: block; }
.invoice-photo-empty { width: 100%; aspect-ratio: 4/3; background: #f5f1e4; border: 1px dashed #d0c8b0; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #b5aa8a; font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; }
.invoice-photo-label { font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; color: #0a0b0f; margin-top: 5px; }
.invoice-photo-status { font-size: 9px; color: #999; margin-top: 1px; }
.invoice-note-box { background: #faf7f0; border-left: 3px solid #ff6b2c; padding: 12px 14px; font-size: 12.5px; color: #555; line-height: 1.6; border-radius: 4px; margin-bottom: 14px; }
.invoice-sig-box { border: 1.5px solid #e8e2d2; border-radius: 10px; padding: 12px; }
.invoice-sig-box .inv-sig-pad { width: 100%; aspect-ratio: 3/1; background: #fff; border: 1px solid #f0ead8; border-radius: 6px; margin-bottom: 10px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.invoice-sig-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.invoice-sig-empty { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: #c0c0c0; }
.invoice-sig-name { font-size: 14px; font-weight: 600; color: #0a0b0f; margin-bottom: 2px; }
.invoice-sig-role { font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: #888; margin-bottom: 3px; }
.invoice-sig-time { font-size: 10px; color: #999; }
.invoice-divider-thick { margin: 24px -48px; height: 2px; background: #0a0b0f; }
.invoice-footer { margin-top: 24px; padding-top: 14px; border-top: 2px solid #0a0b0f; text-align: center; font-size: 10px; color: #888; line-height: 1.9; }
[dir="rtl"] .invoice-doc { direction: ltr; text-align: left; }

/* ============================================================
   ====  STAFF FLOOR — STAT CARDS AS TABS  ==================
   ============================================================ */
.stat-card {
    cursor: pointer;
    font-family: inherit;
    color: var(--text);
    text-align: left;
    width: 100%;
    display: block;
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    overflow: hidden;
}
.stat-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.stat-card.on {
    border-color: var(--accent);
    background: var(--surface-hover);
    box-shadow: 0 0 0 1px var(--accent), 0 14px 30px -18px var(--accent-glow);
}
.stat-card.on .stat-num { color: var(--accent); }
.stat-card.on::after {
    content: '';
    position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

/* extra stat-chip dot colours */
.stat-chip i.b { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.stat-chip i.p { background: #a855f7; box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.16); }

/* handover / delivery job styling */
.job-card.handover { border-left-color: #a855f7; }
.job-badge.hand {
    background: rgba(168, 85, 247, 0.14);
    color: #a855f7;
    border: 1px solid #a855f7;
}

/* ============================================================
   ====  REMOVE MOBILE TAP HIGHLIGHT (blue rectangle)  ======
   ============================================================ */
* { -webkit-tap-highlight-color: transparent; }
button, a, label, input, select, textarea, [onclick], [role="button"],
.stat-card, .tile, .icon-btn, .btn-sm, .btn-lg, .btn-primary, .btn-secondary,
.floor-tab, .choice-card, .chip-pick, .svc-card, .photo-slot, .sig-clear,
.qty-btn, .dmg-chip, .switch, .login-link {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* ---------- Multi-service list inside a job card ---------- */
.job-service ul.svc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.job-service ul.svc-list li { display: flex; align-items: center; gap: 9px; font-weight: 600; line-height: 1.3; }
.job-service ul.svc-list li::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

/* ============================================================
   ====  WORKING-ON CHECKLIST + READY REVEAL + BOTTOM SHEET  =
   ============================================================ */
.work-list {
    margin: 4px 0 12px; padding: 8px 0;
    border-top: 1px dashed var(--border); border-bottom: 1px dashed var(--border);
    display: flex; flex-direction: column; gap: 2px;
}
.work-svc {
    display: flex; align-items: center; gap: 11px;
    padding: 7px 6px; border-radius: 9px; cursor: pointer;
    transition: background 0.18s; user-select: none;
}
.work-svc:hover { background: var(--surface-hover); }
.work-svc input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.work-box {
    width: 22px; height: 22px; border-radius: 7px; flex-shrink: 0;
    border: 2px solid var(--border-strong); display: grid; place-items: center;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.work-svc input:checked + .work-box { background: linear-gradient(135deg, var(--ok), #34d399); border-color: transparent; transform: scale(1.05); }
.work-svc input:checked + .work-box::after { content: '✓'; color: #fff; font-weight: 800; font-size: 0.8rem; line-height: 1; }
.work-svc input:focus-visible + .work-box { box-shadow: 0 0 0 3px var(--accent-glow); }
.work-name { font-size: 0.88rem; font-weight: 600; transition: color 0.2s; }
.work-svc.done .work-name { color: var(--text-muted); text-decoration: line-through; text-decoration-color: var(--ok); }

/* Ready button hidden until 100% */
.btn-ready { display: none; }
.btn-ready.show { display: inline-flex; animation: readyPop 0.45s var(--ease); }
@keyframes readyPop {
    0%   { opacity: 0; transform: translateY(10px) scale(0.85); }
    60%  { transform: translateY(0) scale(1.05); }
    100% { opacity: 1; transform: none; }
}

/* Bottom sheet */
.sheet-overlay {
    position: fixed; inset: 0; z-index: 130;
    display: flex; align-items: flex-end; justify-content: center;
    background: rgba(2, 6, 16, 0.62); backdrop-filter: blur(6px);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.32s var(--ease), visibility 0s linear 0.42s;
}
.sheet-overlay.open {
    opacity: 1; visibility: visible; pointer-events: auto;
    transition: opacity 0.32s var(--ease), visibility 0s;
}
.sheet {
    width: 100%; max-width: 520px;
    background: var(--bg-2); border: 1px solid var(--border-strong); border-bottom: none;
    border-radius: 24px 24px 0 0; box-shadow: var(--shadow);
    padding: 14px 24px 30px; text-align: center;
    transform: translateY(100%); transition: transform 0.38s var(--ease);
}
.sheet-overlay.open .sheet { transform: translateY(0); }
.sheet-handle { width: 44px; height: 5px; border-radius: 99px; background: var(--border-strong); margin: 0 auto 18px; }
.sheet-icon {
    width: 62px; height: 62px; margin: 0 auto 14px; border-radius: 50%;
    display: grid; place-items: center; font-size: 1.5rem;
    background: var(--accent-glow); border: 2px solid var(--accent); color: var(--accent);
}
.sheet-title { font-size: 1.22rem; font-weight: 800; }
.sheet-msg { font-size: 0.9rem; color: var(--text-muted); margin: 8px 0 22px; line-height: 1.5; }
.sheet-actions { display: flex; gap: 10px; }
.sheet-actions .sheet-cancel { flex: 0 0 auto; padding: 14px 22px; }
.sheet-actions .btn-lg { flex: 1; justify-content: center; }

/* ---------- Timeline (order / started events) ---------- */
.timeline { margin: 6px 0 12px; padding: 10px 2px 2px; }
.tl-item { position: relative; display: flex; gap: 13px; padding-bottom: 16px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item:not(:last-child)::before {
    content: ''; position: absolute; left: 6px; top: 17px; bottom: -1px; width: 2px;
    background: linear-gradient(var(--accent), var(--warn), var(--ok)); opacity: 0.5;
}
.tl-marker {
    position: relative; z-index: 1; flex-shrink: 0;
    width: 14px; height: 14px; margin-top: 2px; border-radius: 50%;
    background: var(--accent); border: 2px solid var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
    .tl-marker.order { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.tl-marker.start { background: var(--warn); border-color: var(--warn); box-shadow: 0 0 0 3px var(--warn-bg); }
.tl-marker.finish { background: var(--ok); border-color: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
.tl-marker.finish::after { content: '✓'; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 8px; font-weight: 900; line-height: 1; }
.tl-content { flex: 1; min-width: 0; }
.tl-title { font-size: 0.82rem; font-weight: 700; color: var(--text); line-height: 1.3; }
.tl-by { font-weight: 600; color: var(--text-muted); }
.tl-time { font-size: 0.74rem; color: var(--text-muted); margin-top: 3px; }
.tl-ago { color: var(--accent); font-weight: 700; }
[dir="rtl"] .tl-item:not(:last-child)::before { left: auto; right: 6px; }

/* ---------- Ready: balance row ---------- */
.ready-balance {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    margin: 4px 0 12px; padding: 9px 13px; border-radius: 11px;
    background: var(--surface); border: 1px solid var(--border-strong);
    font-size: 0.78rem;
}
.ready-balance span { color: var(--text-muted); font-weight: 600; }
.ready-balance strong { color: var(--text); font-weight: 800; font-size: 0.92rem; }
