/* ===== MRMS Design System — Dark Theme ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { display: none; }

:root {
    /* Brand */
    --primary:      #3b82f6;
    --primary-dark: #2563eb;
    --success:      #22c55e;
    --danger:       #ef4444;
    --warning:      #f59e0b;
    --info:         #06b6d4;

    /* Layout */
    --sidebar-bg:    #0a1628;
    --header-bg:     #0a1628;
    --header-border: #1c3350;
    --sidebar-width: 240px;
    --topbar-height: 60px;
    --radius:        8px;

    /* Page surfaces — deep page, lifted cards, clear depth */
    --bg-page:    #040b14;
    --bg-card:    #0c1c2e;
    --bg-subtle:  #091522;
    --bg-divider: #172f48;
    --bg-footer:  #091522;
    --bg-input:   #060f1c;

    /* Text — strong contrast on dark navy */
    --text:           #bfcfdf;
    --text-strong:    #e6f0fb;
    --text-secondary: #8aaac8;
    --text-muted:     #5c7d9a;
    --text-faint:     #3a5570;

    /* Borders — visible, not harsh */
    --border:        #2a4d70;
    --border-light:  #1e3d5c;
    --border-subtle: #172f4a;

    /* Shadows */
    --shadow:    0 1px 4px rgba(0,0,0,0.7);
    --shadow-md: 0 6px 24px rgba(0,0,0,0.6);
}

body {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--bg-page);
    min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-weight: 600; color: var(--text-strong); }

/* ===== Layout ===== */
.h-full          { height: 100vh; }
.flex            { display: flex; }
.flex-1          { flex: 1; min-width: 0; }
.flex-col        { flex-direction: column; }
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.min-w-0         { min-width: 0; }

/* ===== Sidebar ===== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    height: 100vh;
    position: sticky;
    top: 0;
    transition: transform 0.3s ease;
    z-index: 100;
    border-right: 1px solid var(--header-border);
}

.sidebar-header {
    height: var(--topbar-height);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 0 16px;
    border-bottom: 1px solid var(--header-border);
}

.sidebar-logo { display: flex; align-items: center; gap: 10px; }
.sidebar-logo img { width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0; }

.sidebar-nav {
    flex: 1;
    padding: 12px 0;
    overflow-y: auto;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: rgba(255,255,255,0.6);
    font-size: 13.5px;
    font-weight: 500;
    border-radius: 6px;
    margin: 1px 8px;
    transition: all 0.15s;
    position: relative;
}
.nav-link:hover  { color: #fff; background: rgba(255,255,255,0.07); }
.nav-link.active { color: #fff; background: rgba(59,130,246,0.3); box-shadow: inset 3px 0 0 #3b82f6; }
.nav-link i      { width: 18px; text-align: center; font-size: 15px; }
.nav-divider     { height: 1px; background: rgba(255,255,255,0.06); margin: 6px 16px; }

.nav-count {
    background: var(--danger);
    color: #fff;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    margin-left: auto;
}

.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-info { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.user-avatar {
    width: 32px; height: 32px;
    background: rgba(59,130,246,0.3);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #93c5fd; font-weight: 700; font-size: 13px;
    flex-shrink: 0;
}

.logout-btn {
    background: none; border: none; cursor: pointer;
    color: rgba(255,255,255,0.45);
    padding: 6px 8px; border-radius: 4px;
    transition: all 0.15s;
}
.logout-btn:hover { color: #fff; background: rgba(255,255,255,0.08); }

/* ===== Topbar ===== */
.topbar {
    height: var(--topbar-height);
    background: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 12px;
    flex-shrink: 0;
    position: relative;
    z-index: 50;
}

.topbar-toggle {
    display: none;
    background: none; border: none; cursor: pointer;
    color: var(--text-muted); font-size: 18px; padding: 4px;
}

.topbar-title   { font-size: 16px; font-weight: 600; color: var(--text-strong); flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }

/* Notification bell */
.notif-btn {
    position: relative;
    background: none; border: none; cursor: pointer;
    color: var(--text-muted); font-size: 16px; padding: 6px 8px;
    border-radius: 6px; transition: all 0.15s;
    display: flex; align-items: center;
}
.notif-btn:hover { color: var(--text); background: var(--bg-subtle); }

.notif-badge {
    position: absolute;
    top: 2px; right: 2px;
    background: var(--danger);
    color: #fff;
    border-radius: 50%;
    min-width: 16px; height: 16px;
    font-size: 9px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    padding: 0 3px;
    border: 2px solid var(--bg-card);
}
.notif-badge.hidden { display: none; }

.notif-dropdown {
    position: absolute;
    top: calc(var(--topbar-height) - 4px);
    right: 12px;
    width: 320px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    z-index: 200;
    display: none;
    overflow: hidden;
}
.notif-dropdown.open { display: block; }

.notif-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    font-weight: 600;
    font-size: 13px;
    color: var(--text-strong);
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 16px;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background 0.1s;
}
.notif-item:hover      { background: var(--bg-subtle); }
.notif-item:last-child { border-bottom: none; }
.notif-item i          { margin-top: 1px; font-size: 14px; flex-shrink: 0; }
.notif-empty           { padding: 20px 16px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* ===== Cards ===== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--bg-divider);
}

.card-title  { font-size: 14px; font-weight: 600; color: var(--text-strong); }
.card-body   { padding: 16px 18px; }
.card-footer {
    padding: 12px 18px;
    border-top: 1px solid var(--bg-divider);
    background: var(--bg-footer);
    border-radius: 0 0 var(--radius) var(--radius);
}

/* ===== KPI Stats ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: transform 0.15s, box-shadow 0.15s;
}
.stat-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

.stat-icon {
    width: 48px; height: 48px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.stat-body  { flex: 1; min-width: 0; }
.stat-value { font-size: 22px; font-weight: 700; color: var(--text-strong); line-height: 1.1; }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; margin-top: 3px; }

/* Trend indicators — dark-friendly */
.stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 4px;
    padding: 1px 5px;
    border-radius: 4px;
}
.trend-up      { background: rgba(34,197,94,0.15);  color: #4ade80; }
.trend-down    { background: rgba(239,68,68,0.15);  color: #f87171; }
.trend-neutral { background: var(--bg-divider);     color: var(--text-muted); }

/* ===== Table ===== */
.table-wrapper { overflow-x: auto; }

.table { width: 100%; border-collapse: collapse; }
.table th {
    text-align: left;
    padding: 10px 14px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border-light);
    white-space: nowrap;
}
.table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--bg-divider);
    color: var(--text-secondary);
    vertical-align: middle;
}
.table tbody tr:hover    { background: var(--bg-subtle); }
.table tbody tr:last-child td { border-bottom: none; }
.empty-state { text-align: center; color: var(--text-faint); padding: 32px 0; }

/* ===== Badges — dark-friendly ===== */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.badge-success   { background: rgba(34,197,94,0.15);   color: #4ade80; }
.badge-danger    { background: rgba(239,68,68,0.15);   color: #f87171; }
.badge-warning   { background: rgba(245,158,11,0.15);  color: #fbbf24; }
.badge-info      { background: rgba(6,182,212,0.15);   color: #67e8f9; }
.badge-primary   { background: rgba(59,130,246,0.15);  color: #93c5fd; }
.badge-secondary { background: var(--bg-divider);      color: var(--text-muted); }
.badge-duplicate { background: rgba(245,158,11,0.15);  color: #fbbf24; }

/* ===== Buttons ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    text-decoration: none;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); border-color: var(--primary-dark); }

.btn-success { background: #16a34a; color: #fff; border-color: #16a34a; }
.btn-success:hover:not(:disabled) { background: #15803d; }

.btn-danger  { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover:not(:disabled)  { background: #dc2626; }

.btn-warning { background: var(--warning); color: #fff; border-color: var(--warning); }

.btn-outline {
    background: var(--bg-subtle);
    color: var(--text-secondary);
    border-color: var(--border);
}
.btn-outline:hover:not(:disabled) { background: var(--bg-divider); border-color: var(--border-light); color: var(--text); }

.btn-sm   { padding: 5px 10px; font-size: 12px; }
.btn-xs   { padding: 3px 7px;  font-size: 11px; }
.btn-full { width: 100%; }

.btn-link {
    background: none; border: none; cursor: pointer;
    color: var(--primary); font-size: 13px; padding: 0;
    text-decoration: underline; font-weight: 500;
}
.btn-link:hover { color: #60a5fa; }

/* ===== Spacing helpers ===== */
.me-1 { margin-right: 4px; }
.me-2 { margin-right: 8px; }
.ml-1 { margin-left: 4px; }
.ml-2 { margin-left: 8px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }

/* ===== Forms — standard ===== */
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; min-width: 0; }
.form-row .field      { flex: 1; min-width: 0; }
.form-group   { margin-bottom: 14px; }
.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 5px;
}
.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-strong);
    background: var(--bg-input);
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
textarea.form-input { resize: vertical; min-height: 80px; }
.form-error { color: var(--danger); font-size: 12px; margin-top: 4px; }

/* ===== Placeholder colour ===== */
::placeholder                { color: var(--text-faint); opacity: 1; }
::-webkit-input-placeholder  { color: var(--text-faint); }
::-moz-placeholder           { color: var(--text-faint); opacity: 1; }

/* ===== Browser autofill — override white/yellow flash ===== */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--bg-input) inset !important;
    box-shadow:         0 0 0 1000px var(--bg-input) inset !important;
    -webkit-text-fill-color: var(--text-strong) !important;
    caret-color: var(--text-strong);
    border-color: var(--border) !important;
    transition: background-color 9999s ease-in-out 0s;
}

/* ===== Select dropdown options — keep dark in browsers that allow it ===== */
select option {
    background: var(--bg-card);
    color: var(--text);
}

/* ===== Floating label fields ===== */
.field {
    position: relative;
    margin-bottom: 16px;
}
.field > input,
.field > select,
.field > textarea {
    width: 100%;
    padding: 20px 14px 7px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-strong);
    background: var(--bg-input);
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    appearance: none;
}
.field > input:focus,
.field > select:focus,
.field > textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
.field > label {
    position: absolute;
    left: 14px;
    top: 14px;
    font-size: 13.5px;
    color: var(--text-muted);
    transition: all 0.18s ease;
    pointer-events: none;
    transform-origin: left top;
}
.field > input:focus + label,
.field > input:not(:placeholder-shown) + label,
.field > select:focus + label,
.field > textarea:focus + label,
.field > textarea:not(:placeholder-shown) + label {
    top: 6px;
    font-size: 10.5px;
    color: var(--primary);
    font-weight: 600;
    letter-spacing: 0.02em;
}
.field > select + label,
.field > input[type="date"] + label,
.field > input[type="time"] + label,
.field > input[type="number"] + label { top: 6px; font-size: 10.5px; color: var(--primary); font-weight: 600; letter-spacing: 0.02em; }

.field .field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-faint);
    font-size: 14px;
    pointer-events: none;
}
.field.has-icon > input,
.field.has-icon > select { padding-left: 38px; }
.field.has-icon > label  { left: 38px; }
.field-error { font-size: 12px; color: var(--danger); margin-top: 4px; }

/* ===== Input group ===== */
.input-group { position: relative; }
.input-prefix {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-faint);
    font-size: 14px;
}
.input-group .form-input { padding-left: 34px; }

/* ===== Filter row ===== */
.filter-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}
.filter-row > *         { flex-shrink: 1; width: auto !important; }
.filter-row > .flex-1   { flex: 1 1 auto !important; min-width: 140px; }
.filter-row > .form-select { min-width: 130px; flex-shrink: 0; }
.filter-group { display: flex; flex-direction: column; gap: 4px; }
.filter-group .form-input, .filter-group .form-select { min-width: 160px; }

/* ===== Grid ===== */
.grid   { display: grid; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.gap-3  { gap: 12px; }
.gap-4  { gap: 16px; }
.btn-row { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

/* ===== Modal ===== */
.modal-dialog {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}
.modal-content {
    background: var(--bg-card);
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.6);
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border);
    animation: slideUp 0.2s ease;
    will-change: transform, opacity;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--bg-divider);
}
.modal-header h3 { font-size: 15px; font-weight: 600; color: var(--text-strong); }
.modal-close {
    background: none; border: none; cursor: pointer;
    color: var(--text-faint); font-size: 20px; line-height: 1;
    padding: 2px 4px; border-radius: 4px;
}
.modal-close:hover { color: var(--text); background: var(--bg-subtle); }
.modal-body { padding: 18px; }
.modal-footer {
    padding: 12px 18px;
    border-top: 1px solid var(--bg-divider);
    display: flex; justify-content: flex-end; gap: 8px;
    background: var(--bg-footer);
    border-radius: 0 0 12px 12px;
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: 24px; right: 24px;
    background: var(--bg-card);
    color: var(--text-strong);
    border: 1px solid var(--border);
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 500;
    z-index: 9999;
    box-shadow: var(--shadow-md);
    max-width: 360px;
    transition: opacity 0.3s, transform 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.toast.toast-success { background: #14532d; color: #86efac; border-color: #166534; }
.toast.toast-error   { background: #7f1d1d; color: #fca5a5; border-color: #991b1b; }
.toast.toast-warning { background: #78350f; color: #fcd34d; border-color: #92400e; }
.toast.hidden { display: none; }

/* ===== Alerts — dark-friendly ===== */
.alert { padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; font-size: 13.5px; }
.alert-success { background: rgba(34,197,94,0.12);  color: #86efac; border: 1px solid rgba(34,197,94,0.25); }
.alert-error,
.alert-danger  { background: rgba(239,68,68,0.12);  color: #fca5a5; border: 1px solid rgba(239,68,68,0.25); }

/* ===== Pagination ===== */
.pagination { display: flex; gap: 4px; list-style: none; }
.pagination a, .pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 32px; height: 32px; padding: 0 8px;
    border-radius: 6px; font-size: 13px;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    text-decoration: none;
    background: var(--bg-card);
    transition: all 0.15s;
}
.pagination a:hover                  { background: var(--bg-subtle); border-color: var(--border); }
.pagination .active span             { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .disabled span           { color: var(--text-faint); cursor: default; }

/* ===== Login / Auth pages ===== */
.login-body {
    background: linear-gradient(160deg, #0d1320 0%, #0f1e38 60%, #111827 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.login-container { width: 100%; max-width: 420px; }
.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 36px 32px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.7), 0 0 0 1px rgba(59,130,246,0.08);
}
.login-logo              { text-align: center; margin-bottom: 28px; }
.login-logo img          { width: 64px; height: 64px; border-radius: 16px; margin-bottom: 14px; }
.login-logo h1           { font-size: 20px; font-weight: 700; color: var(--text-strong); }
.login-logo p            { font-size: 13px; color: var(--text-muted); margin-top: 3px; }
.login-help              { font-size: 12px; color: var(--text-muted); text-align: center; margin-top: 14px; line-height: 1.5; }
.login-footer            { margin-top: 16px; text-align: center; }
.telegram-link           { color: rgba(255,255,255,0.6); font-size: 13px; display: inline-flex; align-items: center; gap: 5px; }
.telegram-link:hover     { color: #fff; }

.setup-notice {
    background: rgba(59,130,246,0.1);
    border: 1px solid rgba(59,130,246,0.25);
    border-radius: var(--radius);
    padding: 12px 14px;
    font-size: 13px;
    color: #93c5fd;
    line-height: 1.55;
    margin-bottom: 18px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.setup-notice i { margin-top: 2px; flex-shrink: 0; }

.otp-sent-info {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(59,130,246,0.1);
    border: 1px solid rgba(59,130,246,0.2);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
    color: #93c5fd;
}
.otp-input { font-size: 18px !important; text-align: center; letter-spacing: 5px; font-weight: 600; padding: 12px !important; }
.back-link {
    background: none; border: none; cursor: pointer;
    color: var(--text-muted); font-size: 13px; padding: 8px 0 0;
    display: inline-flex; align-items: center; gap: 5px;
    margin-top: 6px; transition: color .15s; text-decoration: none;
}
.back-link:hover { color: var(--primary); }
.otp-timer-row { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }

/* ===== Receipt detail ===== */
.receipt-image { max-width: 100%; border-radius: 8px; cursor: zoom-in; transition: all 0.3s; }
.receipt-image.zoomed { max-width: none; width: 100%; cursor: zoom-out; }
.receipt-meta { background: var(--bg-subtle); border-radius: 6px; padding: 12px; margin-top: 16px; font-size: 12.5px; }
.receipt-meta > div  { display: flex; gap: 8px; margin-bottom: 4px; }
.receipt-meta .label { color: var(--text-muted); font-weight: 500; min-width: 90px; }
.ocr-text {
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 12px;
    font-size: 12px;
    line-height: 1.6;
    font-family: monospace;
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
    color: var(--text);
}

/* ===== Utility ===== */
.hidden         { display: none !important; }
.font-medium    { font-weight: 500; }
.font-semibold  { font-weight: 600; }
.font-bold      { font-weight: 700; }
.text-sm        { font-size: 13px; }
.text-xs        { font-size: 11px; }
.text-2xl       { font-size: 24px; }
.text-gray-400  { color: var(--text-faint); }
.text-gray-500  { color: var(--text-muted); }
.text-gray-800  { color: var(--text-strong); }
.text-blue-500  { color: #60a5fa; }
.text-blue-600  { color: #3b82f6; }
.text-green-600 { color: #4ade80; }
.text-yellow-600{ color: #fbbf24; }
.text-red-500   { color: #f87171; }
.text-center    { text-align: center; }
.cursor-pointer { cursor: pointer; }
.col-span-2     { grid-column: span 2; }
.py-12          { padding-top: 48px; padding-bottom: 48px; }
.p-6            { padding: 24px; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .sidebar {
        position: fixed;
        z-index: 200;
        transform: translateX(-100%);
        height: 100vh;
    }
    .sidebar.open        { transform: translateX(0); }
    .topbar-toggle       { display: flex; }
    .grid-2              { grid-template-columns: 1fr; }
    .stats-grid          { grid-template-columns: repeat(2, 1fr); }
    .notif-dropdown      { right: 0; width: 290px; }
}

@media (max-width: 640px) {
    .stats-grid          { grid-template-columns: 1fr 1fr; }
    .filter-row          { flex-wrap: wrap; }
    .filter-row > .form-input, .filter-row > .form-select { width: 100%; min-width: unset; }
    .filter-group .form-input, .filter-group .form-select  { min-width: unset; width: 100%; }
    .modal-content       { max-width: 100%; border-radius: 12px; }
    .form-row            { flex-direction: column; gap: 0; }
    .p-6                 { padding: 16px; }
    main.flex-1.overflow-y-auto { padding: 16px !important; }
}

@media (max-width: 420px) {
    .stats-grid  { grid-template-columns: 1fr; }
    .login-card  { padding: 24px 20px; }
}
