/* ============================================================
   ZENQOR TECHNOLOGIES - custom.css (CLEAN STYLESHEET v2.2)
   ============================================================ */

body { 
    font-family: 'Inter', sans-serif; 
    background: #f8fafc;
    text-rendering: optimizeLegibility;
}

[v-cloak] { 
    display: none !important; 
}

/* Login splash: logo-led 3D welcome effect */
.login-splash {
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 38%, rgba(45, 212, 191, 0.24), transparent 22rem),
        radial-gradient(circle at 12% 88%, rgba(231, 111, 81, 0.17), transparent 24rem),
        linear-gradient(135deg, #111827, #18212f 58%, #0f3f3a);
}

.splash-logo-stage {
    position: relative;
    z-index: 2;
    perspective: 1000px;
}

.splash-logo-card {
    display: flex;
    width: min(19rem, 74vw);
    aspect-ratio: 16 / 9;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 28px 54px rgba(0, 0, 0, 0.36), 0 0 46px rgba(45, 212, 191, 0.22);
    transform-style: preserve-3d;
    animation: splash-logo-float 3.8s ease-in-out infinite;
}

.splash-logo-card::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(118deg, rgba(255, 255, 255, 0.54), transparent 35%, transparent 68%, rgba(15, 118, 110, 0.16));
}

.splash-logo-image {
    width: 82%;
    height: 82%;
    object-fit: contain;
    transform: translateZ(28px);
}

.splash-orbit {
    position: absolute;
    left: 50%;
    top: 7.5rem;
    z-index: 1;
    width: 23rem;
    height: 23rem;
    border: 1px solid rgba(94, 234, 212, 0.26);
    border-radius: 50%;
    transform: translateX(-50%) rotateX(68deg);
    animation: splash-orbit-spin 8s linear infinite;
}

.splash-orbit-two {
    width: 17rem;
    height: 17rem;
    border-color: rgba(251, 191, 36, 0.2);
    animation-direction: reverse;
    animation-duration: 6s;
}

.splash-progress {
    width: 11rem;
    height: 0.22rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}

.splash-progress span {
    display: block;
    width: 46%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #14b8a6, #5eead4, #fbbf24);
    animation: splash-progress 1.2s ease-in-out infinite;
}

@keyframes splash-logo-float {
    0%, 100% { transform: rotateX(5deg) rotateY(-7deg) translateY(0); }
    50% { transform: rotateX(-4deg) rotateY(8deg) translateY(-12px); }
}

@keyframes splash-orbit-spin {
    to { transform: translateX(-50%) rotateX(68deg) rotateZ(360deg); }
}

@keyframes splash-progress {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(290%); }
}

@media (prefers-reduced-motion: reduce) {
    .splash-logo-card,
    .splash-orbit,
    .splash-progress span { animation: none; }
}

/* Lencana Tab & Menu Aktif Sidebar */
.sidebar-item-active {
    background-color: #0F766E;
    color: #FFFFFF;
    font-weight: 700;
    box-shadow: none;
    border-left: 4px solid #E76F51;
    pointer-events: auto;
}

/* Client Portal — distinct accent so client sessions read visually apart from internal staff sessions */
.client-portal-theme {
    border-right-color: #1D4ED8;
}
.client-portal-theme .sidebar-item-active {
    background-color: #1D4ED8;
    border-left-color: #93C5FD;
}

/* ============================================================
   PORTAL UI POLISH — consistent, calm and accessible surfaces
   ============================================================ */
@media screen {
    #app {
        min-height: 100vh;
    }

    #app main {
        background-image: radial-gradient(circle at 100% 0, rgba(15, 118, 110, 0.1), transparent 28rem), linear-gradient(180deg, #f8fafc 0, #f1f5f9 100%);
    }

    .dark #app main {
        background-image: radial-gradient(circle at 100% 0, rgba(45, 212, 191, 0.08), transparent 28rem), linear-gradient(180deg, #0f172a 0, #0b1220 100%);
    }

    #app input,
    #app select,
    #app textarea {
        transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
    }

    #app input:hover,
    #app select:hover,
    #app textarea:hover {
        border-color: #94a3b8;
    }

    #app input:focus-visible,
    #app select:focus-visible,
    #app textarea:focus-visible,
    #app button:focus-visible,
    #app a:focus-visible {
        outline: 3px solid rgba(15, 118, 110, 0.28);
        outline-offset: 2px;
    }

    #app button {
        transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, color 160ms ease;
    }

    #app button:not(:disabled):active {
        transform: translateY(1px);
    }

    #app .rounded-2xl {
        border-radius: 0.7rem;
    }

    #app .rounded-xl {
        border-radius: 0.45rem;
    }

    #app .rounded-lg {
        border-radius: 0.3rem;
    }

    #app .bg-white.rounded-2xl,
    #app .dark\:bg-slate-800.rounded-2xl {
        box-shadow: 0 6px 22px rgba(15, 23, 42, 0.06);
    }

    #app .bg-white.rounded-2xl {
        border-color: #d7e0e8;
    }

    .dark #app .dark\:bg-slate-800.rounded-2xl {
        border-color: #334155;
        box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28);
    }

    #app table thead {
        position: sticky;
        top: 0;
        z-index: 10;
    }

    #app table tbody tr {
        transition: background-color 150ms ease;
    }

    #app table thead tr {
        background: #e2e8f0;
        color: #334155;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        font-size: 0.68rem;
    }

    .dark #app table thead tr {
        background: #1e293b;
        color: #cbd5e1;
    }

    #app table tbody tr:hover {
        background: #f0fdfa !important;
    }

    .dark #app table tbody tr:hover {
        background: #1e293b !important;
    }

    #app label {
        color: #475569;
        letter-spacing: 0.025em;
    }

    .dark #app label {
        color: #cbd5e1;
    }

    #app .fixed.inset-0 > .bg-white,
    #app .fixed.inset-0 > .dark\:bg-slate-800 {
        box-shadow: 0 24px 64px rgba(15, 23, 42, 0.25);
    }

    .sidebar-item-active {
        background-image: linear-gradient(90deg, #0f766e, #14b8a6);
    }

    .sidebar-item-active i {
        color: #fbbf24;
    }

    @media (max-width: 767px) {
        #app main {
            background-image: none;
        }

        #app header {
            padding-top: 0.7rem;
            padding-bottom: 0.7rem;
        }

        #app .overflow-x-auto {
            -webkit-overflow-scrolling: touch;
        }

        #app table th,
        #app table td {
            white-space: nowrap;
        }

        #app .fixed.inset-0 {
            padding: 0.75rem;
        }
    }
}

/* Modern corporate portal visual language */
@media screen {
    #app aside {
        background: linear-gradient(180deg, #18212f 0%, #111827 100%) !important;
        border-right-color: rgba(20, 184, 166, 0.35) !important;
    }

    #app aside > div:first-child {
        border-bottom-color: rgba(255, 255, 255, 0.14) !important;
        position: relative;
    }

    #app aside > div:first-child::before {
        content: '';
        position: absolute;
        left: 1rem;
        right: 1rem;
        bottom: -1px;
        height: 2px;
        background: linear-gradient(90deg, #0f766e, #2dd4bf);
    }

    #app header {
        border-bottom: 3px solid #0f766e !important;
        box-shadow: 0 1px 6px rgba(15, 23, 42, 0.08);
    }

    #app .bg-brand-dark {
        background-color: #18212f;
    }

    #app .hover\:bg-brand-blue:hover {
        background-color: #0f766e;
    }

    #app .bg-brand-gold {
        background-color: #e76f51;
    }

    #app .text-brand-gold {
        color: #c2412d;
    }

    #app .border-brand-gold {
        border-color: #e76f51;
    }


    #app input,
    #app select,
    #app textarea {
        border-color: #cbd5e1;
        background-color: #ffffff;
    }

    #app input:focus,
    #app select:focus,
    #app textarea:focus {
        border-color: #0f766e;
        box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
    }

    .dark #app input,
    .dark #app select,
    .dark #app textarea {
        background-color: #253247;
    }
}

/* Penyesuaian Bar Skrol (Scrollbar styling) */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #0D172A;
}
::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #D4AF37;
}

/* ============================================================
   PENETAPAN MOD CETAKAN & EKSPORT PDF (A4 PRINT / HTML2PDF)
   ============================================================ */
@media print {
    body { 
        background-color: white !important; 
        color: black !important;
        margin: 0 !important; 
        padding: 0 !important; 
        -webkit-print-color-adjust: exact !important; 
        print-color-adjust: exact !important; 
    }
    .no-print { 
        display: none !important; 
    }
    .print-only { 
        display: block !important; 
    }
    
    .print-container {
        position: absolute; 
        left: 0; 
        top: 0; 
        width: 100%;
        background: white; 
        padding: 0; 
        margin: 0;
        box-shadow: none !important;
    }

    .print-table th { 
        background-color: #0B1E36 !important; 
        color: white !important; 
        -webkit-print-color-adjust: exact !important; 
        print-color-adjust: exact !important; 
    }
    .print-header-border { 
        border-bottom: 2px solid #D4AF37 !important; 
    }
    .print-total-box { 
        background-color: #0B1E36 !important; 
        color: white !important; 
        -webkit-print-color-adjust: exact !important; 
        print-color-adjust: exact !important; 
    }
    .print-logo-container {
        background: #000000 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}

.print-only { 
    display: none; 
}

/* Logo Syarikat pada Dokumen & Cetakan */
.print-logo-container {
    width: 46mm;
    height: 18mm;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
    border-radius: 4px;
}

.print-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Approved claim PDF: compact one-page layout */
.claim-print-logo {
    width: 42mm;
    height: 16mm;
    object-fit: contain;
    object-position: center;
    flex: 0 0 auto;
}

@media print {
    .claim-print {
        width: 190mm !important;
        padding: 8mm 10mm !important;
        box-sizing: border-box;
        font-size: 10px !important;
    }
    .claim-print .mb-6 { margin-bottom: 4mm !important; }
    .claim-print .mb-5 { margin-bottom: 3mm !important; }
    .claim-print .pb-5 { padding-bottom: 3mm !important; }
    .claim-print .p-4 { padding: 3mm !important; }
    .claim-print .gap-5 { gap: 3mm !important; }
    .claim-print h1 { font-size: 17px !important; }
    .claim-print h3 { font-size: 10px !important; }
    .claim-print .text-lg { font-size: 14px !important; }
    .claim-print img.max-h-56 {
        max-height: 38mm !important;
        max-width: 100% !important;
        object-fit: contain;
    }
}

/* ============================================================
   GAYA KANVAS PAYSLIP (A4 LANDSCAPE 297mm x 210mm)
   ============================================================ */
.payslip-paper {
    background: white; 
    color: black; 
    width: 297mm; 
    min-height: 205mm; 
    padding: 10mm 14mm; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    font-size: 11px; 
    box-sizing: border-box; 
    display: flex; 
    flex-direction: column;
    margin: 0 auto; 
    overflow: hidden; 
    page-break-inside: avoid;
}
.payslip-header {
    display: flex; 
    justify-content: space-between; 
    align-items: flex-start;
    border-bottom: 2px solid #0B1E36; 
    padding-bottom: 8px; 
    margin-bottom: 10px; 
    width: 100%;
}
.company-brand { 
    display: flex; 
    gap: 12px; 
    align-items: flex-start; 
    width: 62%; 
}
.company-brand img { 
    width: 38mm; 
    height: 16mm; 
    object-fit: cover; 
    object-position: center; 
    overflow: hidden; 
    background: #000000; 
    border-radius: 4px; 
}
.company-brand-text h1 { 
    font-size: 18px; 
    margin-bottom: 2px; 
    text-transform: uppercase; 
    color: #0B1E36; 
    font-weight: 800; 
}
.company-brand-text p { 
    font-size: 10px; 
    color: #334155; 
    margin-bottom: 1px; 
    white-space: pre-wrap; 
    line-height: 1.35; 
    font-weight: 500; 
}
.payslip-title { 
    width: 36%; 
    text-align: right; 
    display: flex; 
    flex-direction: column; 
}
.payslip-title h2 { 
    font-size: 22px; 
    margin-bottom: 4px; 
    color: #D4AF37; 
    letter-spacing: 2px; 
    font-weight: 800; 
}
.payslip-title p { 
    font-size: 11px; 
    margin-bottom: 2px; 
    color: #1E293B; 
    font-weight: 600; 
}

/* Jadual Maklumat Pekerja */
.info-table-container { 
    width: 100%; 
    margin-bottom: 12px; 
}
.info-table { 
    width: 100%; 
    border-collapse: collapse; 
    table-layout: fixed; 
}
.info-table th, .info-table td { 
    padding: 6px 8px; 
    border: 1px solid #CBD5E1; 
    text-align: left; 
    font-size: 11px; 
    vertical-align: middle; 
}
.info-table th { 
    background-color: #F1F5F9 !important; 
    width: 15%; 
    font-weight: 700; 
    color: #0B1E36; 
}
.info-table td { 
    width: 18%; 
    color: #1E293B; 
    font-weight: 600; 
}

/* Seksyen Pecahan Gaji & Potongan */
.salary-breakdown { 
    display: flex; 
    flex-direction: row !important; 
    gap: 16px; 
    margin-bottom: 10px; 
    width: 100%; 
}
.salary-col { 
    flex: 1; 
    width: calc(50% - 8px); 
    display: flex; 
    flex-direction: column; 
}
.calc-table { 
    width: 100%; 
    border-collapse: collapse; 
    margin-bottom: 8px; 
    table-layout: fixed; 
}
.calc-table th, .calc-table td { 
    border: 1px solid #CBD5E1; 
    padding: 6px 8px; 
    color: #1E293B; 
    font-size: 11px; 
    vertical-align: middle; 
}
.calc-table thead th { 
    background: #0B1E36 !important; 
    color: white !important; 
    text-align: left; 
    font-weight: 700; 
}
.calc-table tfoot th, .calc-table tfoot td { 
    background: #E2E8F0 !important; 
    font-weight: 800; 
    color: #0B1E36; 
}
.calc-table td.amount, .calc-table th.amount { 
    text-align: right; 
    font-family: 'Courier New', monospace; 
    font-size: 12px; 
    font-weight: 700; 
    width: 35%; 
}

/* Kotak Gaji Bersih (Net Pay Section) */
.net-pay-section { 
    border: 2px solid #0B1E36; 
    padding: 8px 12px; 
    background: #F8FAFC !important; 
    margin-top: auto; 
    border-radius: 4px; 
}
.net-pay-table { 
    width: 100%; 
    font-size: 12px; 
}
.net-pay-table .final-net td { 
    font-size: 15px; 
    font-weight: 800; 
    color: #0B1E36; 
}
.net-pay-table .amount { 
    text-align: right; 
    font-family: 'Courier New', monospace; 
    color: #1E3A8A; 
    font-weight: 800; 
}

/* Seksyen Sumbangan Statutory (EPF / SOCSO / EIS) */
.contributions-section { 
    width: 100%; 
    margin-bottom: 8px; 
}
.contrib-grid { 
    display: flex; 
    flex-direction: row !important; 
    gap: 16px; 
    width: 100%; 
}
.contrib-col { 
    flex: 1; 
    width: calc(50% - 8px); 
}
.contrib-col h3 { 
    font-size: 11px; 
    margin-bottom: 4px; 
    color: #0B1E36; 
    border-bottom: 2px solid #0B1E36; 
    padding-bottom: 2px; 
    font-weight: 800; 
    text-transform: uppercase; 
}
.contrib-table { 
    width: 100%; 
    border-collapse: collapse; 
    table-layout: fixed; 
}
.contrib-table th, .contrib-table td { 
    border: 1px solid #CBD5E1; 
    padding: 5px 8px; 
    color: #1E293B; 
    font-size: 10px; 
    vertical-align: middle; 
}
.contrib-table th { 
    background: #F1F5F9 !important; 
    text-align: left; 
    font-weight: 700; 
    color: #0B1E36; 
}
.contrib-table td:first-child { 
    width: 44%; 
    font-weight: 600; 
}
.contrib-table td.amount, .contrib-table th.amount { 
    text-align: right; 
    font-family: 'Courier New', monospace; 
    width: 28%; 
    font-weight: 700; 
}

/* Kaki Halaman Elektronik */
.electronic-footer { 
    margin-top: auto; 
    text-align: center; 
    font-size: 10px; 
    color: #64748B; 
    font-style: italic; 
    border-top: 1px dashed #CBD5E1; 
    padding-top: 6px; 
    width: 100%; 
}

/* Format rasmi borang: input maklumat dipaparkan dalam huruf besar. */
input[type="text"],
input[type="search"],
textarea,
select {
    text-transform: uppercase;
}

input[type="email"],
input[type="password"],
input[type="url"] {
    text-transform: none;
}

/* Project Activities: structured responsive workflow and summary layout. */
.project-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.project-summary-card {
    min-width: 0;
    border-top: 3px solid #0F766E;
}

.project-board-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: start;
    gap: 14px;
    width: 100%;
}

/* Board card meta is now a compact 2x2 grid by default; full metadata is available in View Details. */

@media (max-width: 1450px) {
    .project-board-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .project-summary-grid,
    .project-board-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .project-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-summary-card:last-child {
        grid-column: 1 / -1;
    }

    .project-board-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ============================================================
   ZENQOR DESIGN SYSTEM (ZQ) — v1
   ============================================================
   Foundation layer for the enterprise UI modernization. Additive only:
   nothing existing references these classes yet, so shipping this adds
   zero visual/behavioral risk. Modules are migrated to it incrementally.

   Tokens live as CSS custom properties so light/dark and any future
   palette tweak is a one-place edit instead of hunting `dark:` variants
   across index.html. Brand colors match the existing Tailwind
   `brand.*` config in index.html — not reinvented, just made reusable
   outside Tailwind's utility-class context (this project loads Tailwind
   via the browser CDN build, so `@apply` isn't available here; these
   are hand-written CSS rules instead).
   ============================================================ */

:root {
    /* Brand + surface */
    --zq-primary: #18212F;         /* brand-dark */
    --zq-primary-hover: #0f151e;
    --zq-accent: #0F766E;          /* brand-blue */
    --zq-accent-hover: #0c5b55;
    --zq-gold: #E76F51;            /* brand-gold */
    --zq-surface: #ffffff;
    --zq-surface-alt: #f8fafc;     /* slate-50 */
    --zq-surface-elevated: #ffffff;
    --zq-border: #e2e8f0;          /* slate-200 */
    --zq-text: #1e293b;            /* slate-800 */
    --zq-text-muted: #64748b;      /* slate-500 */
    --zq-text-on-primary: #ffffff;

    /* Status (never color-only — every badge below also carries a dot + label) */
    --zq-success: #059669;
    --zq-success-bg: #ecfdf5;
    --zq-warning: #b45309;
    --zq-warning-bg: #fffbeb;
    --zq-error: #dc2626;
    --zq-error-bg: #fef2f2;
    --zq-info: #1d4ed8;
    --zq-info-bg: #eff6ff;
    --zq-neutral: #475569;
    --zq-neutral-bg: #f1f5f9;

    /* Radius scale — deliberately restrained, no pill-everything */
    --zq-radius-sm: 6px;
    --zq-radius-md: 8px;
    --zq-radius-lg: 12px;
    --zq-radius-full: 9999px;

    /* Shadow scale — subtle only */
    --zq-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --zq-shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);

    /* Spacing aliases (mirrors Tailwind's default 4/8/12/16/20/24/32/40/48/64 scale,
       already used via p-1..p-16 utilities — kept here only for hand-written rules
       in this file that don't go through a Tailwind class). */
    --zq-space-1: 4px;  --zq-space-2: 8px;  --zq-space-3: 12px; --zq-space-4: 16px;
    --zq-space-5: 20px; --zq-space-6: 24px; --zq-space-8: 32px; --zq-space-10: 40px;
    --zq-space-12: 48px; --zq-space-16: 64px;

    --zq-transition: 180ms ease;
}

html.dark {
    --zq-primary: #1f2b3d;
    --zq-primary-hover: #16202e;
    --zq-accent: #14b8a6;
    --zq-accent-hover: #0d9488;
    --zq-surface: #1e293b;         /* slate-800 */
    --zq-surface-alt: #0f172a;     /* slate-900 */
    --zq-surface-elevated: #253247;
    --zq-border: #334155;          /* slate-700 */
    --zq-text: #f1f5f9;
    --zq-text-muted: #94a3b8;
    --zq-text-on-primary: #ffffff;

    --zq-success: #34d399;   --zq-success-bg: rgba(16, 185, 129, 0.12);
    --zq-warning: #fbbf24;   --zq-warning-bg: rgba(217, 119, 6, 0.14);
    --zq-error: #f87171;     --zq-error-bg: rgba(220, 38, 38, 0.14);
    --zq-info: #60a5fa;      --zq-info-bg: rgba(37, 99, 235, 0.14);
    --zq-neutral: #cbd5e1;   --zq-neutral-bg: rgba(148, 163, 184, 0.14);

    --zq-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.28);
    --zq-shadow-md: 0 4px 14px rgba(0, 0, 0, 0.32);
}

/* ---- Typography scale (compact, enterprise — no oversized headings) ---- */
.zq-text-page-title    { font-size: 1.25rem; line-height: 1.35; font-weight: 800; letter-spacing: -0.01em; color: var(--zq-text); }
.zq-text-section-title { font-size: 1rem;    line-height: 1.4;  font-weight: 800; color: var(--zq-text); }
.zq-text-card-title    { font-size: 0.875rem; line-height: 1.4; font-weight: 800; color: var(--zq-text); }
.zq-text-body          { font-size: 0.8125rem; line-height: 1.55; color: var(--zq-text); }
.zq-text-small         { font-size: 0.6875rem; line-height: 1.5; color: var(--zq-text-muted); }
.zq-text-label         { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--zq-text-muted); }
.zq-text-caption       { font-size: 0.625rem; line-height: 1.4; color: var(--zq-text-muted); }

/* ---- Button system ---- */
.zq-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 36px; padding: 0 14px; border-radius: var(--zq-radius-md);
    font-size: 0.75rem; font-weight: 700; white-space: nowrap; border: 1px solid transparent;
    cursor: pointer; transition: background-color var(--zq-transition), border-color var(--zq-transition),
        color var(--zq-transition), box-shadow var(--zq-transition), opacity var(--zq-transition);
    user-select: none;
}
.zq-btn:focus-visible { outline: 2px solid var(--zq-accent); outline-offset: 2px; }
.zq-btn:disabled, .zq-btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.zq-btn.is-loading { color: transparent !important; pointer-events: none; position: relative; }
.zq-btn.is-loading::after {
    content: ''; position: absolute; width: 14px; height: 14px; border-radius: 50%;
    border: 2px solid currentColor; border-right-color: transparent;
    animation: zq-spin 0.6s linear infinite;
}
/* .is-loading forces the button's own `color` to transparent (to hide the
   label) — a plain `color: inherit` on ::after would inherit that same
   transparent value and make the spinner itself invisible too, so each
   variant restores its own normal (pre-loading) foreground color here,
   independent of the forced-transparent label. */
.zq-btn-primary.is-loading::after,
.zq-btn-secondary.is-loading::after,
.zq-btn-destructive:hover.is-loading::after,
.zq-btn-info:hover.is-loading::after { color: #ffffff; }
.zq-btn-outline.is-loading::after { color: var(--zq-text); }
.zq-btn-ghost.is-loading::after { color: var(--zq-text-muted); }
.zq-btn-destructive.is-loading::after { color: var(--zq-error); }
.zq-btn-info.is-loading::after { color: var(--zq-info); }
.zq-btn-primary  { background: var(--zq-primary); color: var(--zq-text-on-primary); }
.zq-btn-primary:hover:not(:disabled)  { background: var(--zq-primary-hover); }
.zq-btn-primary:active:not(:disabled) { transform: translateY(0.5px); }
.zq-btn-secondary { background: var(--zq-accent); color: #ffffff; }
.zq-btn-secondary:hover:not(:disabled) { background: var(--zq-accent-hover); }
.zq-btn-outline  { background: transparent; border-color: var(--zq-border); color: var(--zq-text); }
.zq-btn-outline:hover:not(:disabled)  { background: var(--zq-surface-alt); }
.zq-btn-ghost    { background: transparent; color: var(--zq-text-muted); }
.zq-btn-ghost:hover:not(:disabled)    { background: var(--zq-surface-alt); color: var(--zq-text); }
.zq-btn-destructive { background: var(--zq-error-bg); color: var(--zq-error); }
.zq-btn-destructive:hover:not(:disabled) { background: var(--zq-error); color: #ffffff; }
.zq-btn-info { background: var(--zq-info-bg); color: var(--zq-info); }
.zq-btn-info:hover:not(:disabled) { background: var(--zq-info); color: #ffffff; }
/* Solid variant (not the light-bg treatment .zq-btn-info/.zq-btn-destructive
   use) to match the "approve" action's existing solid-emerald convention
   used across Claims/Vouchers/Signed Documents before this pass. */
.zq-btn-success { background: var(--zq-success); color: #ffffff; }
.zq-btn-success:hover:not(:disabled) { background: #047857; }
.zq-btn-success.is-loading::after { color: #ffffff; }
.zq-btn-sm   { height: 30px; padding: 0 10px; font-size: 0.6875rem; }
.zq-btn-icon { height: 32px; width: 32px; padding: 0; border-radius: var(--zq-radius-sm); }
.zq-btn-icon.zq-btn-sm { height: 28px; width: 28px; }

@keyframes zq-spin { to { transform: rotate(360deg); } }

/* ---- Status badge (dot + label — never color-only) ---- */
.zq-badge {
    display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 8px;
    border-radius: var(--zq-radius-full); font-size: 0.625rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.02em; white-space: nowrap;
}
.zq-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.zq-badge-success { background: var(--zq-success-bg); color: var(--zq-success); }
.zq-badge-warning  { background: var(--zq-warning-bg); color: var(--zq-warning); }
.zq-badge-error    { background: var(--zq-error-bg);   color: var(--zq-error); }
.zq-badge-info     { background: var(--zq-info-bg);    color: var(--zq-info); }
.zq-badge-neutral  { background: var(--zq-neutral-bg); color: var(--zq-neutral); }

/* ---- Card ---- */
.zq-card {
    background: var(--zq-surface); border: 1px solid var(--zq-border);
    border-radius: var(--zq-radius-lg); box-shadow: var(--zq-shadow-sm);
}

/* ---- Page header (breadcrumb / title / description / primary action) ---- */
.zq-page-header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--zq-space-4); margin-bottom: var(--zq-space-6); }
.zq-page-header-desc { margin-top: 2px; font-size: 0.75rem; color: var(--zq-text-muted); }

/* ---- Sidebar nav item (was an 18x-duplicated inline Tailwind string —
   .sidebar-item-active above already handles the active-state look and
   is left untouched; this only replaces the repeated static layout
   classes every nav <button> carried) ---- */
.zq-nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; border-radius: var(--zq-radius-lg);
    text-align: left; transition: background-color var(--zq-transition), color var(--zq-transition);
}

/* ---- Dashboard KPI card (Step 9) — compact label/value/context/icon
   card used across the executive dashboard's KPI grid. Value font-size
   stays a per-instance Tailwind class (text-xl vs text-lg) since the
   currency-value cards deliberately run one size smaller to avoid
   wrapping — this only tokenizes the shared shape/spacing/hover. ---- */
.zq-kpi-card {
    min-width: 0; border-radius: var(--zq-radius-lg); border: 1px solid var(--zq-border);
    background: var(--zq-surface-alt); padding: 14px;
    transition: border-color var(--zq-transition), box-shadow var(--zq-transition), transform var(--zq-transition);
}
.zq-kpi-card:hover { border-color: var(--zq-accent); box-shadow: var(--zq-shadow-sm); transform: translateY(-1px); }
.zq-kpi-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.zq-kpi-card-value { margin-top: 8px; font-weight: 900; line-height: 1; color: var(--zq-text); }
.zq-kpi-card-label { margin-top: 8px; font-size: 0.625rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; line-height: 1.3; color: var(--zq-text-muted); }
.zq-kpi-card-context { margin-top: 4px; font-size: 0.625rem; font-weight: 700; }

/* ---- Form field system (Step 10) — one canonical control look shared by
   text/email/phone/number/date <input> (the visual treatment doesn't vary
   by `type`, so one class covers all of them), <select> and <textarea>.
   Audit found 40+ near-duplicate ad-hoc class strings (p-2 vs p-2.5 vs
   px-3 py-2.5, rounded-lg vs rounded-xl, border-slate-200 vs -300, mixed
   focus treatments) — this replaces them with one consistent control. ---- */
.zq-label {
    display: block; margin-bottom: 6px; font-size: 0.6875rem; font-weight: 700;
    color: var(--zq-text-muted); text-transform: uppercase; letter-spacing: 0.02em;
}
.zq-label-required { color: var(--zq-error); margin-left: 2px; font-weight: 800; }

.zq-input, .zq-select, .zq-textarea {
    width: 100%; border-radius: var(--zq-radius-md); border: 1px solid var(--zq-border);
    background: var(--zq-surface); color: var(--zq-text); padding: 9px 12px; font-size: 0.75rem;
    transition: border-color var(--zq-transition), box-shadow var(--zq-transition);
}
html.dark .zq-input, html.dark .zq-select, html.dark .zq-textarea { background: var(--zq-surface-elevated); }
.zq-input::placeholder, .zq-textarea::placeholder { color: var(--zq-text-muted); opacity: 1; }
.zq-input:focus, .zq-select:focus, .zq-textarea:focus {
    outline: none; border-color: var(--zq-accent); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}
html.dark .zq-input:focus, html.dark .zq-select:focus, html.dark .zq-textarea:focus { box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.22); }
.zq-input:disabled, .zq-select:disabled, .zq-textarea:disabled,
.zq-input:read-only, .zq-textarea:read-only {
    background: var(--zq-surface-alt); color: var(--zq-text-muted); cursor: not-allowed;
}
.zq-textarea { resize: vertical; min-height: 80px; }
.zq-input.is-invalid, .zq-select.is-invalid, .zq-textarea.is-invalid { border-color: var(--zq-error); }
/* Used where a field's border deliberately draws attention to a payee/
   third-party sub-section (not a validation error) — kept as its own
   modifier so it can't be confused with .is-invalid. */
.zq-input-flag, .zq-select-flag { border-color: #f59e0b; }
html.dark .zq-input-flag, html.dark .zq-select-flag { border-color: #b45309; }
.zq-input.is-invalid:focus, .zq-select.is-invalid:focus, .zq-textarea.is-invalid:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15); }

.zq-help-text { margin-top: 4px; font-size: 0.6875rem; color: var(--zq-text-muted); }
.zq-error-text { margin-top: 4px; font-size: 0.6875rem; font-weight: 700; color: var(--zq-error); }
.zq-success-text { margin-top: 4px; font-size: 0.6875rem; font-weight: 700; color: var(--zq-success); }

/* ---- Alert banner (Step 15) — a centered inline error/message banner,
   for form-level (not per-field) errors: "wrong password", "link
   expired", a failed submit. Was hand-rolled identically at 4+ call
   sites. .zq-error-text stays for per-field messages under a single
   input; this is for a standalone block above/below a form. ---- */
.zq-alert {
    text-align: center; font-size: 0.75rem; font-weight: 600; padding: 10px; border-radius: var(--zq-radius-md);
}
.zq-alert-error { background: var(--zq-error-bg); color: var(--zq-error); }
.zq-alert-success { background: var(--zq-success-bg); color: var(--zq-success); }

/* ---- Error state (Step 15) — same shell as .zq-loading-state /
   .zq-empty-state (that shared shape is defined once, further down, via a
   combined selector); only the error tint is set here. For a failed-to-
   load panel (network/Firestore error) with room for a retry action. ---- */
.zq-error-state-icon { font-size: 1.5rem; color: var(--zq-error); }
.zq-error-state-text { font-size: 0.75rem; font-weight: 700; color: var(--zq-error); }

.zq-checkbox, .zq-radio {
    height: 16px; width: 16px; border: 1px solid var(--zq-border); accent-color: var(--zq-accent); cursor: pointer;
    border-radius: 4px;
}
.zq-radio { border-radius: 50%; }
.zq-checkbox:focus-visible, .zq-radio:focus-visible { outline: 2px solid var(--zq-accent); outline-offset: 2px; }

/* ---- Form structure — section grouping + action bar ---- */
.zq-form-section + .zq-form-section { padding-top: var(--zq-space-5); border-top: 1px solid var(--zq-border); margin-top: var(--zq-space-5); }
.zq-form-section-title { font-size: 0.6875rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; color: var(--zq-text-muted); margin-bottom: var(--zq-space-3); }
.zq-form-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-top: var(--zq-space-5); padding-top: var(--zq-space-4); border-top: 1px solid var(--zq-border); }

/* ---- Modal system (Step 11) — one shell shared by every dialog.
   Audit found 27 separate `fixed inset-0 ... flex items-center
   justify-center bg-slate-9xx/6x backdrop-blur-sm` overlays, each with
   its own one-off max-w-*, radius and shadow. This is the shell only;
   each modal keeps its own v-if condition, close handler, form and
   submit handler exactly as before — only the surrounding classes
   change. Sizes: .zq-modal-sm (confirmations), default (most forms),
   .zq-modal-lg / .zq-modal-xl (long forms, e.g. HR Employee). ---- */
.zq-modal-overlay {
    position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
    padding: 16px; background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(4px);
    animation: zq-overlay-in 160ms ease;
}
.zq-modal {
    width: 100%; max-width: 28rem; max-height: 90vh; display: flex; flex-direction: column;
    overflow: hidden; background: var(--zq-surface); border-radius: var(--zq-radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    animation: zq-modal-in 180ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes zq-overlay-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes zq-modal-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (prefers-reduced-motion: reduce) {
    .zq-modal-overlay, .zq-modal, .zq-drawer { animation: none; }
}
.zq-modal-sm { max-width: 24rem; }
.zq-modal-lg { max-width: 42rem; }
.zq-modal-xl { max-width: 56rem; }
.zq-modal-header {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
    padding: 18px 20px; border-bottom: 1px solid var(--zq-border); flex-shrink: 0;
}
.zq-modal-title { font-size: 1rem; font-weight: 800; color: var(--zq-text); line-height: 1.3; }
.zq-modal-description { margin-top: 2px; font-size: 0.75rem; color: var(--zq-text-muted); }
.zq-modal-close {
    display: inline-flex; align-items: center; justify-content: center; height: 32px; width: 32px;
    border-radius: var(--zq-radius-md); color: var(--zq-text-muted); flex-shrink: 0; background: transparent;
    transition: background-color var(--zq-transition), color var(--zq-transition);
}
.zq-modal-close:hover { background: var(--zq-surface-alt); color: var(--zq-text); }
/* Branded variant — used by a few project-context workflow modals that
   show a project-ref badge; keeps the header on-brand instead of every
   modal defaulting to a plain light header. */
.zq-modal-header-brand { background: var(--zq-primary); color: #fff; border-bottom-color: transparent; }
.zq-modal-header-brand .zq-modal-title { color: #fff; }
.zq-modal-header-brand .zq-modal-close { color: rgba(255,255,255,0.7); }
.zq-modal-header-brand .zq-modal-close:hover { background: rgba(255,255,255,0.15); color: #fff; }
.zq-modal-body { padding: 20px; overflow-y: auto; flex: 1 1 auto; }
.zq-modal-footer {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px;
    padding: 14px 20px; border-top: 1px solid var(--zq-border); flex-shrink: 0;
}

/* ---- Confirmation dialogs — compact icon+title+message body, reuses
   .zq-modal-sm/.zq-modal-footer for the shell. ---- */
.zq-confirm-icon {
    display: flex; align-items: center; justify-content: center; height: 40px; width: 40px;
    border-radius: 50%; flex-shrink: 0;
}
.zq-confirm-icon.is-danger { background: var(--zq-error-bg); color: var(--zq-error); }
.zq-confirm-icon.is-warning { background: var(--zq-warning-bg); color: var(--zq-warning); }
.zq-confirm-icon.is-info { background: var(--zq-info-bg); color: var(--zq-info); }

/* ---- Drawer — slide-in from the right, for quick read-mostly
   inspection panels (record/detail views), not multi-step workflows. ---- */
.zq-drawer-overlay {
    position: fixed; inset: 0; z-index: 60; background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(2px);
    display: flex; justify-content: flex-end;
}
.zq-drawer {
    width: 100%; max-width: 32rem; height: 100%; max-height: 100vh; display: flex; flex-direction: column;
    background: var(--zq-surface); box-shadow: -12px 0 40px rgba(0, 0, 0, 0.2);
    animation: zq-drawer-in 220ms ease;
}
@keyframes zq-drawer-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
.zq-drawer-lg { max-width: 42rem; }

/* ---- Empty state (Step 13) — one shell for every "no data" / "no
   results" message, full-size for a table/page section or .-compact for
   a card/widget. Structure:
   <div class="zq-empty-state"><i class="zq-empty-state-icon fa-solid ..."></i>
     <p class="zq-empty-state-title">Title</p>
     <p class="zq-empty-state-text">One short explanatory sentence.</p>
     <div class="zq-empty-state-action"><button class="zq-btn ...">...</button></div>
   </div>
   The icon is decorative (aria-hidden) — title + text alone must carry the
   full meaning, so screen readers and icon-less scanning both work. ---- */
.zq-empty-state, .zq-loading-state, .zq-error-state {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; gap: var(--zq-space-2); padding: var(--zq-space-8) var(--zq-space-4);
    border: 1px dashed var(--zq-border); border-radius: var(--zq-radius-lg); background: var(--zq-surface-alt);
}
.zq-error-state { border-color: var(--zq-error); background: var(--zq-error-bg); }
.zq-empty-state-compact { padding: var(--zq-space-5) var(--zq-space-3); gap: var(--zq-space-1); }
.zq-empty-state-icon {
    font-size: 1.5rem; color: var(--zq-text-muted); opacity: 0.6; margin-bottom: var(--zq-space-1);
}
.zq-empty-state-compact .zq-empty-state-icon { font-size: 1.125rem; margin-bottom: 0; }
.zq-empty-state-title { font-size: 0.8125rem; font-weight: 800; color: var(--zq-text); }
.zq-empty-state-compact .zq-empty-state-title { font-size: 0.75rem; }
.zq-empty-state-text { max-width: 32rem; font-size: 0.75rem; line-height: 1.5; color: var(--zq-text-muted); }
.zq-empty-state-compact .zq-empty-state-text { font-size: 0.6875rem; }
.zq-empty-state-action { margin-top: var(--zq-space-2); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--zq-space-2); }

/* ---- Loading state (Step 14) — shares its shell with .zq-empty-state /
   .zq-error-state (combined selector above); for the "waiting on
   Firestore/Storage" panels that were previously copy-pasted verbatim in
   three places. Icon is expected to be `.fa-spin` itself. ---- */
.zq-loading-state-icon { font-size: 1.25rem; color: var(--zq-text-muted); }
.zq-loading-state-text { font-size: 0.75rem; font-weight: 700; color: var(--zq-text-muted); }

/* ---- Data table — subtle dividers, no per-cell borders, consistent row/cell
   rhythm across every table in the app. Structure (unchanged): <table
   class="zq-table"><thead><tr><th>...<tbody><tr>...<td>. Row-action buttons
   use .zq-btn-icon inside a .zq-table-actions wrapper for 2-3 actions;
   tables with 4+ actions get a real three-dot menu component in a later
   pass instead of cramming more icon buttons into the row. ---- */
.zq-table { width: 100%; text-align: left; border-collapse: collapse; }
.zq-table thead th {
    padding: 10px 12px; font-size: 0.6875rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: 0.04em; color: var(--zq-text-muted); border-bottom: 1px solid var(--zq-border);
    white-space: nowrap;
}
.zq-table tbody td { padding: 12px; font-size: 0.75rem; color: var(--zq-text); vertical-align: middle; }
.zq-table tbody tr { border-bottom: 1px solid var(--zq-border); transition: background-color var(--zq-transition); }
.zq-table tbody tr:last-child { border-bottom: none; }
.zq-table tbody tr:hover { background: var(--zq-surface-alt); }
.zq-table-actions { display: flex; align-items: center; justify-content: center; gap: 4px; }
.zq-table-empty td { padding: var(--zq-space-8) var(--zq-space-4); text-align: center; color: var(--zq-text-muted); }

/* ---- Search & filter toolbar system (Step 12) — one consistent shell for
   every record-list toolbar (search + filter selects/pills + sort +
   export + primary action), plus a shared segmented-control for the
   period/view/scope toggles that were previously hand-duplicated per
   module (Daily/Weekly/Monthly/Yearly, Board/List, All/My Projects, etc).
   Structure: <div class="zq-toolbar"><div class="zq-toolbar-main">search +
   filters</div><div class="zq-toolbar-actions">export / add</div></div> ---- */
.zq-toolbar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: var(--zq-space-3); margin-bottom: var(--zq-space-4);
}
.zq-toolbar-main { display: flex; flex-wrap: wrap; align-items: center; gap: var(--zq-space-2); flex: 1 1 auto; min-width: 0; }
.zq-toolbar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--zq-space-2); flex-shrink: 0; }

/* Search input with a leading icon, sharing .zq-input's border/focus look. */
.zq-search { position: relative; min-width: 0; flex: 1 1 220px; max-width: 320px; }
.zq-search-input.zq-input { padding-left: 34px; }
.zq-search-input.zq-input:not(:placeholder-shown) ~ .zq-search-clear { display: inline-flex; }
.zq-search-icon {
    position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
    color: var(--zq-text-muted); font-size: 0.75rem; pointer-events: none;
}
.zq-search-clear {
    display: none; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    height: 22px; width: 22px; align-items: center; justify-content: center;
    border-radius: var(--zq-radius-sm); color: var(--zq-text-muted); background: transparent;
}
.zq-search-clear:hover { background: var(--zq-surface-alt); color: var(--zq-text); }

/* Filter/sort selects — reuse .zq-select's look, sized for a toolbar
   rather than a full-width form field. */
.zq-filter-select.zq-select { width: auto; min-width: 140px; }

/* Standalone filter toggle buttons (e.g. a single "Needs Attention Only"
   switch) — pill-shaped, with an active state that isn't color alone
   (bold weight + a real border color change), so state reads without
   relying on hue. */
.zq-filter-button {
    display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
    border-radius: var(--zq-radius-full); border: 1px solid var(--zq-border); background: var(--zq-surface);
    color: var(--zq-text-muted); font-size: 0.6875rem; font-weight: 700; white-space: nowrap;
    transition: background-color var(--zq-transition), color var(--zq-transition), border-color var(--zq-transition);
}
.zq-filter-button:hover { background: var(--zq-surface-alt); color: var(--zq-text); }
.zq-filter-button.is-active {
    background: var(--zq-warning-bg); color: var(--zq-warning); border-color: var(--zq-warning); font-weight: 800;
}
.zq-filter-button:focus-visible, .zq-filter-chip:focus-visible, .zq-segmented-control button:focus-visible {
    outline: 2px solid var(--zq-accent); outline-offset: 2px;
}

/* Filter chips — a row of mutually-exclusive pill options inside a shared
   track (module-type filters, doc type/status pills). Visually distinct
   from .zq-segmented-control's contiguous-block look: chips keep their
   own rounded pill shape and gap, which reads better for option sets with
   more than 3-4 choices. */
.zq-filter-chip-group { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 4px; border-radius: var(--zq-radius-lg); border: 1px solid var(--zq-border); background: var(--zq-surface-alt); }
.zq-filter-chip {
    display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: var(--zq-radius-full);
    font-size: 0.6875rem; font-weight: 700; color: var(--zq-text-muted); background: transparent; white-space: nowrap;
    transition: background-color var(--zq-transition), color var(--zq-transition);
}
.zq-filter-chip:hover { color: var(--zq-text); }
.zq-filter-chip.is-active { background: var(--zq-primary); color: var(--zq-text-on-primary); }
/* Semantic exception — used only where the underlying states are
   genuinely success/danger (e.g. Paid/Unpaid), not a generic selection. */
.zq-filter-chip.is-active.is-success { background: var(--zq-success-bg); color: var(--zq-success); }
.zq-filter-chip.is-active.is-danger { background: var(--zq-error-bg); color: var(--zq-error); }

/* Small numeric badge on a filter trigger showing how many are active. */
.zq-filter-count {
    display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; padding: 0 4px;
    border-radius: var(--zq-radius-full); background: var(--zq-accent); color: #fff; font-size: 0.625rem; font-weight: 800;
}

/* One-click reset back to a filter's existing default value(s). */
.zq-filter-reset {
    display: inline-flex; align-items: center; gap: 4px; font-size: 0.6875rem; font-weight: 700;
    color: var(--zq-text-muted); background: transparent; padding: 0 4px; height: 32px;
}
.zq-filter-reset:hover:not(:disabled) { color: var(--zq-error); }
.zq-filter-reset:disabled { color: var(--zq-text-muted); opacity: 0.5; cursor: not-allowed; }

/* Segmented control — a single bordered strip of mutually-exclusive
   options (period toggles, view-mode/scope switches). Fixed track/button
   heights keep the strip from jumping size when the active label changes
   selection to selection. */
.zq-segmented-control {
    display: inline-flex; align-items: stretch; padding: 3px; border-radius: var(--zq-radius-lg);
    background: var(--zq-surface-alt); border: 1px solid var(--zq-border); gap: 2px;
}
.zq-segmented-control button {
    display: inline-flex; align-items: center; justify-content: center; height: 28px; padding: 0 12px;
    border-radius: var(--zq-radius-md); font-size: 0.6875rem; font-weight: 700; color: var(--zq-text-muted);
    background: transparent; white-space: nowrap; transition: background-color var(--zq-transition), color var(--zq-transition);
}
.zq-segmented-control button:hover:not(.is-active) { color: var(--zq-text); }
.zq-segmented-control button.is-active {
    background: var(--zq-primary); color: var(--zq-text-on-primary); font-weight: 800; box-shadow: var(--zq-shadow-sm);
}
