/* =====================================================
   MIRDEX ADMIN PANEL — Premium Dark Silicon Valley
   ===================================================== */

:root {
    --bg: #09090b;
    --surface: #18181b;
    --surface-hi: #1f1f23;
    --hover: #27272a;
    --border: #27272a;
    --border-hi: #3f3f46;
    --text: #f4f4f5;
    --text-muted: #71717a;
    --primary: #f59e0b;
    --primary-hover: #fbbf24;
    --danger: #ef4444;
    --green: #22c55e;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --font: 'Outfit', -apple-system, sans-serif;
    --sidebar-w: 260px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ---- MOBILE HEADER & DRAWER ---- */
.mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
}

.mobile-header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-header-brand span {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.5px;
}

.mobile-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: var(--hover);
    border: 1px solid var(--border);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.mobile-icon-btn:hover {
    border-color: var(--border-hi);
    color: var(--primary);
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 95;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.sidebar-backdrop.active {
    display: block;
    opacity: 1;
}

/* Mobile Quick Tabs Bar */
.mobile-tabs {
    display: none;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 8px 12px;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.mobile-tabs::-webkit-scrollbar { display: none; }

.mobile-tab-btn {
    flex: 1;
    min-width: 85px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    transition: all 0.2s;
}

.mobile-tab-btn.active {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.25);
    color: var(--primary);
}

/* ---- LAYOUT ---- */
.admin-layout { display: flex; min-height: 100vh; position: relative; }

/* ---- SIDEBAR ---- */
.sidebar {
    width: var(--sidebar-w);
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    flex-shrink: 0;
    z-index: 40;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px;
}

.sidebar-brand-img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
}

.sidebar-brand span {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.5px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.97rem;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.nav-link:hover { background: var(--hover); color: var(--text); }
.nav-link.active {
    background: rgba(245, 158, 11, 0.1);
    color: var(--primary);
    border-color: rgba(245, 158, 11, 0.2);
}

.preview-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: var(--hover);
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
    margin-top: auto;
}

.preview-btn:hover { background: var(--primary); color: #000; }

/* ---- MAIN CONTENT ---- */
.admin-main {
    flex: 1;
    padding: 48px;
    overflow-y: auto;
    overflow-x: hidden;
    min-width: 0;
}

/* ---- TABS ---- */
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.3s ease; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- PAGE HEADER ---- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.75px;
}

.page-header p { color: var(--text-muted); margin-top: 6px; font-size: 0.97rem; }

/* ---- LAYOUTS ---- */
.two-col-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 28px;
    align-items: start;
}

.single-col-layout { max-width: 600px; }

@media (max-width: 1024px) {
    .two-col-layout { grid-template-columns: 1fr; gap: 20px; }
    .admin-main { padding: 32px 24px; }
}

@media (max-width: 768px) {
    .mobile-header { display: flex; }
    .mobile-tabs { display: flex; }

    .admin-layout {
        flex-direction: column;
        min-height: 100vh;
        min-height: 100dvh;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        height: 100vh;
        height: 100dvh;
        width: 280px;
        max-width: 82vw;
        background: #111114;
        box-shadow: 8px 0 32px rgba(0,0,0,0.7);
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 100;
        padding: 24px 18px;
        gap: 24px;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .admin-main {
        padding: 20px 14px 48px;
        width: 100%;
    }

    .page-header {
        margin-bottom: 20px;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .card {
        padding: 20px 16px;
        border-radius: var(--radius-md);
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .upload-zone {
        height: 130px;
    }

    .admin-item {
        padding: 10px 12px;
        gap: 10px;
    }

    .admin-item-img {
        width: 50px;
        height: 50px;
    }

    .admin-item-name {
        font-size: 0.9rem;
    }

    .admin-item-meta {
        font-size: 0.78rem;
    }

    .cat-item {
        padding: 12px 14px;
    }

    .cat-item-name {
        font-size: 0.9rem;
    }
}

/* ---- CARD ---- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title::before {
    content: '';
    display: block;
    width: 3px;
    height: 18px;
    background: var(--primary);
    border-radius: 2px;
    flex-shrink: 0;
}

.card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.card-title-row .card-title { margin-bottom: 0; }

.badge {
    background: var(--hover);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 30px;
}

/* ---- FORM ELEMENTS ---- */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-size: 0.9rem; font-weight: 500; color: var(--text-muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-hint { font-size: 0.82rem; color: var(--text-muted); margin-top: 6px; }

.form-control {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.97rem;
    padding: 11px 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    -webkit-appearance: none;
}

.form-control::placeholder { color: var(--text-muted); }

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

select.form-control { cursor: pointer; }

textarea.form-control { resize: vertical; min-height: 80px; }

/* ---- UPLOAD ZONE ---- */
.upload-zone {
    position: relative;
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    background: var(--bg);
    height: 150px;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--primary);
    background: rgba(245, 158, 11, 0.04);
}

.upload-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    z-index: 10;
}

#imagePreview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent;
    display: none;
    z-index: 1;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    z-index: 2;
}

.upload-placeholder svg { width: 36px; height: 36px; color: var(--text-muted); }
.upload-placeholder p { font-size: 0.95rem; color: var(--text-muted); }
.upload-placeholder span { font-size: 0.8rem; color: #52525b; }

/* ---- BUTTONS ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.97rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary { background: var(--primary); color: #000; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3); }
.btn-full { width: 100%; }
.btn-danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); padding: 7px 14px; font-size: 0.85rem; }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-ghost { background: var(--hover); color: var(--text-muted); }
.btn-ghost:hover { background: var(--border-hi); color: var(--text); }

/* ---- LIST ITEMS ---- */
.list-container { display: flex; flex-direction: column; gap: 12px; }

.admin-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: border-color 0.2s;
    animation: fadeIn 0.3s ease both;
}

.admin-item:hover { border-color: var(--border-hi); }

.admin-item-img {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: contain;
    flex-shrink: 0;
    border: 1px solid var(--border);
    background: var(--surface-hi);
    padding: 3px;
    box-sizing: border-box;
}

.admin-item-info { flex: 1; min-width: 0; }
.admin-item-name { font-weight: 600; font-size: 0.97rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-item-meta { font-size: 0.85rem; color: var(--text-muted); margin-top: 3px; }

/* Category list items */
.cat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: border-color 0.2s;
    animation: fadeIn 0.3s ease both;
}

.cat-item:hover { border-color: var(--border-hi); }
.cat-item-name { font-weight: 500; font-size: 0.97rem; }

/* ---- EMPTY STATE ---- */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
}

.empty-state svg { width: 40px; height: 40px; opacity: 0.4; margin: 0 auto 12px; display: block; }
.empty-state p { font-size: 0.95rem; }

/* ---- TOAST (bottom) ---- */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 12px 20px;
    border-radius: 40px;
    font-size: 0.92rem;
    font-weight: 500;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    opacity: 0;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    max-width: min(90vw, 440px);
    width: max-content;
    text-align: center;
    word-break: break-word;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success { border-color: var(--green); color: var(--green); }
.toast.error { border-color: var(--danger); color: var(--danger); }

/* ---- TOAST TOP (auth errors) ---- */
.toast-top {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: #1c1010;
    border: 1px solid var(--danger);
    color: var(--danger);
    padding: 12px 20px;
    border-radius: 40px;
    font-size: 0.92rem;
    font-weight: 500;
    box-shadow: 0 8px 30px rgba(239, 68, 68, 0.2);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 9999;
    max-width: min(90vw, 440px);
    width: max-content;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    word-break: break-word;
}

.toast-top::before {
    content: '⚠';
    font-size: 1rem;
    flex-shrink: 0;
}

.toast-top.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ---- DANGER COLOR VAR (used in auth-error) ---- */
:root { --danger-color: #ef4444; }

/* ---- CUSTOM CONFIRM DIALOG ---- */
.dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.dialog-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.dialog-box {
    background: var(--surface);
    border: 1px solid var(--border-hi);
    border-radius: var(--radius-lg);
    padding: clamp(24px, 5vw, 36px) clamp(16px, 4vw, 28px);
    width: min(92vw, 420px);
    text-align: center;
    transform: scale(0.9) translateY(10px);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.dialog-overlay.open .dialog-box {
    transform: scale(1) translateY(0);
}

.dialog-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--danger);
}

.dialog-icon svg { width: 28px; height: 28px; }

.dialog-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
    letter-spacing: -0.3px;
}

.dialog-message {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
}

.dialog-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.dialog-actions .btn { flex: 1; min-width: 110px; }

.btn-danger-solid {
    background: var(--danger);
    color: #fff;
}

.btn-danger-solid:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

/* ---- SPLIT SCREEN AUTH ---- */
.auth-split-layout {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--bg);
    width: 100%;
}

.auth-graphic {
    flex: 1;
    display: none;
    position: relative;
    background: linear-gradient(135deg, rgba(9, 9, 11, 0.4), rgba(9, 9, 11, 0.9)), url('https://images.unsplash.com/photo-1550966871-3ed3cdb5ed0c?q=80&w=2000&auto=format&fit=crop') center/cover;
}

@media (min-width: 992px) {
    .auth-graphic { display: flex; flex-direction: column; justify-content: space-between; padding: 48px; }
}

.auth-graphic-content {
    max-width: 480px;
    margin-top: auto;
    margin-bottom: auto;
}

.auth-graphic h1 {
    font-size: clamp(2.2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -1px;
    color: #fff;
}

.auth-graphic p {
    font-size: clamp(1rem, 1.5vw, 1.1rem);
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.auth-form-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: clamp(24px, 5vw, 48px) clamp(16px, 4vw, 24px);
    position: relative;
    width: 100%;
}

.auth-form-wrapper {
    width: 100%;
    max-width: 400px;
    animation: fadeIn 0.5s ease-out;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: clamp(24px, 4vw, 40px);
    text-decoration: none;
}

.auth-logo img {
    width: 38px;
    height: 38px;
    border-radius: 10px;
}

.auth-logo span {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.5px;
}

.auth-header { margin-bottom: clamp(20px, 4vw, 32px); }
.auth-header h2 { font-size: clamp(1.6rem, 5vw, 2rem); font-weight: 700; letter-spacing: -0.5px; margin-bottom: 8px; }
.auth-header p { color: var(--text-muted); font-size: 0.95rem; }

.auth-footer { margin-top: clamp(20px, 4vw, 32px); text-align: center; color: var(--text-muted); font-size: 0.95rem; }
.auth-footer a { color: var(--text); text-decoration: none; font-weight: 600; transition: color 0.2s; border-bottom: 1px solid var(--border-hi); padding-bottom: 2px;}
.auth-footer a:hover { color: var(--primary); border-color: var(--primary); }

.btn-provider {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
    min-height: 46px;
}
.btn-provider:hover {
    background: var(--hover);
    border-color: var(--border-hi);
}
.btn-provider img { width: 20px; height: 20px; }

.auth-divider {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.auth-divider::before, .auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}
.auth-divider::before { margin-right: 16px; }
.auth-divider::after { margin-left: 16px; }

@media (max-width: 480px) {
    .dialog-actions {
        flex-direction: column;
    }
    .dialog-actions .btn {
        width: 100%;
    }
}

/* =====================================================
/* =====================================================
   LIVE ORDERS & KITCHEN ALARM — PREMIUM SILICON VALLEY
   ===================================================== */

/* Global Outline & Action Button Helpers */
.btn-outline {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    font-family: inherit;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-hi);
    color: #fff;
    transform: translateY(-1px);
}

.btn-success {
    background: #16a34a;
    border: 1px solid #22c55e;
    color: #fff;
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-success:hover {
    background: #22c55e;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
    transform: translateY(-1px);
}

.btn-danger-outline {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #f87171;
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-danger-outline:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #fff;
    transform: translateY(-1px);
}

/* Nav Badge */
.nav-badge {
    background: var(--primary);
    color: #000;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 12px;
    margin-left: auto;
    line-height: 1;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

/* Page Header & Live Sync Badge */
.orders-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.orders-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.live-sync-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.28);
    color: #4ade80;
    padding: 4px 11px;
    border-radius: 9999px;
    letter-spacing: 0.3px;
}

.sync-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px #22c55e;
    animation: syncPulse 2s infinite ease-in-out;
}

@keyframes syncPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

.test-chime-btn {
    border-color: rgba(245, 158, 11, 0.3);
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.05);
}

.test-chime-btn:hover {
    background: rgba(245, 158, 11, 0.15);
    border-color: var(--primary);
    color: #fff;
}

/* Glassmorphic Alert Banner */
.alarm-banner {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.18) 0%, rgba(153, 27, 27, 0.28) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fff;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    display: none;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px -5px rgba(239, 68, 68, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: pulseAlarmBorder 1.8s infinite ease-in-out;
}

@keyframes pulseAlarmBorder {
    0%, 100% {
        border-color: rgba(239, 68, 68, 0.4);
        box-shadow: 0 10px 30px -5px rgba(239, 68, 68, 0.35);
    }
    50% {
        border-color: rgba(239, 68, 68, 0.85);
        box-shadow: 0 14px 38px -2px rgba(239, 68, 68, 0.6);
    }
}

.alarm-banner-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.alarm-beacon {
    position: relative;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.beacon-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 10px #ef4444;
}

.beacon-pulse {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.6);
    animation: beaconPing 1.4s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes beaconPing {
    0% { transform: scale(0.8); opacity: 0.9; }
    100% { transform: scale(2.4); opacity: 0; }
}

.alarm-title {
    font-weight: 700;
    font-size: 0.96rem;
    color: #fef2f2;
    letter-spacing: -0.2px;
}

.alarm-sub {
    font-size: 0.78rem;
    color: #fca5a5;
    margin-top: 1px;
}

.btn-silence {
    background: rgba(239, 68, 68, 0.25);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #fecaca;
    border-radius: 9999px;
    padding: 7px 16px;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.btn-silence:hover {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

/* Modern Segmented Filter Pills */
.order-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
}

.order-filter-pill {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 9999px;
    padding: 7px 16px;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    font-family: inherit;
}

.order-filter-pill:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.15);
}

.order-filter-pill.active {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.4);
    color: #f59e0b;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.15);
}

.order-filter-pill .pill-count {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-size: 0.73rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.order-filter-pill.active .pill-count {
    background: rgba(245, 158, 11, 0.25);
    color: #fbbf24;
}

/* Orders Grid & Cards */
.orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 20px;
}

.order-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeIn 0.3s ease both;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.order-card:hover {
    border-color: var(--border-hi);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.order-card.status-pending {
    border-color: rgba(245, 158, 11, 0.4);
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.04) 0%, var(--surface) 100%);
    box-shadow: 0 4px 24px rgba(245, 158, 11, 0.12);
}

.order-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    gap: 10px;
}

.order-location {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 7px;
    letter-spacing: -0.2px;
}

.location-icon {
    color: var(--primary);
    flex-shrink: 0;
}

.order-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Channel Pill (Direct vs WhatsApp) */
.channel-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.channel-pill.channel-direct {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.channel-pill.channel-whatsapp {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

/* Status Badges with Indicators */
.status-badge {
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.status-indicator-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-badge.pending {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.status-badge.pending .status-indicator-dot {
    background: #f59e0b;
    box-shadow: 0 0 6px #f59e0b;
}

.status-badge.preparing {
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}
.status-badge.preparing .status-indicator-dot {
    background: #3b82f6;
    box-shadow: 0 0 6px #3b82f6;
}

.status-badge.delivered {
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}
.status-badge.delivered .status-indicator-dot {
    background: #22c55e;
    box-shadow: 0 0 6px #22c55e;
}

.status-badge.cancelled {
    background: rgba(113, 113, 122, 0.15);
    color: #a1a1aa;
    border: 1px solid rgba(113, 113, 122, 0.3);
}
.status-badge.cancelled .status-indicator-dot {
    background: #71717a;
}

/* Items List */
.order-items-table {
    display: flex;
    flex-direction: column;
    gap: 9px;
    font-size: 0.88rem;
}

.order-item-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text);
    gap: 8px;
}

.order-item-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-item-qty {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    font-weight: 700;
    font-size: 0.78rem;
    padding: 2px 7px;
    border-radius: 4px;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.order-item-title {
    font-weight: 500;
}

.order-item-price {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.84rem;
}

/* Order Notes */
.order-notes-box {
    background: rgba(245, 158, 11, 0.06);
    border: 1px dashed rgba(245, 158, 11, 0.35);
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    font-size: 0.82rem;
    color: #fde68a;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
}

/* Total Bar */
.order-total-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 2px;
}

.total-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.total-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.3px;
}

/* Actions */
.order-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.btn-order-action {
    flex: 1;
    min-width: 120px;
    font-size: 0.85rem;
    padding: 9px 14px;
    border-radius: var(--radius-sm);
}
