:root {
    --page-bg: #f4f6fb;
    --sidebar-bg: #ffffff;
    --panel-bg: #ffffff;
    --panel-border: #e6e8f0;
    --text-primary: #1a1d29;
    --text-muted: #767b8f;
    --accent-purple: #7c3aed;
    --accent-pink: #db2777;
    --accent-cyan: #0891b2;
    --accent-gold: #d97706;
    --accent-green: #059669;
    --accent-red: #e11d48;
    --gradient-brand: linear-gradient(135deg, var(--accent-purple), var(--accent-pink) 55%, var(--accent-cyan));
}

.dashboard-body {
    background: var(--page-bg);
    color: var(--text-primary);
    font-size: 14px;
}

/* Space theme removed. Kept as a hard "off" switch in case older compiled
   views (pre-restart) still contain the .space-scene markup. */
.space-scene {
    display: none !important;
}

.dashboard-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--panel-border);
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0 1rem 1rem 1rem;
    border-bottom: 1px solid var(--panel-border);
}

.brand-badge {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--gradient-brand);
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
}

.brand-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--text-primary);
}

.brand-version {
    font-size: 10px;
    color: var(--text-muted);
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0.6rem;
    overflow-y: auto;
}

.nav-section-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    padding: 0.4rem 0.6rem 0.6rem;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.5rem 0.6rem;
    font-size: 13px;
    color: #454a5c;
    border-radius: 10px;
    margin-bottom: 3px;
    border: 1px solid transparent;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.sidebar-nav .nav-link:hover {
    background: #f5f3fe;
    color: var(--accent-purple);
    transform: translateX(2px);
}

.sidebar-nav .nav-link.active {
    background: var(--gradient-brand);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.3);
}

.sidebar-nav .nav-link.active .nav-icon {
    background: rgba(255, 255, 255, 0.25);
}

.nav-icon {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    background: #eef0f6;
}

.nav-icon-dashboard { background: #ede9fe; }
.nav-icon-hr { background: #fce7f3; }
.nav-icon-send { background: #cffafe; }
.nav-icon-report { background: #fef3c7; }
.nav-icon-emailapi { background: #e0f2fe; }
.nav-icon-automations { background: #d1fae5; }
.nav-icon-schedules { background: #dbeafe; }
.nav-icon-integrations { background: #ccfbf1; }
.nav-icon-logs { background: #e5e7eb; }
.nav-icon-notifications { background: #fee2e2; }
.nav-icon-settings { background: #e0e7ff; }

.nav-text {
    flex: 1;
}

.nav-group-toggle {
    width: 100%;
    background: none;
    text-align: left;
    cursor: pointer;
}

.nav-group-toggle[aria-expanded="true"] {
    background: linear-gradient(90deg, rgba(124, 58, 237, 0.16), rgba(219, 39, 119, 0.1));
    border-color: rgba(124, 58, 237, 0.3);
    color: var(--accent-purple);
    font-weight: 600;
}

.nav-group-toggle[aria-expanded="true"] .nav-icon {
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.3);
}

.nav-caret {
    font-size: 10px;
    color: var(--text-muted);
    transition: transform 0.2s ease;
    margin-left: auto;
}

.nav-group-toggle[aria-expanded="true"] .nav-caret {
    transform: rotate(180deg);
    color: var(--accent-purple);
}

.nav-subgroup {
    position: relative;
    margin: 2px 0 4px 1.55rem;
    padding-left: 0.75rem;
    border-left: 2px solid #ede9fe;
}

.nav-sublink {
    padding: 0.4rem 0.55rem;
    font-size: 12px;
}

.nav-sublink .nav-icon {
    width: 22px;
    height: 22px;
    font-size: 11px;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1rem 0 1rem;
    border-top: 1px solid var(--panel-border);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-email {
    font-size: 10px;
    color: var(--text-muted);
}

.dashboard-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: #ffffff;
    border-bottom: 1px solid var(--panel-border);
    padding: 0.75rem 1.5rem;
}

.topbar-item {
    display: flex;
    flex-direction: column;
}

.topbar-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.topbar-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.topbar-date {
    margin-left: auto;
}

.topbar .btn-outline-secondary {
    color: var(--text-primary);
    border-color: var(--panel-border);
}

.topbar .btn-outline-secondary:hover {
    background: #fdf2f8;
    border-color: var(--accent-pink);
    color: var(--accent-pink);
}

.dashboard-content {
    padding: 1.5rem;
}

.summary-card {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 14px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    height: 100%;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.summary-card:hover {
    transform: translateY(-2px);
    border-color: rgba(124, 58, 237, 0.35);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.12);
}

/* Standalone panels (forms/tables) reuse .summary-card but aren't in an equal-height grid row. */
.summary-card.d-block {
    height: auto;
}

.summary-card .card-icon {
    font-size: 22px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(8, 145, 178, 0.1));
    border: 1px solid var(--panel-border);
}

.summary-card .card-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

.summary-card .card-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.section-heading {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 1.5rem 0 0.75rem;
    color: var(--accent-purple);
}

/* Bootstrap component overrides so forms/tables/alerts fit the clean, light theme. */
.dashboard-body .form-label,
.dashboard-body label {
    color: var(--text-muted);
}

.dashboard-body .form-control {
    background-color: #fff;
    border: 1px solid #d8dbe6;
    color: var(--text-primary);
}

.dashboard-body .form-control:focus {
    background-color: #fff;
    border-color: var(--accent-cyan);
    color: var(--text-primary);
    box-shadow: 0 0 0 0.2rem rgba(8, 145, 178, 0.15);
}

.dashboard-body .form-control::file-selector-button {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.25rem 0.6rem;
    margin-right: 0.6rem;
    transition: filter 0.15s ease;
}

.dashboard-body .form-control::file-selector-button:hover {
    filter: brightness(1.1);
}

.dashboard-body .form-text {
    color: var(--text-muted);
}

.dashboard-body .form-select {
    background-color: #fff;
    border: 1px solid #d8dbe6;
    color: var(--text-primary);
}

.dashboard-body .form-select:focus {
    background-color: #fff;
    border-color: var(--accent-cyan);
    color: var(--text-primary);
    box-shadow: 0 0 0 0.2rem rgba(8, 145, 178, 0.15);
}

.dashboard-body .btn-primary {
    background: var(--gradient-brand);
    border: none;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
    transition: filter 0.15s ease, box-shadow 0.15s ease;
}

.dashboard-body .btn-primary:hover,
.dashboard-body .btn-primary:focus {
    filter: brightness(1.08);
    box-shadow: 0 6px 16px rgba(219, 39, 119, 0.32);
}

.dashboard-body .btn-primary:disabled {
    background: #c7cbd8;
    box-shadow: none;
}

.dashboard-body .btn-outline-secondary {
    color: var(--text-primary);
    border-color: #d8dbe6;
    background: transparent;
}

.dashboard-body .btn-outline-secondary:hover {
    background: #f2edfc;
    border-color: var(--accent-purple);
    color: var(--accent-purple);
}

.dashboard-body .alert-danger {
    background: #fef2f4;
    border: 1px solid #fbc7d1;
    color: #9f1239;
}

.dashboard-body .progress {
    background-color: #eef0f6;
    border-radius: 999px;
    overflow: hidden;
}

.dashboard-body .progress-bar.bg-success {
    background: var(--accent-green) !important;
}

.dashboard-body .progress-bar.bg-danger {
    background: var(--accent-red) !important;
}

.dashboard-body .progress-bar.bg-warning {
    background: var(--accent-gold) !important;
}

.dashboard-body .badge.text-bg-success {
    background: #d1fae5 !important;
    color: #065f46;
}

.dashboard-body .badge.text-bg-danger {
    background: #ffe4e6 !important;
    color: #9f1239;
}

.dashboard-body .badge.text-bg-warning {
    background: #fef3c7 !important;
    color: #92400e;
}

.dashboard-body .text-warning {
    color: var(--accent-gold) !important;
}

.dashboard-body .table {
    color: var(--text-primary);
    --bs-table-bg: transparent;
    --bs-table-hover-bg: #f7f5fd;
    --bs-table-hover-color: var(--text-primary);
    --bs-table-striped-bg: #fafafc;
}

.dashboard-body .table thead th {
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.04em;
    border-bottom-color: var(--panel-border);
}

.dashboard-body .table td,
.dashboard-body .table th {
    border-color: var(--panel-border);
}

.dashboard-body .text-muted {
    color: var(--text-muted) !important;
}

/* Tables can be wider than a phone screen - let them scroll horizontally within their card
   rather than squashing every column unreadably. */
.summary-card.p-0 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ---------------------------------------------------------------------
   Mobile layout: the sidebar becomes an off-canvas drawer (hidden by
   default, slid in over the content) instead of a fixed 240px column
   that would otherwise eat almost the whole phone screen.
   ------------------------------------------------------------------- */

.mobile-nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 8px;
    border: 1px solid var(--panel-border);
    background: #fff;
    font-size: 16px;
    line-height: 1;
    color: var(--text-primary);
    margin-right: 0.25rem;
}

.sidebar-backdrop {
    display: none;
}

@media (max-width: 900px) {
    .mobile-nav-toggle {
        display: inline-flex;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100dvh;
        z-index: 1050;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        box-shadow: 0 0 30px rgba(16, 24, 40, 0.18);
    }

    .dashboard-shell.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .dashboard-shell.sidebar-open .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 15, 25, 0.4);
        z-index: 1040;
    }

    .dashboard-main {
        width: 100%;
        min-width: 0;
    }

    .topbar {
        flex-wrap: wrap;
        row-gap: 0.5rem;
        column-gap: 1rem;
        padding: 0.6rem 1rem;
    }

    .topbar-date {
        margin-left: 0;
    }

    .topbar form {
        margin-left: auto;
    }

    .dashboard-content {
        padding: 1rem;
    }

    .section-heading {
        margin: 1.1rem 0 0.6rem;
    }
}

@media (max-width: 480px) {
    .dashboard-body {
        font-size: 13px;
    }

    .summary-card {
        padding: 0.75rem;
        gap: 0.6rem;
    }

    .summary-card .card-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .summary-card .card-value {
        font-size: 17px;
    }

    .topbar {
        gap: 0.5rem 0.75rem;
    }

    .topbar-value {
        font-size: 12px;
    }

    .sidebar {
        width: 260px;
    }
}

/* ---------------------------------------------------------------------
   Email API queue toolbar: a flex row instead of Bootstrap grid columns,
   so the buttons keep a sane width instead of stretching enormously on
   wide screens while the resume field grows to fill the middle.
   ------------------------------------------------------------------- */

.queue-toolbar {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

.queue-toolbar-btn {
    flex: 0 0 auto;
    min-width: 160px;
}

.queue-toolbar-btn-send {
    min-width: 190px;
}

.queue-toolbar-resume {
    flex: 1 1 320px;
    min-width: 220px;
    max-width: 480px;
}

@media (max-width: 700px) {
    .queue-toolbar-btn,
    .queue-toolbar-btn-send,
    .queue-toolbar-resume {
        flex-basis: 100%;
        max-width: none;
        width: 100%;
    }
}

/* Queued emails: a plain, dense, white/black table - one line per row. */

.queue-table {
    background: #fff;
    color: #111827;
}

.queue-table th,
.queue-table td {
    font-size: 12px;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

.queue-check-col {
    width: 32px;
    max-width: 32px;
}

.queue-subject-cell {
    max-width: 320px;
}

.queue-table .message-cell {
    white-space: normal;
    max-width: 260px;
}

/* ---- Credits: numbered step cards, ledger, popups ---- */
.nav-icon-credits { background: #dcfce7; }
.nav-icon-newcredit { background: #d1fae5; }
.nav-icon-reports { background: #e0e7ff; }
.nav-icon-creditreport { background: #ede9fe; }

.page-crumbs { font-size: 13px; color: var(--text-muted); margin-bottom: 0.5rem; }
.page-crumbs .current { color: var(--accent-purple); font-weight: 600; }
.page-title { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.page-subtitle { color: var(--text-muted); margin: 0.15rem 0 1.25rem; }

.step-card {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 1.1rem 1.25rem 1.25rem;
    height: 100%;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
}
.step-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.step-num {
    width: 32px; height: 32px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    background: #ede9fe; color: var(--accent-purple); font-size: 12px; font-weight: 700;
}
.step-title { font-size: 15px; font-weight: 700; line-height: 1.2; }
.step-sub { font-size: 12px; color: var(--text-muted); }
.step-sub a { font-weight: 600; cursor: pointer; }
.req { color: var(--accent-red); }
.field-hint { font-size: 12px; color: var(--text-muted); margin-top: 0.25rem; }
.field-hint.ok { color: var(--accent-green); }

.outstanding-tile {
    border-radius: 12px;
    padding: 0.85rem 1rem;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(8, 145, 178, 0.08));
    border: 1px solid var(--panel-border);
    margin-bottom: 0.9rem;
}
.outstanding-tile .label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.outstanding-tile .value { font-size: 26px; font-weight: 800; color: #ea580c; line-height: 1.15; }
.outstanding-tile .value.zero { color: var(--accent-green); }
.outstanding-tile .split { display: flex; gap: 1.25rem; font-size: 12px; color: var(--text-muted); margin-top: 0.25rem; }
.outstanding-tile .split strong { color: var(--text-primary); }

.ledger-empty { text-align: center; padding: 1.5rem 0.5rem; color: var(--text-muted); }
.ledger-empty .ledger-empty-icon {
    width: 44px; height: 44px; border-radius: 12px; margin: 0 auto 0.6rem;
    display: flex; align-items: center; justify-content: center; background: #f3e8ff; font-size: 20px;
}
.ledger-empty .ledger-empty-title { font-weight: 700; color: var(--text-primary); }
.ledger-empty .ledger-empty-sub { font-size: 12px; }

.ledger-scroll { max-height: 300px; overflow: auto; }
.ledger-table { font-size: 13px; margin: 0; }
.ledger-table th {
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted);
    background: #f8f9fc; position: sticky; top: 0; white-space: nowrap;
}
.ledger-table td { vertical-align: middle; }
.ledger-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.badge-credit { background: #ede9fe; color: #6d28d9; }
.badge-payment { background: #dcfce7; color: #047857; }
.badge-credit, .badge-payment { font-weight: 600; }

.complete-bar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
    background: #f8f9fc; border: 1px solid var(--panel-border); border-radius: 14px; padding: 1rem 1.25rem;
}
.complete-bar .label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); font-weight: 700; }
.complete-bar .value { font-size: 24px; font-weight: 800; color: var(--accent-purple); }

.input-lkr .input-group-text { font-size: 11px; font-weight: 700; color: var(--text-muted); background: #f4f6fb; }

.creditor-modal .modal-content { border: 0; border-radius: 18px; box-shadow: 0 20px 50px rgba(16, 24, 40, 0.25); }
.creditor-modal .modal-header { border-bottom: 1px solid var(--panel-border); padding: 1rem 1.25rem; }
.creditor-modal .modal-title { font-weight: 700; font-size: 16px; }
.creditor-modal .modal-body { padding: 1.25rem; }
.creditor-results { max-height: 340px; overflow-y: auto; border: 1px solid var(--panel-border); border-radius: 12px; }
.creditor-results .list-item {
    display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
    padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--panel-border);
}
.creditor-results .list-item:last-child { border-bottom: 0; }
.creditor-results .list-item:hover { background: #f8f5ff; }
.creditor-results .who { font-weight: 600; }
.creditor-results .meta { font-size: 12px; color: var(--text-muted); }
.creditor-results .owed { font-size: 12px; font-weight: 700; color: #ea580c; text-align: right; white-space: nowrap; }
.creditor-results .empty { padding: 1.5rem; text-align: center; color: var(--text-muted); }

.amount-out { color: #ea580c; font-weight: 700; }
.amount-zero { color: var(--accent-green); font-weight: 700; }
.nav-icon-creditors { background: #fef3c7; }

.suggest-wrap { position: relative; }
.suggest-list {
    position: absolute; z-index: 20; left: 0; min-width: 300px; right: 0; top: calc(100% + 4px);
    background: #fff; border: 1px solid var(--panel-border); border-radius: 12px;
    box-shadow: 0 12px 30px rgba(16, 24, 40, 0.16); max-height: 280px; overflow-y: auto;
}
.suggest-item { padding: 0.55rem 0.8rem; cursor: pointer; border-bottom: 1px solid var(--panel-border); display: flex; justify-content: space-between; gap: 0.75rem; }
.suggest-item:last-child { border-bottom: 0; }
.suggest-item:hover, .suggest-item.active { background: #f8f5ff; }
.suggest-item .who { font-weight: 600; }
.suggest-item .meta { font-size: 12px; color: var(--text-muted); }
.suggest-item .owed { font-size: 12px; font-weight: 700; color: #ea580c; text-align: right; white-space: nowrap; }
.suggest-item .owed.zero { color: var(--accent-green); }
.creditor-results .owed.zero { color: var(--accent-green); }
.sms-preview { background: #f8f9fc; border: 1px solid var(--panel-border); border-radius: 12px; padding: 0.8rem 1rem; font-size: 13px; white-space: pre-wrap; word-break: break-word; }

/* Bootstrap's table cell colour rule out-ranks the plain classes above, so restate them for table cells. */
.table > tbody > tr > td.amount-out { color: #ea580c; }
.table > tbody > tr > td.amount-zero { color: var(--accent-green); }

/* ---- Report pages: header, KPI cards, table card, shiny buttons ---- */
.rep-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.25rem; }
.rep-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: #2563eb; }
.rep-title { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; margin: 2px 0 0; }
.rep-sub { color: var(--text-muted); }
.rep-filters { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.rep-filters .form-control, .rep-filters .form-select {
    height: 46px; border-radius: 12px; min-width: 200px; box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
}

.kpi {
    background: #fff; border: 1px solid var(--panel-border); border-left: 4px solid var(--kpi);
    border-radius: 14px; padding: 1rem 1.25rem; height: 100%;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
}
.kpi .k-label { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); }
.kpi .k-value { font-size: clamp(15px, 1.6vw, 26px); font-weight: 800; color: var(--kpi); line-height: 1.25; white-space: nowrap; }

.rep-card {
    background: #fff; border: 1px solid var(--panel-border); border-radius: 18px; padding: 0.75rem 1rem 0.5rem;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 8px 24px rgba(16, 24, 40, 0.04);
}
.rep-table { --bs-table-bg: transparent; }
.rep-table thead th {
    font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted);
    background: #f6f8fc; border-bottom: 0; padding: 0.85rem 0.75rem; white-space: nowrap;
}
.rep-table thead th:first-child { border-radius: 10px 0 0 10px; }
.rep-table thead th:last-child { border-radius: 0 10px 10px 0; }
.rep-table tbody td { padding: 1rem 0.75rem; border-bottom: 1px solid #eef0f6; font-variant-numeric: tabular-nums; }
.rep-table tbody tr:last-child td { border-bottom: 0; }
.rep-table tbody tr:hover > td { background: #f9faff; }
.rep-avatar {
    width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
    background: #e0ecff; color: #2563eb; font-weight: 800; flex: none;
}
.rep-name { font-weight: 700; }
.pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pill-owing { background: #fff1e6; color: #c2410c; }
.pill-settled { background: #dcfce7; color: #047857; }

.dashboard-body .btn-shine {
    --c1: #2563eb; --c2: #06b6d4; --glow: rgba(37, 99, 235, 0.38);
    position: relative; overflow: hidden; border: 0; color: #fff; font-weight: 700; font-size: 12.5px;
    padding: 0.5rem 0.95rem; border-radius: 10px;
    background: linear-gradient(135deg, var(--c1), var(--c2));
    box-shadow: 0 4px 12px var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
    transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}
.dashboard-body .btn-shine::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0) 55%);
}
.dashboard-body .btn-shine::after {
    content: ""; position: absolute; top: -60%; left: -70%; width: 38%; height: 220%; pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
    transform: rotate(20deg); animation: btn-shine-sweep 4.2s ease-in-out infinite;
}
.dashboard-body .btn-shine:hover, .dashboard-body .btn-shine:focus {
    color: #fff; filter: brightness(1.12) saturate(1.15); transform: translateY(-1px);
    box-shadow: 0 8px 20px var(--glow), 0 0 0 3px rgba(255, 255, 255, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.dashboard-body .btn-shine:active { transform: translateY(0); filter: brightness(1); }
.dashboard-body .btn-shine:disabled { filter: grayscale(0.7) opacity(0.6); box-shadow: none; animation: none; }
.dashboard-body .btn-shine:disabled::after { display: none; }
.dashboard-body .btn-shine-blue   { --c1: #2563eb; --c2: #06b6d4; --glow: rgba(37, 99, 235, 0.38); }
.dashboard-body .btn-shine-green  { --c1: #059669; --c2: #4ade80; --glow: rgba(5, 150, 105, 0.38); }
.dashboard-body .btn-shine-orange { --c1: #f97316; --c2: #fbbf24; --glow: rgba(249, 115, 22, 0.4); }
.dashboard-body .btn-shine-purple { --c1: #7c3aed; --c2: #db2777; --glow: rgba(124, 58, 237, 0.4); }
.dashboard-body .btn-shine-red    { --c1: #e11d48; --c2: #fb7185; --glow: rgba(225, 29, 72, 0.38); }

@keyframes btn-shine-sweep {
    0%, 62% { left: -70%; }
    100% { left: 140%; }
}
@media (prefers-reduced-motion: reduce) {
    .dashboard-body .btn-shine::after { animation: none; }
}

.pill-country { background: #e0ecff; color: #1d4ed8; }
.rep-filters .rep-filter-btn { height: 46px; display: inline-flex; align-items: center; padding: 0 1.25rem; font-size: 14px; border-radius: 12px; }
.rep-filters input[type="date"].form-control { min-width: 160px; }
.rep-filters .form-control, .rep-filters .form-select { width: auto; flex: 1 1 170px; }
.rep-filters { flex: 1 1 520px; justify-content: flex-end; }
