/* =========================================================
   NIST POS - Design System
   Blue & White theme, touch-friendly, tablet-first
   ========================================================= */

:root {
    /* Palette */
    --brand-50:  #eff6ff;
    --brand-100: #dbeafe;
    --brand-200: #bfdbfe;
    --brand-500: #3b82f6;
    --brand-600: #2563eb;
    --brand-700: #1d4ed8;
    --brand-900: #1e3a8a;

    --success: #10b981;
    --success-bg: #ecfdf5;
    --warning: #f59e0b;
    --warning-bg: #fffbeb;
    --danger:  #ef4444;
    --danger-bg: #fef2f2;
    --info:    #06b6d4;

    /* Neutrals */
    --bg:        #f8fafc;
    --surface:   #ffffff;
    --surface-2: #f1f5f9;
    --border:    #e2e8f0;
    --border-strong: #cbd5e1;
    --text:      #0f172a;
    --text-muted:#64748b;
    --text-dim:  #94a3b8;

    /* Layout */
    --sidebar-w: 240px;
    --topbar-h:  60px;
    --radius:    10px;
    --radius-lg: 14px;
    --shadow-sm: 0 1px 2px rgba(15,23,42,0.05);
    --shadow:    0 4px 12px rgba(15,23,42,0.08);
    --shadow-lg: 0 12px 32px rgba(15,23,42,0.12);

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Dark mode */
[data-theme="dark"] {
    --bg:        #0f172a;
    --surface:   #1e293b;
    --surface-2: #334155;
    --border:    #334155;
    --border-strong: #475569;
    --text:      #f1f5f9;
    --text-muted:#94a3b8;
    --text-dim:  #64748b;
    --shadow:    0 4px 12px rgba(0,0,0,0.4);
}

* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* =========================================================
   LOGIN
   ========================================================= */
.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr;
    background: linear-gradient(135deg, var(--brand-700) 0%, var(--brand-900) 100%);
}
@media (min-width: 900px) {
    .login-page { grid-template-columns: 1.1fr 1fr; }
}
.login-hero {
    color: white;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 24px;
}
.login-hero h1 { font-size: 44px; margin: 0; line-height: 1.15; }
.login-hero p  { font-size: 16px; opacity: 0.85; max-width: 480px; }
.login-hero ul { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.login-hero li { display: flex; gap: 10px; align-items: center; }
.login-hero li::before { content: '✓'; color: #6ee7b7; font-weight: 800; }
@media (max-width: 899px) { .login-hero { display: none; } }

.login-panel {
    background: var(--surface);
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-card {
    width: 100%;
    max-width: 400px;
}
.login-card h2 { margin: 0 0 8px; font-size: 26px; }
.login-card > p { color: var(--text-muted); margin: 0 0 28px; }

/* =========================================================
   FORMS
   ========================================================= */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
    margin-bottom: 6px;
}
.form-control,
.form-select,
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="tel"], input[type="date"],
select, textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.form-control:focus,
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
.form-hint { color: var(--text-muted); font-size: 12px; margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    background: var(--surface-2);
    color: var(--text);
    transition: transform .05s, box-shadow .15s, background .15s;
    white-space: nowrap;
    user-select: none;
}
.btn:hover:not(:disabled) { box-shadow: var(--shadow-sm); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary   { background: var(--brand-600); color: white; }
.btn-primary:hover:not(:disabled)   { background: var(--brand-700); }
.btn-success   { background: var(--success); color: white; }
.btn-success:hover:not(:disabled)   { background: #059669; }
.btn-danger    { background: var(--danger); color: white; }
.btn-warning   { background: var(--warning); color: white; }
.btn-outline   { background: transparent; border-color: var(--border-strong); }

.btn-sm { padding: 6px 10px; font-size: 12px; }
.btn-lg { padding: 14px 22px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-icon { padding: 8px; }

/* =========================================================
   APP SHELL
   ========================================================= */
.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    grid-template-rows: var(--topbar-h) 1fr;
    grid-template-areas:
        "sidebar topbar"
        "sidebar content";
    min-height: 100vh;
}
@media (max-width: 767px) {
    .app-shell {
        grid-template-columns: 1fr;
        grid-template-areas: "topbar" "content";
    }
    .sidebar { display: none; }
    .sidebar.open {
        display: block;
        position: fixed;
        top: 0; left: 0; bottom: 0;
        width: 260px;
        z-index: 200;
        box-shadow: var(--shadow-lg);
    }
    .sidebar-backdrop {
        position: fixed; inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 199;
    }
}

/* SIDEBAR */
.sidebar {
    grid-area: sidebar;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 16px 0;
    overflow-y: auto;
}
.sidebar-brand {
    padding: 4px 20px 20px;
    display: flex; align-items: center; gap: 10px;
    font-weight: 800; font-size: 18px;
    color: var(--brand-600);
}
.sidebar-brand-icon {
    width: 34px; height: 34px;
    background: var(--brand-600);
    color: white;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800;
}
.nav-section { padding: 12px 20px 6px; font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 20px;
    color: var(--text-muted);
    cursor: pointer;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: background .12s, color .12s;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active {
    background: var(--brand-50);
    color: var(--brand-700);
    border-left-color: var(--brand-600);
}
[data-theme="dark"] .nav-item.active { background: rgba(59,130,246,0.15); color: var(--brand-500); }
.nav-icon { width: 20px; text-align: center; opacity: 0.9; }
.nav-item .badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 700;
}

/* TOP BAR */
.topbar {
    grid-area: topbar;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.topbar h1 { margin: 0; font-size: 18px; font-weight: 700; }
.topbar-spacer { flex: 1; }
.topbar-user {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 10px 6px 6px;
    border-radius: 999px;
    background: var(--surface-2);
    cursor: pointer;
    font-weight: 600;
}
.user-avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--brand-600);
    color: white;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 12px;
}
.hamburger {
    display: none;
    width: 36px; height: 36px;
    border: none; background: transparent;
    cursor: pointer;
    font-size: 20px;
    color: var(--text);
}
@media (max-width: 767px) { .hamburger { display: block; } }

/* CONTENT */
.content { grid-area: content; padding: 20px; overflow: auto; }

/* =========================================================
   CARDS / KPI TILES
   ========================================================= */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: var(--shadow-sm);
}
.card h3 { margin: 0 0 4px; font-size: 14px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.kpi-tile {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
    display: flex; flex-direction: column; gap: 4px;
    box-shadow: var(--shadow-sm);
}
.kpi-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.kpi-value { font-size: 26px; font-weight: 800; color: var(--text); }
.kpi-sub   { font-size: 12px; color: var(--text-muted); }
.kpi-sub.up   { color: var(--success); }
.kpi-sub.down { color: var(--danger); }
.kpi-icon {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; color: white;
    align-self: flex-end; margin-top: -32px;
}

.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }

/* =========================================================
   TABLES
   ========================================================= */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    text-align: left;
    padding: 10px 12px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
    position: sticky; top: 0;
}
.data-table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:hover td { background: var(--surface-2); }

.badge-pill {
    display: inline-flex; align-items: center;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger); }
.badge-info    { background: var(--brand-50);   color: var(--brand-700); }
.badge-muted   { background: var(--surface-2);  color: var(--text-muted); }
[data-theme="dark"] .badge-info { background: rgba(59,130,246,0.2); color: #93c5fd; }

/* =========================================================
   POS LAYOUT
   ========================================================= */
.pos-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 16px;
    height: calc(100vh - var(--topbar-h) - 40px);
}
@media (max-width: 1023px) {
    .pos-layout { grid-template-columns: 1fr; }
    .pos-cart { position: fixed; right: 0; top: 0; bottom: 0; width: 100%; max-width: 400px; z-index: 150; display: none; }
    .pos-cart.open { display: flex; box-shadow: var(--shadow-lg); }
}

.pos-menu { display: flex; flex-direction: column; overflow: hidden; }
.pos-cat-strip {
    display: flex; gap: 8px; overflow-x: auto;
    padding-bottom: 10px; margin-bottom: 10px;
    scrollbar-width: thin;
}
.pos-cat-chip {
    padding: 10px 16px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all .15s;
}
.pos-cat-chip:hover { border-color: var(--brand-500); }
.pos-cat-chip.active {
    background: var(--brand-600);
    border-color: var(--brand-600);
    color: white;
}
.pos-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    overflow-y: auto;
    padding-right: 4px;
    padding-bottom: 20px;
    flex: 1;
}
.pos-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    cursor: pointer;
    display: flex; flex-direction: column; gap: 6px;
    min-height: 110px;
    transition: transform .1s, box-shadow .15s, border-color .15s;
    position: relative;
}
.pos-item:hover { border-color: var(--brand-500); box-shadow: var(--shadow); }
.pos-item:active { transform: scale(0.98); }
.pos-item-name { font-weight: 700; font-size: 14px; line-height: 1.3; flex: 1; }
.pos-item-price { color: var(--brand-700); font-weight: 800; font-size: 15px; }
.pos-item-veg-dot {
    width: 12px; height: 12px;
    border: 2px solid var(--success);
    border-radius: 3px;
    display: inline-block;
    position: relative;
}
.pos-item-veg-dot::after {
    content: ''; width: 5px; height: 5px; border-radius: 50%;
    background: var(--success);
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%,-50%);
}
.pos-item-veg-dot.nonveg { border-color: var(--danger); }
.pos-item-veg-dot.nonveg::after { background: var(--danger); }
.pos-item.unavailable { opacity: 0.4; cursor: not-allowed; }

/* POS CART */
.pos-cart {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex; flex-direction: column;
    overflow: hidden;
}
.pos-cart-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 8px;
}
.pos-cart-header h3 { margin: 0; font-size: 16px; }
.pos-cart-meta { padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: 13px; }
.pos-cart-meta .row { display: flex; justify-content: space-between; margin: 2px 0; }
.pos-cart-lines { flex: 1; overflow-y: auto; padding: 8px; }
.pos-cart-empty { text-align: center; color: var(--text-muted); padding: 40px 20px; }
.cart-line {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px;
    padding: 10px;
    border-bottom: 1px dashed var(--border);
    align-items: center;
}
.cart-line-name { font-weight: 600; font-size: 13px; }
.cart-line-price { text-align: right; font-weight: 700; }
.cart-line-controls { display: flex; align-items: center; gap: 6px; grid-column: 1 / -1; margin-top: 4px; }
.qty-btn {
    width: 28px; height: 28px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    border-radius: 6px;
    cursor: pointer; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    color: var(--text);
}
.qty-btn:hover { background: var(--brand-50); border-color: var(--brand-500); }
.qty-value { min-width: 32px; text-align: center; font-weight: 700; }
.cart-line-remove {
    margin-left: auto;
    background: transparent;
    color: var(--danger);
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.pos-cart-totals { padding: 12px 16px; border-top: 1px solid var(--border); }
.pos-cart-totals .row { display: flex; justify-content: space-between; margin: 4px 0; font-size: 13px; }
.pos-cart-totals .total-row { font-size: 20px; font-weight: 800; padding-top: 8px; border-top: 1px solid var(--border); margin-top: 8px; }
.pos-cart-actions { padding: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pos-cart-actions .btn-full { grid-column: 1 / -1; }

/* Order type toggle */
.order-type-toggle {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 4px;
    background: var(--surface-2);
    border-radius: var(--radius);
    margin: 12px 16px;
}
.order-type-toggle button {
    padding: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px;
    color: var(--text-muted);
}
.order-type-toggle button.active {
    background: var(--surface);
    color: var(--brand-700);
    box-shadow: var(--shadow-sm);
}

/* =========================================================
   TABLES / FLOOR PLAN
   ========================================================= */
.floor-plan {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    min-height: 450px;
    position: relative;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: 20px 20px;
    overflow: auto;
}
.table-marker {
    position: absolute;
    width: 90px; height: 90px;
    border-radius: var(--radius);
    background: var(--success-bg);
    border: 3px solid var(--success);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    font-weight: 700;
    cursor: pointer;
    transition: transform .1s;
    padding: 8px;
    text-align: center;
}
.table-marker:hover { transform: scale(1.05); }
.table-marker.round { border-radius: 50%; }
.table-marker.rectangle { width: 130px; }

.table-marker.occupied   { background: var(--warning-bg); border-color: var(--warning); }
.table-marker.reserved   { background: var(--brand-50);   border-color: var(--brand-600); }
.table-marker.billing    { background: #ede9fe;           border-color: #8b5cf6; }
.table-marker.cleaning   { background: var(--danger-bg);  border-color: var(--danger); }
[data-theme="dark"] .table-marker.occupied { background: rgba(245,158,11,0.15); }
[data-theme="dark"] .table-marker.reserved { background: rgba(59,130,246,0.15); }
[data-theme="dark"] .table-marker.billing  { background: rgba(139,92,246,0.15); }
[data-theme="dark"] .table-marker.cleaning { background: rgba(239,68,68,0.15); }

.table-number { font-size: 16px; font-weight: 800; }
.table-capacity { font-size: 11px; color: var(--text-muted); }
.table-total { font-size: 12px; font-weight: 700; margin-top: 3px; }

.floor-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; font-size: 12px; }
.floor-legend .dot { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: 4px; vertical-align: middle; border: 2px solid; }
.dot.available { border-color: var(--success); background: var(--success-bg); }
.dot.occupied  { border-color: var(--warning); background: var(--warning-bg); }
.dot.reserved  { border-color: var(--brand-600); background: var(--brand-50); }
.dot.cleaning  { border-color: var(--danger);  background: var(--danger-bg); }
.dot.billing   { border-color: #8b5cf6; background: #ede9fe; }

/* =========================================================
   KITCHEN DISPLAY
   ========================================================= */
.kds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
}
.kds-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-top: 4px solid var(--brand-600);
    border-radius: var(--radius-lg);
    padding: 12px;
    display: flex; flex-direction: column;
    box-shadow: var(--shadow-sm);
}
.kds-card.delayed { border-top-color: var(--danger); animation: kds-pulse 2s infinite; }
@keyframes kds-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); } 50% { box-shadow: 0 0 0 8px rgba(239,68,68,0); } }
.kds-header { display: flex; justify-content: space-between; margin-bottom: 8px; align-items: center; }
.kds-order-num { font-weight: 800; font-size: 16px; }
.kds-time { font-family: monospace; font-weight: 700; color: var(--text-muted); }
.kds-time.delayed { color: var(--danger); }
.kds-meta { color: var(--text-muted); font-size: 12px; margin-bottom: 8px; }
.kds-items { flex: 1; }
.kds-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px;
    border-bottom: 1px dashed var(--border);
    font-size: 14px;
}
.kds-item:last-child { border-bottom: none; }
.kds-item.status-ready  { background: var(--success-bg); border-radius: 6px; }
.kds-item.status-preparing  { background: var(--warning-bg); border-radius: 6px; }
[data-theme="dark"] .kds-item.status-ready  { background: rgba(16,185,129,0.15); }
[data-theme="dark"] .kds-item.status-preparing { background: rgba(245,158,11,0.15); }
.kds-item-qty { font-weight: 800; min-width: 28px; }
.kds-item-name { flex: 1; font-weight: 600; }
.kds-item-notes { color: var(--warning); font-style: italic; font-size: 12px; margin-top: 3px; }
.kds-actions { display: flex; gap: 6px; margin-top: 8px; }
.kds-actions .btn { flex: 1; padding: 8px; font-size: 12px; }

/* =========================================================
   MODAL
   ========================================================= */
.modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(15,23,42,0.6);
    z-index: 500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
}
.modal-lg { max-width: 720px; }
.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { margin: 0; }
.modal-close {
    background: transparent; border: none;
    font-size: 24px; cursor: pointer;
    color: var(--text-muted); line-height: 1;
}
.modal-body { padding: 20px; }
.modal-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    display: flex; gap: 8px; justify-content: flex-end;
}

/* Payment method grid */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}
.payment-method {
    padding: 16px 8px;
    text-align: center;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    background: var(--surface);
    font-weight: 700;
    font-size: 12px;
    transition: all .15s;
}
.payment-method:hover { border-color: var(--brand-500); }
.payment-method.active { background: var(--brand-600); color: white; border-color: var(--brand-600); }
.payment-method-icon { font-size: 22px; display: block; margin-bottom: 4px; }

/* Toast */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 1000; display: flex; flex-direction: column; gap: 8px; }
.toast {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--brand-600);
    padding: 12px 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 240px;
    animation: toast-in .2s;
}
.toast.success { border-left-color: var(--success); }
.toast.error   { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
@keyframes toast-in { from { transform: translateX(20px); opacity: 0; } }

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
.spinner-dark { border-color: rgba(0,0,0,0.15); border-top-color: var(--brand-600); }
.spinner-lg { width: 40px; height: 40px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

.loading-panel { padding: 60px; text-align: center; color: var(--text-muted); }

/* Utility */
.text-muted { color: var(--text-muted); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }
.d-flex { display: flex; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.flex-1 { flex: 1; }
.hidden { display: none !important; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.section-header h2 { margin: 0; font-size: 20px; }

/* Empty state */
.empty-state { padding: 60px 20px; text-align: center; color: var(--text-muted); }
.empty-state .icon { font-size: 42px; margin-bottom: 12px; opacity: 0.5; }
