/* ═══════════════════════════════════════════════════════════════════
   STRIPE-STYLE GLOBAL OVERRIDES
   Consistent, clean, modern UI inspired by Stripe Dashboard (2026)
   Applied globally — no per-page changes needed for base components.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Design Tokens ── */
:root {
    --s-bg: #f7f8fa;
    --s-card: #ffffff;
    --s-border: #e3e8ee;
    --s-border-light: #f0f2f5;
    --s-text: #1a1f36;
    --s-text-secondary: #697386;
    --s-text-muted: #8792a2;
    --s-accent: var(--bs-primary, #4361ee);
    --s-accent-rgb: var(--bs-primary-rgb, 67,97,238);
    --s-green: #0cad55;
    --s-red: #cd3d64;
    --s-amber: #e8901e;
    --s-blue: #5469d4;
    --s-radius: 8px;
    --s-radius-lg: 12px;
    --s-shadow-sm: 0 1px 3px rgba(0,0,0,.04), 0 1px 2px rgba(0,0,0,.02);
    --s-shadow: 0 2px 8px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --s-shadow-hover: 0 4px 16px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
    --s-transition: .2s cubic-bezier(.22,1,.36,1);
    --s-font: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}


/* ═══════════════════════════════════════
   1. GLOBAL & TYPOGRAPHY
   ═══════════════════════════════════════ */

body {
    font-family: var(--s-font);
    color: var(--s-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.pc-content {
    background: var(--s-bg);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--s-text);
    font-weight: 600;
}

small, .small {
    color: var(--s-text-secondary);
}

a {
    transition: color .15s;
}


/* ═══════════════════════════════════════
   2. CARDS
   ═══════════════════════════════════════ */

.card {
    border: 1px solid var(--s-border);
    border-radius: var(--s-radius-lg);
    box-shadow: var(--s-shadow-sm);
    background: var(--s-card);
    overflow: hidden;
    transition: box-shadow var(--s-transition);
}

.card:hover {
    box-shadow: var(--s-shadow);
}

.card-header {
    background: var(--s-card);
    border-bottom: 1px solid var(--s-border);
    padding: 10px 16px;
    font-size: 13px;
}

.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6 {
    font-size: 14px;
    font-weight: 600;
    color: var(--s-text);
    margin: 0;
}

.card-body {
    padding: 16px;
}

.card-footer {
    background: #fafbfc;
    border-top: 1px solid var(--s-border);
    padding: 10px 16px;
}

/* Remove extra card shadows from template */
.card .card-body .position-absolute .btn-primary {
    margin-top: -60px;
}


/* ═══════════════════════════════════════
   3. TABLES
   ═══════════════════════════════════════ */

.table {
    font-size: 12.5px;
    color: var(--s-text);
    margin-bottom: 0;
    border-color: var(--s-border-light);
}

.table > :not(caption) > * > * {
    border-bottom-color: var(--s-border-light);
}

.table > tbody > tr > td {
    padding: 0 6px;
}

.table.table-sm td {
    padding: 0 8px !important;
}

/* Table header */
.table > thead > tr > th,
.table thead th,
.table-light th {
    font-size: 10px !important;
    text-transform: uppercase;
    letter-spacing: .6px;
    font-weight: 600;
    color: var(--s-text-secondary) !important;
    background: #fafbfc !important;
    border-bottom: 1px solid var(--s-border) !important;
    border-top: none !important;
    padding: 4px 6px !important;
    white-space: nowrap;
}

/* Table body */
.table > tbody > tr > td {
    vertical-align: middle;
    border-bottom: 1px solid var(--s-border-light);
    color: var(--s-text);
    font-size: 14px;
}

.table > tbody > tr:last-child > td {
    border-bottom: none;
}

/* Hover */
.table-hover > tbody > tr:hover > td,
.table-hover > tbody > tr:hover > th {
    background: #f8f9fb !important;
}

/* ── Table Action Buttons ── */
.tbl-actions {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: #f4f6f8;
    border-radius: 8px;
    padding: 2px;
}

.tbl-act {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: #667085;
    font-size: 20px;
    cursor: pointer;
    transition: all .12s;
    text-decoration: none;
    padding: 0;
    line-height: 1;
}

.tbl-act:hover {
    background: #fff;
    color: var(--bs-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.tbl-act:active {
    transform: scale(.92);
}

.tbl-act-more {
    color: #98a2b3;
    font-size: 18px;
}

.tbl-act-more:hover,
.tbl-act-more[aria-expanded="true"] {
    background: #fff;
    color: #475467;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

/* Dropdown inside table actions */
.tbl-actions .dropdown-menu {
    font-size: 12.5px;
    padding: 4px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
    border: 1px solid #eaecf0;
    min-width: 150px;
    animation: tbDrop .15s cubic-bezier(.22,1,.36,1);
}

.tbl-actions .dropdown-item {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tbl-actions .dropdown-item i {
    font-size: 14px;
    width: 16px;
    text-align: center;
}

/* Legacy btn-sm in tables */
.table .btn-sm {
    padding: 3px 7px;
    font-size: 11px;
    border-radius: 6px;
    line-height: 1.4;
}

/* Striped - make it subtler */
.table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: #fafbfc;
}
.table-striped > tbody > tr:nth-of-type(odd):hover > td {
    background-color: #f4f6f8 !important;
}

/* Table footer */
.table > tfoot > tr > td,
.table > tfoot > tr > th {
    font-weight: 600;
    background: #fafbfc;
    border-top: 1px solid var(--s-border);
    font-size: 11.5px;
    padding: 2px 6px;
}

/* Links in tables */
.table a:not(.btn) {
    color: var(--s-accent);
    text-decoration: none;
    font-weight: 500;
}
.table a:not(.btn):hover {
    text-decoration: underline;
}

/* Numeric cells */
.table .text-end {
    font-variant-numeric: tabular-nums;
}

/* Active row */
.table-active,
.table > tbody > tr.table-active > td {
    background-color: rgba(var(--s-accent-rgb), .04) !important;
}

/* Bordered variant - soften borders */
.table-bordered,
.table-bordered > :not(caption) > * > * {
    border-color: var(--s-border-light);
}


/* ═══════════════════════════════════════
   4. DATATABLES OVERRIDES
   ═══════════════════════════════════════ */

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--s-border);
    border-radius: 6px;
    font-size: 12.5px;
    padding: 5px 10px;
    color: var(--s-text);
    background: #fff;
    transition: border-color .15s;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: rgba(var(--s-accent-rgb), .5);
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--s-accent-rgb), .08);
}

.dataTables_wrapper .dataTables_info {
    font-size: 12px;
    color: var(--s-text-muted);
    padding-top: 12px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    font-size: 12px;
    border-radius: 6px !important;
    border: 1px solid var(--s-border) !important;
    margin: 0 2px;
    padding: 4px 10px !important;
    color: var(--s-text) !important;
    background: #fff !important;
    transition: all .15s;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #f4f6f8 !important;
    border-color: rgba(var(--s-accent-rgb), .3) !important;
    color: var(--s-accent) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--s-accent) !important;
    border-color: var(--s-accent) !important;
    color: #fff !important;
    font-weight: 600;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: .4;
    cursor: default;
}

/* DataTables export buttons */
.dt-buttons .btn,
.dataTables_wrapper .dt-buttons .btn {
    font-size: 11.5px;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid var(--s-border);
    background: #fff;
    color: var(--s-text);
    transition: all .15s;
}
.dt-buttons .btn:hover {
    border-color: rgba(var(--s-accent-rgb), .3);
    background: #f8f9fb;
}


/* ═══════════════════════════════════════
   5. BUTTONS
   ═══════════════════════════════════════ */

.btn {
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    padding: 7px 14px;
    transition: all .15s;
    letter-spacing: .01em;
}

.btn-sm {
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 6px;
}

.btn-xs {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 5px;
}

/* Primary */
.btn-primary {
    box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.btn-primary:hover {
    box-shadow: 0 2px 6px rgba(var(--s-accent-rgb), .25);
}

/* Success */
.btn-success {
    box-shadow: 0 1px 2px rgba(0,0,0,.08);
}

/* Danger */
.btn-danger {
    box-shadow: 0 1px 2px rgba(0,0,0,.08);
}

/* Outline variants - subtle background on hover */
.btn-outline-primary:hover,
.btn-outline-secondary:hover,
.btn-outline-danger:hover,
.btn-outline-dark:hover {
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

/* Button groups */
.btn-group .btn {
    border-radius: 0;
}
.btn-group .btn:first-child {
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}
.btn-group .btn:last-child {
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}


/* ═══════════════════════════════════════
   6. BADGES
   ═══════════════════════════════════════ */

.badge {
    font-size: 10.5px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 5px;
    letter-spacing: .2px;
}

.badge.bg-success {
    background-color: rgba(12, 173, 85, .1) !important;
    color: var(--s-green) !important;
}
.badge.bg-danger {
    background-color: rgba(205, 61, 100, .1) !important;
    color: var(--s-red) !important;
}
.badge.bg-warning {
    background-color: rgba(232, 144, 30, .1) !important;
    color: var(--s-amber) !important;
}
.badge.bg-info {
    background-color: rgba(84, 105, 212, .1) !important;
    color: var(--s-blue) !important;
}
.badge.bg-primary {
    background-color: rgba(var(--s-accent-rgb), .1) !important;
    color: var(--s-accent) !important;
}
.badge.bg-secondary {
    background-color: rgba(135, 146, 162, .08) !important;
    color: var(--s-text-secondary) !important;
}
.badge.bg-dark {
    background-color: rgba(26, 31, 54, .08) !important;
    color: var(--s-text) !important;
}
.badge.bg-light {
    background-color: #f4f5f7 !important;
    color: var(--s-text-secondary) !important;
    border: 1px solid var(--s-border);
}


/* ═══════════════════════════════════════
   7. FORMS
   ═══════════════════════════════════════ */

.form-control,
.form-select {
    font-size: 13px;
    border: 1px solid var(--s-border);
    border-radius: 6px;
    color: var(--s-text);
    padding: 8px 12px;
    transition: border-color .15s, box-shadow .15s;
    background-color: #fff;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(var(--s-accent-rgb), .5);
    box-shadow: 0 0 0 3px rgba(var(--s-accent-rgb), .08);
}

.form-control-sm,
.form-select-sm {
    font-size: 12.5px;
    padding: 5px 10px;
}

.form-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--s-text-secondary);
    margin-bottom: 4px;
    letter-spacing: .02em;
}

/* Inline form items in cards */
.form-control::placeholder {
    color: var(--s-text-muted);
}

/* Invalid state */
.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--s-red);
}
.form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(205,61,100,.08);
}

.invalid-feedback {
    font-size: 11.5px;
    color: var(--s-red);
}

/* Input group */
.input-group .form-control,
.input-group .form-select {
    border-radius: 6px;
}
.input-group > :not(:first-child):not(.dropdown-menu) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
.input-group > :not(:last-child):not(.dropdown-toggle) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* Checkbox / Radio */
.form-check-input {
    border-color: var(--s-border);
    transition: all .15s;
}
.form-check-input:checked {
    border-color: var(--s-accent);
}


/* ═══════════════════════════════════════
   8. ALERTS
   ═══════════════════════════════════════ */

.alert {
    border-radius: var(--s-radius);
    font-size: 13px;
    padding: 12px 16px;
    border: 1px solid;
}

.alert-success {
    background: rgba(12,173,85,.06);
    border-color: rgba(12,173,85,.15);
    color: #067a3d;
}

.alert-danger {
    background: rgba(205,61,100,.06);
    border-color: rgba(205,61,100,.15);
    color: #a3304e;
}

.alert-warning {
    background: rgba(232,144,30,.06);
    border-color: rgba(232,144,30,.15);
    color: #9a6a10;
}

.alert-info {
    background: rgba(84,105,212,.06);
    border-color: rgba(84,105,212,.15);
    color: #3b4fc4;
}


/* ═══════════════════════════════════════
   9. MODALS
   ═══════════════════════════════════════ */

.modal-content {
    border: none;
    border-radius: var(--s-radius-lg);
    box-shadow: 0 16px 48px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.08);
}

.modal-header {
    border-bottom: 1px solid var(--s-border);
    padding: 16px 20px;
}

.modal-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--s-text);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    border-top: 1px solid var(--s-border);
    padding: 14px 20px;
    background: #fafbfc;
}

.modal-backdrop.show {
    opacity: .35;
}


/* ═══════════════════════════════════════
   10. PAGINATION (non-DataTables)
   ═══════════════════════════════════════ */

.pagination {
    gap: 3px;
}

.page-link {
    font-size: 12px;
    border: 1px solid var(--s-border);
    border-radius: 6px !important;
    color: var(--s-text);
    padding: 5px 10px;
    transition: all .15s;
}

.page-link:hover {
    background: #f4f6f8;
    border-color: rgba(var(--s-accent-rgb), .3);
    color: var(--s-accent);
}

.page-item.active .page-link {
    background: var(--s-accent);
    border-color: var(--s-accent);
    color: #fff;
}

.page-item.disabled .page-link {
    opacity: .4;
    background: #fff;
}


/* ═══════════════════════════════════════
   11. DROPDOWNS
   ═══════════════════════════════════════ */

.dropdown-menu {
    border: 1px solid var(--s-border);
    border-radius: var(--s-radius);
    box-shadow: var(--s-shadow);
    padding: 4px;
    font-size: 12.5px;
}

.dropdown-item {
    border-radius: 5px;
    padding: 6px 12px;
    color: var(--s-text);
    transition: background .1s;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: #f4f6f8;
    color: var(--s-text);
}

.dropdown-item.text-danger:hover {
    background: rgba(205,61,100,.06);
}

.dropdown-divider {
    border-color: var(--s-border-light);
    margin: 4px 0;
}


/* ═══════════════════════════════════════
   12. TABS
   ═══════════════════════════════════════ */

.nav-tabs {
    border-bottom: 1px solid var(--s-border);
    gap: 0;
}

.nav-tabs .nav-link {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--s-text-secondary);
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 16px;
    transition: color .15s, border-color .15s;
    border-radius: 0;
}

.nav-tabs .nav-link:hover {
    color: var(--s-text);
    border-bottom-color: var(--s-border);
    background: none;
}

.nav-tabs .nav-link.active {
    color: var(--s-accent);
    border-bottom-color: var(--s-accent);
    background: none;
    font-weight: 600;
}


/* ═══════════════════════════════════════
   13. DEFINITION LISTS (Show pages)
   ═══════════════════════════════════════ */

dl.row dt {
    font-size: 12px;
    font-weight: 500;
    color: var(--s-text-secondary);
}

dl.row dd {
    font-size: 13px;
    font-weight: 500;
    color: var(--s-text);
}


/* ═══════════════════════════════════════
   14. BREADCRUMBS
   ═══════════════════════════════════════ */

.breadcrumb {
    font-size: 12px;
    margin-bottom: 0;
}

.breadcrumb-item {
    color: var(--s-text-muted);
}

.breadcrumb-item.active {
    color: var(--s-text-secondary);
}

.breadcrumb-item a {
    color: var(--s-text-secondary);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--s-accent);
}


/* ═══════════════════════════════════════
   15. BORDER-START CARDS (Summary cards)
   ═══════════════════════════════════════ */

.card.border-start.border-3 {
    border-left-width: 3px !important;
    border-radius: var(--s-radius-lg);
}

.card.border-start .card-body h6.text-muted {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .4px;
    font-weight: 600;
    color: var(--s-text-muted) !important;
}

.card.border-start .card-body h4 {
    font-size: 22px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}


/* ═══════════════════════════════════════
   16. TOM SELECT OVERRIDES
   ═══════════════════════════════════════ */

.ts-wrapper .ts-control {
    border: 1px solid var(--s-border);
    border-radius: 6px;
    font-size: 13px;
    padding: 5px 10px;
    min-height: 38px;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}

.ts-wrapper.focus .ts-control {
    border-color: rgba(var(--s-accent-rgb), .5);
    box-shadow: 0 0 0 3px rgba(var(--s-accent-rgb), .08);
}

.ts-dropdown {
    border: 1px solid var(--s-border);
    border-radius: var(--s-radius);
    box-shadow: var(--s-shadow);
    font-size: 13px;
}

.ts-dropdown .option {
    padding: 6px 12px;
    border-radius: 4px;
    margin: 1px 4px;
}


/* ═══════════════════════════════════════
   17. SCROLLBAR
   ═══════════════════════════════════════ */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #d0d4db;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b0b6bf;
}


/* ═══════════════════════════════════════
   18. UTILITY OVERRIDES
   ═══════════════════════════════════════ */

/* Colored text to match Stripe palette */
.text-success { color: var(--s-green) !important; }
.text-danger  { color: var(--s-red) !important; }
.text-warning { color: var(--s-amber) !important; }
.text-info    { color: var(--s-blue) !important; }
.text-muted   { color: var(--s-text-muted) !important; }

/* Border color consistency */
.border { border-color: var(--s-border) !important; }

/* Background light */
.bg-light {
    background-color: #fafbfc !important;
}

/* Rounded helpers */
.rounded-pill {
    border-radius: 50px !important;
}

/* Smooth transitions on interactive elements */
a, .btn, .form-control, .form-select, .badge, .card, .nav-link, .page-link, .dropdown-item {
    transition: all .15s ease;
}


/* ═══════════════════════════════════════
   19. TOPBAR NAVIGATION (no sidebar)
   ═══════════════════════════════════════ */

/* Kill sidebar + fix content offset */
.pc-sidebar { display: none !important; }
.pc-header { display: none !important; }

/* ── Topbar ── */
.topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: var(--topbar-accent, var(--bs-primary));
    border-bottom: none;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

.topbar-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    height: 52px;
    max-width: 100%;
}

/* ── Company brand (left) ── */
.topbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.topbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 8px;
    background: rgba(255,255,255,.12);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}

.topbar-brand:hover {
    border-color: rgba(255,255,255,.3);
    background: rgba(255,255,255,.2);
    color: #fff;
}

.topbar-brand-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.topbar-brand-name {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-brand-arrow {
    font-size: 11px;
    color: rgba(255,255,255,.5);
    transition: transform .2s;
}

.dropdown.show .topbar-brand-arrow {
    transform: rotate(180deg);
}

.topbar-cash-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 3px 8px;
    border-radius: 5px;
    background: #1d2939;
    color: #fff;
}

/* Company dropdown */
.topbar-brand-menu {
    min-width: 280px;
    border: 1px solid #eaecf0;
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 12px 40px rgba(0,0,0,.12);
    margin-top: 6px;
    animation: tbDrop .18s cubic-bezier(.22,1,.36,1);
}

@keyframes tbDrop {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.topbar-brand-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .7px;
    font-weight: 700;
    color: #98a2b3;
    padding: 8px 12px 4px;
}

.topbar-brand-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--s-text);
    transition: background .1s;
    margin-bottom: 2px;
}

.topbar-brand-item:hover {
    background: #f4f6f8;
    color: var(--s-text);
}

.topbar-brand-item.active {
    background: rgba(var(--bs-primary-rgb), .06);
}

.topbar-brand-item-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.topbar-brand-item-info span {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.topbar-brand-item-info small {
    font-size: 10px;
    color: #98a2b3;
    font-family: 'Courier New', monospace;
}

.topbar-brand-item .ti-check {
    color: var(--bs-primary);
    font-size: 16px;
}

/* ── Horizontal nav (center) ── */
.topbar-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    justify-content: center;
    min-width: 0;
}

.topbar-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,.75);
    text-decoration: none;
    border-radius: 7px;
    transition: all .15s;
    white-space: nowrap;
}

.topbar-nav-link i:first-child {
    font-size: 16px;
}

.topbar-nav-link .ti-chevron-down {
    font-size: 10px;
    opacity: .5;
    margin-left: -2px;
}

.topbar-nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,.12);
}

.topbar-nav-link.active {
    color: #fff;
    background: rgba(255,255,255,.18);
    font-weight: 600;
}

/* Nav dropdowns */
.topbar-dropdown {
    border: 1px solid #eaecf0;
    border-radius: 12px;
    padding: 5px;
    box-shadow: 0 12px 40px rgba(0,0,0,.12);
    animation: tbDrop .18s cubic-bezier(.22,1,.36,1);
    min-width: 200px;
}

.topbar-dropdown-header {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .6px;
    font-weight: 700;
    color: #98a2b3;
    padding: 8px 12px 4px;
}

.topbar-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #344054;
    text-decoration: none;
    border-radius: 7px;
    transition: background .1s;
}

.topbar-dropdown-item:hover {
    background: #f4f6f8;
    color: #1d2939;
}

.topbar-dropdown-item.active {
    color: var(--bs-primary);
    font-weight: 600;
    background: rgba(var(--bs-primary-rgb), .04);
}

.topbar-dropdown-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.topbar-dropdown kbd {
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 3px;
    background: #f2f4f7;
    color: #667085;
    border: 1px solid #eaecf0;
    font-family: inherit;
    font-weight: 500;
}

.topbar-dropdown .dropdown-divider {
    margin: 4px 8px;
    border-color: #f0f2f5;
}

/* ── Right actions ── */
.topbar-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    margin-left: auto;
}

.topbar-action {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: rgba(255,255,255,.65);
    font-size: 18px;
    text-decoration: none;
    transition: all .15s;
}

.topbar-action:hover {
    color: #fff;
    background: rgba(255,255,255,.12);
}

.topbar-hamburger {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.2);
    background: rgba(255,255,255,.1);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    transition: all .15s;
}

.topbar-hamburger:hover {
    background: rgba(255,255,255,.2);
}

/* User button */
.topbar-user {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 4px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 8px;
    text-decoration: none;
    color: #fff;
    transition: all .15s;
}

.topbar-user:hover {
    border-color: rgba(255,255,255,.3);
    background: rgba(255,255,255,.1);
    color: #fff;
}

.topbar-user img {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,.25);
}

.topbar-user-name {
    font-size: 12.5px;
    font-weight: 600;
}

/* ── Mobile nav ── */
.topbar-mobile-nav {
    padding: 8px 16px 16px;
    background: #fff;
    border-bottom: 1px solid #eaecf0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
    max-height: 70vh;
    overflow-y: auto;
}

.topbar-mobile-section {
    grid-column: 1 / -1;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .8px;
    font-weight: 700;
    color: #98a2b3;
    padding: 10px 0 2px;
    margin-top: 4px;
}

.topbar-mobile-section:first-child {
    margin-top: 0;
}

.topbar-mobile-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    font-size: 13px;
    font-weight: 500;
    color: #475467;
    text-decoration: none;
    border-radius: 8px;
    transition: background .1s;
}

.topbar-mobile-link:hover {
    background: #f4f6f8;
    color: #1d2939;
}

.topbar-mobile-link.active {
    color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), .06);
    font-weight: 600;
}

.topbar-mobile-link i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* Company color strip removed — entire bar is the accent color */

/* ── Responsive ── */
@media (max-width: 991px) {
    .topbar-brand-name { max-width: 120px; }
}

@media (max-width: 576px) {
    .topbar-inner { padding: 0 10px; }
    .topbar-brand { padding: 5px 8px; font-size: 12px; }
    .topbar-brand-name { max-width: 90px; }
}

/* ── Content offset — no sidebar, sticky topbar ── */
.pc-container {
    padding-top: 0 !important;
    top: 0 !important;
    margin-left: 0 !important;
    min-height: calc(100vh - 52px) !important;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .topbar-brand-menu,
    .topbar-dropdown {
        animation: none !important;
    }
}

/* ═══════════════════════════════════════
   28. STRIPE TABLE TOOLKIT
   ═══════════════════════════════════════ */

/* Toolbar */
.st-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    flex-wrap: wrap;
}

.st-toolbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.st-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Search */
.st-search-wrap {
    position: relative;
}

.st-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #98a2b3;
    pointer-events: none;
}

.st-search {
    font-size: 12.5px;
    padding: 6px 10px 6px 30px;
    border: 1px solid #eaecf0;
    border-radius: 8px;
    background: #fff;
    color: var(--s-text);
    width: 200px;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
}

.st-search:focus {
    border-color: rgba(var(--bs-primary-rgb, 67,97,238), .4);
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb, 67,97,238), .08);
}

/* Per-page select */
.st-select {
    font-size: 12.5px;
    padding: 6px 28px 6px 10px;
    border: 1px solid #eaecf0;
    border-radius: 8px;
    background: #fff;
    color: var(--s-text);
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2398a2b3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    transition: border-color .15s;
}

.st-select:focus {
    border-color: rgba(var(--bs-primary-rgb), .4);
}

/* Info text */
.st-info {
    font-size: 12px;
    color: #98a2b3;
    white-space: nowrap;
}

/* Export buttons */
.st-btn-group {
    display: flex;
    gap: 4px;
}

.st-btn {
    font-size: 12px;
    font-weight: 500;
    padding: 5px 10px;
    border: 1px solid #eaecf0;
    border-radius: 7px;
    background: #fff;
    color: #475467;
    cursor: pointer;
    transition: all .15s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.st-btn:hover {
    border-color: #d0d5dd;
    background: #f9fafb;
    color: #1d2939;
}

.st-btn i {
    font-size: 14px;
}

/* Sort arrows */
.st-sortable {
    position: relative;
}

.st-sort-arrow {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 4px;
    vertical-align: middle;
    opacity: .3;
    border-left: 3.5px solid transparent;
    border-right: 3.5px solid transparent;
    border-bottom: 4px solid currentColor;
    transition: opacity .15s, transform .15s;
}

.st-sort-asc .st-sort-arrow {
    opacity: .8;
    border-bottom: 4px solid var(--bs-primary, #4361ee);
    transform: rotate(0deg);
}

.st-sort-desc .st-sort-arrow {
    opacity: .8;
    border-bottom: 4px solid var(--bs-primary, #4361ee);
    transform: rotate(180deg);
}

.st-sortable:hover .st-sort-arrow {
    opacity: .6;
}

/* Pagination */
.st-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 12px 0 4px;
}

.st-page-btn {
    min-width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eaecf0;
    border-radius: 8px;
    background: #fff;
    color: #475467;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all .12s;
    padding: 0 4px;
}

.st-page-btn:hover:not(.active):not(.disabled) {
    border-color: rgba(var(--bs-primary-rgb), .3);
    color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), .04);
}

.st-page-btn.active {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #fff;
    font-weight: 600;
}

.st-page-btn.disabled {
    opacity: .35;
    cursor: default;
}

.st-page-dots {
    width: 28px;
    text-align: center;
    color: #98a2b3;
    font-size: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .st-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .st-toolbar-left,
    .st-toolbar-right {
        justify-content: space-between;
    }
    .st-search {
        width: 100%;
    }
    .st-pagination {
        flex-wrap: wrap;
    }
}


/* ═══════════════════════════════════════
   20. PRINT STYLES (preserve)
   ═══════════════════════════════════════ */

@media print {
    .topbar { display: none !important; }
    .card {
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }
    .badge {
        border: 1px solid #999 !important;
    }
}


/* ═══════════════════════════════════════
   21. ANIMATIONS
   ═══════════════════════════════════════ */

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

.card {
    animation: fadeIn .25s cubic-bezier(.22,1,.36,1) both;
}

@media (prefers-reduced-motion: reduce) {
    .card { animation: none; }
}


/* ═══════════════════════════════════════
   22. RESPONSIVE REFINEMENTS
   ═══════════════════════════════════════ */

@media (max-width: 768px) {
    .card-header {
        padding: 12px 14px;
    }
    .card-body {
        padding: 14px;
    }
    .table > :not(caption) > * > * {
        padding: 6px 10px;
    }
    .btn {
        font-size: 12px;
    }
}


/* ═══════════════════════════════════════
   23. REPORT FILTER BAR
   ═══════════════════════════════════════ */

.report-filter {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 20px;
    background: #fafbfc;
    border-bottom: 1px solid var(--s-border);
    border-radius: 12px 12px 0 0;
}

.report-filter .filter-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.report-filter .filter-group label {
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--s-text-muted);
}

.report-filter .filter-group input,
.report-filter .filter-group select {
    font-size: 12.5px;
    padding: 6px 10px;
    border: 1px solid var(--s-border);
    border-radius: 6px;
    background: #fff;
    color: var(--s-text);
    min-width: 140px;
    transition: border-color .15s;
}

.report-filter .filter-group input:focus,
.report-filter .filter-group select:focus {
    border-color: rgba(var(--s-accent-rgb), .5);
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--s-accent-rgb), .08);
}

.report-filter .filter-btn {
    padding: 7px 16px;
    font-size: 12.5px;
    font-weight: 500;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

@media (max-width: 768px) {
    .report-filter {
        flex-direction: column;
        align-items: stretch;
    }
    .report-filter .filter-group {
        width: 100%;
    }
    .report-filter .filter-group input,
    .report-filter .filter-group select {
        width: 100%;
    }
}

/* ═══════════════════════════════════════
   26. FORM SECTION DIVIDERS
   ═══════════════════════════════════════ */

.form-section {
    margin-top: 20px;
    margin-bottom: 12px;
    padding-bottom: 0;
}

.form-section:first-child {
    margin-top: 0;
}

.form-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--s-text-muted, #8792a2);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--s-border-light, #f0f2f5);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-section-title i {
    font-size: 14px;
}

/* ═══════════════════════════════════════
   27. SHOW/DETAIL PAGE ENHANCEMENTS
   ═══════════════════════════════════════ */

/* Metadata panels on show pages */
.detail-meta {
    background: #fafbfc;
    border-radius: 10px;
    padding: 16px 18px;
    border: 1px solid var(--s-border-light);
}

.detail-meta dt {
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--s-text-muted);
    margin-bottom: 2px;
}

.detail-meta dd {
    font-size: 13px;
    font-weight: 500;
    color: var(--s-text);
    margin-bottom: 12px;
}

.detail-meta dd:last-of-type {
    margin-bottom: 0;
}

/* Status badge in show headers */
.detail-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 8px;
}

/* Key-value grid for show pages */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.detail-grid-item label {
    display: block;
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--s-text-muted);
    margin-bottom: 2px;
}

.detail-grid-item span,
.detail-grid-item p {
    font-size: 14px;
    font-weight: 500;
    color: var(--s-text);
    margin: 0;
}

/* Summary sidebar for invoice-like show pages */
.detail-summary {
    background: #fafbfc;
    border: 1px solid var(--s-border);
    border-radius: 10px;
    padding: 16px;
}

.detail-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 13px;
    color: var(--s-text-secondary);
}

.detail-summary-row.total {
    border-top: 2px solid var(--s-border);
    margin-top: 8px;
    padding-top: 10px;
    font-size: 16px;
    font-weight: 700;
    color: var(--s-text);
}


/* ═══════════════════════════════════════
   24. COMPACT TOPBAR
   ═══════════════════════════════════════ */

.pc-header {
    height: 52px;
    min-height: 52px;
}

.pc-header .header-wrapper {
    height: 52px;
    padding: 0 16px;
}

.pc-header .pc-head-link {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 18px;
}

.pc-header .user-avtar {
    width: 32px;
    height: 32px;
}

/* Adjust content offset for slimmer header */
.pc-container {
    padding-top: 52px;
}


/* ═══════════════════════════════════════
   25. MOBILE TABLE CARDS
   ═══════════════════════════════════════ */

@media (max-width: 768px) {
    /* Stack table rows as cards on mobile */
    .table-mobile-cards thead {
        display: none;
    }

    .table-mobile-cards tbody tr {
        display: block;
        padding: 12px 14px;
        margin-bottom: 8px;
        background: #fff;
        border: 1px solid var(--s-border);
        border-radius: 10px;
    }

    .table-mobile-cards tbody tr:hover {
        background: #f8f9fb;
    }

    .table-mobile-cards tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 4px 0 !important;
        border: none !important;
        font-size: 12.5px;
    }

    .table-mobile-cards tbody td::before {
        content: attr(data-label);
        font-size: 11px;
        font-weight: 600;
        color: var(--s-text-muted);
        text-transform: uppercase;
        letter-spacing: .3px;
        flex-shrink: 0;
        margin-right: 12px;
    }

    .table-mobile-cards tbody td:first-child {
        padding-top: 0 !important;
    }

    .table-mobile-cards tbody td:last-child {
        padding-bottom: 0 !important;
        border-bottom: none !important;
    }

    /* Hide columns that are less useful on mobile */
    .table-mobile-cards tbody td.d-mobile-none {
        display: none !important;
    }

    .table-mobile-cards tfoot {
        display: block;
    }

    .table-mobile-cards tfoot tr {
        display: flex;
        justify-content: space-between;
        padding: 10px 14px;
        background: #fafbfc;
        border-radius: 10px;
        border: 1px solid var(--s-border);
    }

    .table-mobile-cards tfoot td,
    .table-mobile-cards tfoot th {
        border: none !important;
        padding: 0 !important;
        font-size: 12.5px;
    }
}
