:root {
    --primary: #0f766e;
    --primary-dark: #115e59;
    --secondary: #16a34a;
    --secondary-dark: #166534;
    --accent: #f97316;
    --success: #16a34a;
    --danger: #dc2626;
    --ink: #172033;
    --muted: #64748b;
    --line: #dbe4f0;
    --surface: #ffffff;
    --surface-soft: #f5f7ff;
    --app-bg-start: #effaf7;
    --app-bg-end: #fff7ed;
    --sidebar-start: #10201d;
    --sidebar-mid: #123b34;
    --sidebar-end: #17624f;
    --hover:#115e59;
    --shadow: 0 18px 45px rgba(15, 118, 110, 0.18);
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
    --gradient-dark: linear-gradient(160deg, var(--sidebar-start), var(--sidebar-mid) 48%, var(--sidebar-end));
    
}
:root {
    --content-gutter: clamp(12px, 4vw, 24px);
    --card-padding: clamp(16px, 3vw, 24px);
    --font-size-base: clamp(0.95rem, 1vw + 0.1rem, 1.05rem);
    --heading-size: clamp(1.25rem, 2vw, 1.6rem);
}

html {
    font-size: var(--font-size-base);
}

body {
    padding: 0;
}

img,
svg,
video,
iframe {
    max-width: 100%;
    height: auto;
}

button,
input,
select,
textarea {
    min-width: 0;
}

@media (max-width: 800px) {
    :root {
        --sidebar-width: 100%;
        --card-padding: 16px;
    }

    body {
        font-size: 1rem;
    }

    .main {
        padding: 72px 16px 20px;
    }

    .card,
    .sidebar,
    .topbar,
    .table-wrap {
        padding: var(--card-padding);
    }

    .sidebar {
        width: 100%;
    }

    .row,
    .split-page,
    .reports-split,
    .list-tools,
    .dashboard-stats,
    .test-row,
    .parameter-row,
    .sys-grid {
        grid-template-columns: 1fr !important;
    }

    .table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 100%;
    }

    .stat-box {
        min-height: auto;
        padding: 16px;
    }

    .stat-box h2 {
        font-size: 1.8rem;
    }
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    font-family: "Segoe UI", Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(20, 184, 166, 0.22), transparent 34rem),
        linear-gradient(135deg, var(--app-bg-start) 0%, var(--app-bg-end) 100%);
    color: var(--ink);
    line-height: 1.5;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--secondary);
    text-shadow: 0 1px 2px rgba(15, 118, 110, 0.1);
}

h1,
h2,
h3 {
    color: var(--ink);
    line-height: 1.2;
}

p {
    color: var(--muted);
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 250px;
    padding: 24px 16px;
    background: var(--gradient-dark);
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 10px 0 35px rgba(30, 27, 75, 0.24);
    z-index: 10;
    overflow-y: auto;
    overflow-x: hidden;
    /* Thin scrollbar so it doesn't look bulky */
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.18) transparent;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }

.sidebar h2 {
    padding: 0 8px 22px;
    margin-bottom: 8px;
    color: #fff;
    font-size: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.sidebar a {
    display: block;
    padding: 12px 14px;
    color: rgba(255,255,255,.82);
    border-radius: 8px;
    transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.sidebar a::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    opacity: 0;
    transition: opacity .3s ease;
}

.sidebar a:hover:not(.active) {
    background: var(--hover) !important;
    color: #fff !important;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(15, 118, 110, 0.2);
}

.sidebar a:hover:not(.active)::before {
    opacity: 1;
}

.sidebar a.active {
    background: linear-gradient(
        135deg,
        var(--hover),
        var(--secondary)
    ) !important;
    color: #fff;
    box-shadow: 0 2px 8px rgba(15, 118, 110, 0.3);
}

.main {
    min-height: 100vh;
    width: calc(100% - 250px);
    margin-left: 250px;
    padding: 28px;
}

.topbar {
    min-height: 92px;
    padding: 22px 24px;
    margin-bottom: 24px;
    border-radius: 8px;
    background: var(--gradient);
    box-shadow: var(--shadow);
    color: #fff;
}

.topbar h2 {
    color: #fff;
    margin-bottom: 6px;
}

.topbar p {
    color: rgba(255, 255, 255, 0.88);
}

.card {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(219, 228, 240, 0.9);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.split-page {
    display: grid;
    grid-template-columns: minmax(280px, 0.85fr) minmax(420px, 1.65fr);
    gap: 20px;
    align-items: start;
}

.reports-split {
    grid-template-columns: minmax(320px, 1fr) minmax(500px, 1.45fr);
}

.panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.panel-title h3 {
    margin-bottom: 0;
}

.list-tools {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto auto;
    gap: 10px;
    margin-bottom: 14px;
}

.list-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
    color: var(--muted);
    font-weight: 700;
}

.count-pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 4px 10px;
    border-radius: 8px;
    background: #eef8f4;
    color: var(--primary-dark);
    border: 1px solid #cfe7df;
}

.soft-divider {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 18px 0;
}

.result-entry-list {
    display: grid;
    gap: 10px;
    max-height: 430px;
    overflow: auto;
    padding-right: 4px;
}

.card h3 {
    margin-bottom: 10px;
}

.row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.dashboard-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 20px;
}

.test-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 12px;
}

.parameter-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 12px;
}

.parameter-row-simple {
    display: grid;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.stat-box {
    min-height: 132px;
    padding: 22px;
    border-radius: 8px;
    color: #fff;
    background: var(--gradient);
    box-shadow: var(--shadow);
}

.stat-box h2 {
    color: #fff;
    font-size: 34px;
}

.stat-box p {
    color: rgba(255, 255, 255, 0.86);
    font-weight: 600;
}

form {
    display: grid;
    gap: 12px;
}

label {
    display: grid;
    gap: 6px;
    color: var(--ink);
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input:hover,
select:hover,
textarea:hover {
    border-color: rgba(15, 118, 110, 0.3);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
    transform: translateY(-1px);
}

button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border: 0;
    border-radius: 8px;
    background: var(--gradient);
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(15, 118, 110, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

button::before,
.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

button:hover,
.btn:hover {
    background: linear-gradient(135deg, var(--hover), var(--secondary));
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 14px 32px rgba(15, 118, 110, 0.3), 0 4px 12px rgba(15, 118, 110, 0.15);
}

button:hover::before,
.btn:hover::before {
    opacity: 1;
}

button:active,
.btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 6px 16px rgba(15, 118, 110, 0.2);
}

.btn-secondary {
    background: #ecfdf5;
    color: var(--primary-dark);
    box-shadow: 0 2px 8px rgba(15, 118, 110, 0.1);
}

.btn-secondary::before {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    opacity: 0;
}

.btn-secondary:hover {
    background: var(--hover);
    color: #fff;
    box-shadow: 0 8px 20px rgba(15, 118, 110, 0.25);
    transform: translateY(-2px) scale(1.02);
}

.btn-secondary:hover::before {
    opacity: 0.1;
}

.btn-secondary:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 4px 12px rgba(15, 118, 110, 0.15);
}
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

th {
    padding: 14px;
    text-align: left;
    color: #134e4a;
    background: #eef8f4;
    border-bottom: 1px solid #cfe7df;
    white-space: nowrap;
}

td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
}

tr:last-child td {
    border-bottom: 0;
}

tbody tr {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

tbody tr:hover {
    background: #f8fcfa;
    box-shadow: 0 2px 8px rgba(15, 118, 110, 0.08);
    transform: scale(1.002);
}

.badge {
    display: inline-flex;
    padding: 4px 9px;
    border-radius: 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.badge-success {
    background: var(--success);
}

.badge-danger {
    background: var(--danger);
}

.message {
    padding: 12px 14px;
    border-radius: 8px;
    background: #ecfeff;
    color: #155e75;
    border: 1px solid #a5f3fc;
}

.error {
    padding: 12px 14px;
    border-radius: 8px;
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 18% 18%, rgba(249, 115, 22, 0.2), transparent 28rem),
        var(--gradient);
}

.login-card {
    width: min(100%, 390px);
    padding: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 24px 70px rgba(30, 27, 75, 0.32);
}

.login-card h2 {
    margin-bottom: 8px;
    text-align: center;
}

.login-card p {
    margin-bottom: 22px;
    text-align: center;
}

.report-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.report-header p {
    color: var(--ink);
}

.print-body {
    background: #fff;
    color: #000;
}

.letterhead-page {
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
    padding: 62mm 18mm 22mm;
    background: #fff;
    color: #000;
    font-family: Arial, sans-serif;
    font-size: 13px;
}

.print-patient-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 7px 42px;
    margin-bottom: 24px;
    font-family: "Arial Black", Arial, sans-serif;
    font-size: 13px;
}

.print-report-title {
    margin: 0 0 18px;
    color: #000;
    font-family: "Arial Black", Arial, sans-serif;
    font-size: 15px;
    text-align: center;
    text-decoration: underline;
}

.print-report-table {
    width: 100%;
    border-collapse: collapse;
    font-family: "Courier New", monospace;
    font-size: 13px;
}

.print-report-table th {
    padding: 5px 6px;
    background: #fff;
    color: #000;
    border-bottom: 1px solid #000;
    text-decoration: underline;
}

.print-report-table td {
    padding: 7px 6px;
    border-bottom: 0;
    color: #000;
}

.print-report-table th:first-child,
.print-report-table td:first-child {
    width: 42%;
}

.print-report-table th:nth-child(2),
.print-report-table td:nth-child(2) {
    width: 18%;
    font-weight: 700;
}

.print-report-table th:nth-child(3),
.print-report-table td:nth-child(3) {
    width: 14%;
}

.print-signature {
    display: flex;
    justify-content: space-between;
    margin-top: 48px;
    font-family: Arial, sans-serif;
}

.print-signature span {
    min-width: 130px;
    padding-top: 8px;
    border-top: 1px solid #000;
    text-align: center;
}

@media print {
    @page {
        size: A4;
        margin: 0;
    }

    body {
        background: #fff;
        color: #000;
    }

    .sidebar,
    .topbar,
button,
.btn {
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}

    .main {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .card,
    .table-wrap {
        box-shadow: none;
        border: 0;
    }

    th {
        background: #111 !important;
        color: #fff !important;
    }

    .print-body {
        margin: 0;
    }

    .letterhead-page {
        width: 210mm;
        min-height: 297mm;
        margin: 0;
        padding: 62mm 18mm 22mm;
        box-shadow: none;
    }

    .print-report-table th {
        background: #fff !important;
        color: #000 !important;
    }
}

@media (max-width: 800px) {
    .sidebar {
        position: static;
        width: 100%;
        min-height: auto;
        height: auto;
    }

    .main {
        width: 100%;
        margin-left: 0;
        padding: 18px;
    }

    .row {
        grid-template-columns: 1fr;
    }

    .split-page,
    .reports-split,
    .list-tools {
        grid-template-columns: 1fr;
    }

    .dashboard-stats,
    .test-row,
    .parameter-row {
        grid-template-columns: 1fr;
    }
}

/* ══════════════════════════════════════════════════════════════
   MOBILE-RESPONSIVE ADDITIONS
   ══════════════════════════════════════════════════════════════ */

/* ── Hamburger button (hidden on desktop) ── */
#sidebar-toggle {
    display: none;
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 200;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 0;
    background: var(--gradient-dark);
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px;
    box-shadow: 0 4px 16px rgba(15,118,110,.35);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#sidebar-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(15,118,110,.45);
}

#sidebar-toggle:active {
    transform: scale(0.95);
    box-shadow: 0 2px 12px rgba(15,118,110,.3);
}

#sidebar-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: #fff;
    transition: transform .3s ease, opacity .3s ease;
    transform-origin: center;
}

#sidebar-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#sidebar-toggle.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
#sidebar-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Overlay ── */
#sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity .25s ease;
}
#sidebar-overlay.visible {
    opacity: 1;
}

/* ── Mobile breakpoint ── */
@media (max-width: 800px) {
    #sidebar-toggle {
        display: flex;
    }
    #sidebar-overlay {
        display: block;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: 260px;
        z-index: 100;
        transform: translateX(-100%);
        transition: transform .28s cubic-bezier(.4,0,.2,1);
        overflow-y: auto;
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 8px 0 40px rgba(15,118,110,.35);
    }

    .main {
        width: 100%;
        margin-left: 0;
        padding: 72px 16px 20px;   /* room for hamburger at top */
    }

    .topbar {
        padding: 16px 18px;
        min-height: auto;
    }

    .row {
        grid-template-columns: 1fr !important;
    }

    .split-page,
    .reports-split,
    .list-tools {
        grid-template-columns: 1fr !important;
    }

    .dashboard-stats,
    .test-row,
    .parameter-row {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Tables scroll horizontally */
    .table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 540px;
    }

    /* Cards full-width */
    .card {
        padding: 16px;
    }

    /* Actions wrap on small screens */
    .actions {
        flex-wrap: wrap;
    }

    /* Stat boxes */
    .stat-box {
        min-height: 100px;
        padding: 16px;
    }
    .stat-box h2 { font-size: 26px; }

    /* System dashboard grid */
    .sys-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .dashboard-stats,
    .sys-grid {
        grid-template-columns: 1fr !important;
    }

    .main {
        padding: 68px 12px 16px;
    }

    .card { padding: 14px; }

    th, td { padding: 10px 10px; }
}
.theme-preview-pill:hover {
    background: var(--preview-hover);
}
.theme-preview {
    margin-top:18px;
    border-radius:12px;
    overflow:hidden;
    border:1px solid var(--line);
    background:var(--surface);
    --preview-hover: var(--hover);
}

/* =========================================================
   CONSISTENT MEDICAL DASHBOARD THEME
   Single palette applied across dashboard/sidebar/cards/buttons
   ========================================================= */
:root {
    --primary: #0f766e;
    --primary-dark: #115e59;
    --primary-soft: #ccfbf1;
    --secondary: #0f766e;
    --secondary-dark: #115e59;
    --accent: #0f766e;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --app-bg-start: #f8fafc;
    --app-bg-end: #eef7f6;
    --sidebar-start: #0f172a;
    --sidebar-mid: #102a2a;
    --sidebar-end: #115e59;
    --hover: #0f766e;
    --shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
    --shadow-soft: 0 8px 22px rgba(15, 23, 42, 0.06);
    --gradient: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
    --gradient-dark: linear-gradient(180deg, #0f172a 0%, #102a2a 55%, #115e59 100%);
    --radius: 16px;
}

body {
    background:
        radial-gradient(circle at top left, rgba(20, 184, 166, 0.10), transparent 30rem),
        linear-gradient(135deg, var(--app-bg-start) 0%, var(--app-bg-end) 100%) !important;
    color: var(--ink);
}

.sidebar {
    background: var(--gradient-dark) !important;
    box-shadow: 12px 0 32px rgba(15, 23, 42, 0.18) !important;
}
.sidebar h2 {
    letter-spacing: .5px;
    border-bottom-color: rgba(255,255,255,.12) !important;
}
.sidebar a {
    border-radius: 12px !important;
    color: rgba(255,255,255,.78) !important;
}
.sidebar a:hover:not(.active),
.sidebar a.active {
    background: rgba(20, 184, 166, .18) !important;
    color: #fff !important;
    box-shadow: inset 3px 0 0 #2dd4bf, 0 8px 18px rgba(0,0,0,.12) !important;
    transform: translateX(3px) !important;
}

.main { background: transparent !important; }

.topbar {
    background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%) !important;
    border-radius: 18px !important;
    box-shadow: var(--shadow) !important;
}

.card,
.stat-card,
.table-wrap {
    background: #ffffff !important;
    border: 1px solid var(--line) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow-soft) !important;
}
.card { padding: 24px; }

.stat-card {
    min-height: 126px;
    text-align: left !important;
    position: relative;
    overflow: hidden;
}
.stat-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient);
}
.stat-card .stat-lbl {
    color: var(--muted) !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    letter-spacing: .04em !important;
}
.stat-card .stat-val,
.stat-card .stat-val * {
    color: var(--primary-dark) !important;
}
.stat-card .stat-val {
    font-size: 30px !important;
    font-weight: 850 !important;
}

button,
.btn,
.btn-primary,
.btn-mark-paid {
    background: var(--gradient) !important;
    color: #ffffff !important;
    border-radius: 12px !important;
    border: 0 !important;
    box-shadow: 0 10px 22px rgba(15, 118, 110, 0.18) !important;
}
button:hover,
.btn:hover,
.btn-primary:hover,
.btn-mark-paid:hover {
    background: linear-gradient(135deg, #115e59 0%, #0f766e 100%) !important;
    transform: translateY(-1px) !important;
}
.btn-secondary {
    background: #f0fdfa !important;
    color: var(--primary-dark) !important;
    border: 1px solid #99f6e4 !important;
    box-shadow: none !important;
}

input, select, textarea {
    border-color: var(--line) !important;
    border-radius: 12px !important;
    background: #fff !important;
}
input:focus, select:focus, textarea:focus {
    border-color: #14b8a6 !important;
    box-shadow: 0 0 0 4px rgba(20, 184, 166, .14) !important;
}

th {
    background: #f0fdfa !important;
    color: #134e4a !important;
    border-bottom: 1px solid #ccfbf1 !important;
}
td { border-bottom-color: #eef2f7 !important; }
tbody tr:hover {
    background: #f8fffd !important;
    transform: none !important;
    box-shadow: none !important;
}

.sc-badge,
.badge {
    border-radius: 999px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: .02em;
}
.sc-badge.paid,
.badge-success {
    background: #dcfce7 !important;
    color: #166534 !important;
}
.sc-badge.unpaid,
.badge-danger {
    background: #fee2e2 !important;
    color: #991b1b !important;
}

#refreshBtn { margin-left: auto; }
#toast {
    background: #0f766e !important;
    border-radius: 999px !important;
    box-shadow: 0 16px 30px rgba(15,23,42,.18) !important;
}
#toast.error { background: #dc2626 !important; }

/* Dashboard-specific helpers */
.dashboard-stat-row {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 16px !important;
    margin-bottom: 24px !important;
}
@media (max-width: 1050px) {
    .dashboard-stat-row { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
}
@media (max-width: 560px) {
    .dashboard-stat-row { grid-template-columns: 1fr; }
}
