/* ---- Theme tokens (light default) ---- */
:root {
    --bg: #f7f7fb;
    --surface: #ffffff;
    --surface-accent: #f1f3f8;
    --text: #111827;
    --muted: #4b5563;
    --border: #e5e7eb;
    --accent: #2563eb;
    --accent-contrast: #ffffff;
    --primary: #2563eb;
    --primary-contrast: #0b45c5;
    --success: #10b981;
    --success-contrast: #059669;
    --danger: #dc2626;
    --danger-contrast: #b61313;
    --radius: 12px;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
    --topbar-h: 60px;
    /* ---- UI consistency tokens (2026-08-05) ---- */
    --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --fs-base: 14px;
    --fs-sm: 12px;
    --fs-xs: 11px;
    --fs-lg: 16px;
    --fs-h2: 22px;
    --fs-h3: 16px;
    --fs-h4: 14px;
    --radius-input: 10px;
    --control-h: 38px;
    --card-pad: 18px;
    --gap: 16px;
    --gap-sm: 8px;
    --gap-xs: 4px;
}

:root[data-bs-theme="dark"] {
    --bg: #0c0d10;
    --surface: #15171c;
    --surface-accent: #1a1c22;
    --text: #e5e7eb;
    --muted: #9aa2b2;
    --border: #242731;
    --accent: #3b82f6;
    --accent-contrast: #0b1220;
    --primary: #3b82f6;
    --primary-contrast: #195bc7;
    --success: #10b981;
    --success-contrast: #059669;
    --danger: #f87171;
    --danger-contrast: #d23f3f;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    /* ---- UI consistency tokens (dark overrides) ---- */
    --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --fs-base: 14px;
    --fs-sm: 12px;
    --fs-xs: 11px;
    --fs-lg: 16px;
    --fs-h2: 22px;
    --fs-h3: 16px;
    --fs-h4: 14px;
    --radius-input: 10px;
    --control-h: 38px;
    --card-pad: 18px;
    --gap: 16px;
    --gap-sm: 8px;
    --gap-xs: 4px;
}

/* ---- Base ---- */
* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    line-height: 1.5;
    color: var(--text);
    background: radial-gradient(1200px 800px at 20% -10%, var(--surface-accent) 0%, transparent 60%),
    radial-gradient(1200px 800px at 110% 10%, var(--surface-accent) 0%, transparent 60%),
    var(--bg);
    font: var(--fs-base)/1.5 var(--font-sans);
}

/* ---- Topbar ---- */
.topbar {
    /* static (in flow): the layout sits right below it, so the document
       is exactly viewport-height and never scrolls to blank space */
    position: relative;
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.topbar .spacer {
    flex: 1;
}

#themeToggle,
#logoutForm {
    margin-left: 10px; /* small gap between them */
}

.topbar button, .topbar .link {
    appearance: none;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    border-radius: 10px;
    padding: 8px 10px;
    cursor: pointer;
}

.topbar .link {
    border: none;
}

.icon-slide {
    display: inline-block;
    transition: transform .2s ease;
}

.col-save {
    width: 56px;
}

/* optional tighten */

.unit-badge {
    background: var(--surface-accent);
    border: 1px solid var(--border);
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 600;
}

/* ---- Layout ---- */
.layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    /* topbar is in flow above: the grid starts right below it and runs
       to the real viewport bottom (no fixed-topbar overlap, no blank
       scroll, no margin-collapse side effects) */
    min-height: calc(100vh - var(--topbar-h));
    height: calc(100vh - var(--topbar-h));
    overflow: hidden; /* important */
    transition: grid-template-columns .28s ease;
}

.layout.menu-collapsed {
    grid-template-columns: 72px 1fr;
}

/* Sidebar with smooth slide */
.sidemenu {
    position: sticky; /* ← keeps it fixed in view */
    top: 0; /* layout already starts below the topbar */
    height: calc(100vh - var(--topbar-h));
    overflow: auto; /* side menu itself scrolls if needed */
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 18px;
    box-shadow: var(--shadow);
    width: 260px;
    transition: width .28s ease, padding .28s ease, transform .28s ease;
}

.sidemenu.slideable {
    will-change: width, transform;
}

.sidemenu.collapsed {
    width: 72px;
    padding: 18px 10px;
    overflow-x: hidden;
}

/* ---- Mobile: off-canvas sidebar — FULLY hidden when closed ---- */
.menu-backdrop {
    display: none;
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, .55);
    z-index: 899;
}

.menu-backdrop.show {
    display: block;
}

@media (max-width: 768px) {
    .layout,
    .layout.menu-collapsed {
        grid-template-columns: 1fr; /* main takes the full width */
    }

    .sidemenu {
        position: fixed;
        top: var(--topbar-h);
        left: 0;
        bottom: 0;
        width: 260px;
        transform: translateX(-100%); /* fully closed = off-screen */
        z-index: 900;
        overflow-y: auto;
        box-shadow: var(--shadow);
    }

    .sidemenu.collapsed {
        width: 260px; /* ignore the desktop 72px rail on mobile */
        padding: 18px;
        overflow-x: visible;
    }

    .sidemenu.mobile-open {
        transform: translateX(0);
    }

    .topbar {
        padding: 8px 10px;
    }

    .page-head {
        flex-wrap: wrap;
    }
}

.sidemenu h3 {
    margin: 0 0 12px;
    font-size: 15px;
    color: var(--muted);
    font-weight: 600;
}

.menu-section {
    margin: 10px 0 6px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
}

.sidemenu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidemenu li {
    margin: 6px 0;
}

.sidemenu ul li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    transition: background .15s ease;
}

.sidemenu.collapsed ul li a {
    justify-content: center;
}

.sidemenu a.active, .sidemenu a:hover {
    background: var(--surface-accent);
}

.sidemenu .icon {
    width: 22px;
    display: inline-flex;
    justify-content: center;
    font-size: 18px;
}

.sidemenu .label {
    white-space: nowrap;
    transition: opacity .2s ease, transform .2s ease;
}

.sidemenu.collapsed h3, .sidemenu.collapsed .menu-section, .sidemenu.collapsed .label {
    opacity: 0;
    transform: translateX(-6px);
    pointer-events: none;
}

/* Main */
main {
    padding: 24px;
    overflow: auto; /* page scroll happens here */
}

h2 {
    margin: 8px 0 16px;
    font-size: 22px;
}

h3 {
    margin: 0 0 10px;
    font-size: 18px;
}

h4 {
    margin: 14px 0 8px;
    font-size: 15px;
    color: var(--muted);
}

.pill {
    background: var(--surface-accent);
    border: 1px solid var(--border);
    padding: 2px 8px;
    border-radius: 999px;
}

/* Cards & containers */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--card-pad);
    box-shadow: var(--shadow);
}

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Form labels — unified 13px */
.form label, th label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
}

h1 { font-size: 24px; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }
h1, h2, h3, h4 {
    margin: 0 0 8px;
    line-height: 1.3;
    color: var(--text);
}

input, select, textarea, button {
    font: inherit;
}

[data-bs-theme="dark"] input[type="text"],
[data-bs-theme="dark"] input[type="password"],
[data-bs-theme="dark"] input[type="date"],
[data-bs-theme="dark"] input[type="number"],
[data-bs-theme="dark"] select,
[data-bs-theme="dark"] textarea {
    background-color: var(--surface-accent)
}

[data-bs-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

input[type="text"], input[type="password"], input[type="date"], input[type="number"], select, textarea {
    background: var(--surface-accent);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-input);
    padding: 0 12px;
    height: var(--control-h);
    font-size: var(--fs-base);
    font-family: var(--font-sans);
    min-width: 0;
    box-sizing: border-box;
}

textarea {
    height: auto;
    padding: 9px 12px;
    line-height: 1.45;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

input.invalid, select.invalid, textarea.invalid {
    border-color: var(--danger) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 30%, transparent);
}

.btn {
    background: var(--surface-accent);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 0 16px;
    height: var(--control-h);
    border-radius: var(--radius-input);
    cursor: pointer;
    font-size: var(--fs-base);
    font-family: var(--font-sans);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    box-sizing: border-box;
}

.btn:hover {
    background: var(--surface);
}

.btn.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn.btn-primary {
    background: var(--primary);
    color: var(--accent-contrast);
    border: none;
}

.btn.btn-primary:hover {
    background: var(--primary-contrast);
}

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

.btn.btn-success:hover {
    background: var(--success-contrast);
}

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

.btn.btn-danger:hover {
    background: var(--danger-contrast)
}

.delete-btn {
    background: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
}

/* Toolbar */
.toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 auto 16px;
    width: 100%;
}

.toolbar label {
    color: var(--muted);
}

.pager {
    margin-left: auto;
    display: flex;
    gap: 8px;
    align-items: center;
}

.pager button {
    border: 1px solid var(--border);
    background: var(--surface-accent);
    color: var(--text);
    padding: 8px 10px;
    border-radius: 8px;
}

.col-actions, .col-save, .col-save-pad {
    width: 64px;
    text-align: center;
}

/* Lists */
.list {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    display: grid;
    gap: 8px;
}

.list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-accent);
}

.list li .row {
    display: inline-flex;
    gap: 8px;
}

/* Settings layout tidy */
.card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.subtle {
    color: var(--muted);
    font-size: 13px;
    margin: 0;
}

.config-grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.field-1col textarea {
    width: 100%;
    min-height: 160px;
    resize: vertical;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    line-height: 1.35;
}

.unit-card {
    border: 1px dashed var(--border);
    border-radius: 10px;
    padding: 12px;
    background: var(--surface);
}

.unit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.unit-grid textarea {
    width: 100%;
    min-height: 120px;
    resize: vertical;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    line-height: 1.35;
}

.config-actions {
    display: flex;
    justify-content: flex-end;
}

.divider {
    height: 1px;
    background: var(--border);
    margin: 14px 0;
}

/* Collapsed label fade for smoother feel */
.sidemenu .label {
    opacity: 1;
}

.sidemenu.collapsed .label {
    display: none;
}

/* ===== Modal ===== */
.modal.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    opacity: 0;
    transition: opacity .16s ease;
}

.modal.open .modal-backdrop {
    opacity: 1;
}

.modal-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, calc(-50% + 8px));
    width: min(560px, 92vw);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    opacity: 0;
    transition: all .16s ease;
}

.modal.open .modal-card {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.modal-head .modal-title {
    margin: 0;
}

.modal-body {
    padding: 16px;
    color: var(--text);
}

.modal-actions {
    display: flex;
    align-items: center;
    gap: .25rem;
    justify-content: flex-end;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
}

.modal-x {
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 20px;
    cursor: pointer;
}

/* ===== Toasts ===== */
.toast-area {
    position: fixed;
    top: 14px;
    right: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1056;
    pointer-events: none;
}

.toast {
    min-width: 220px;
    max-width: 360px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow);
    transform: translateX(140%);
    opacity: 0;
    transition: transform .22s ease, opacity .22s ease;
    pointer-events: auto;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.success {
    border-color: color-mix(in srgb, #16a34a 30%, var(--border));
}

.toast.error {
    border-color: color-mix(in srgb, #dc2626 40%, var(--border));
}

/* Auth page layout */
body.auth {
    display: flex;
    flex-direction: column; /* topbar full-width on top, card below */
    justify-content: flex-start;
    align-items: stretch;
    min-height: 100vh;
    margin: 0;
    background: var(--bg);
}

.auth-card {
    background: var(--surface);
    padding: 2rem 2.5rem;
    border-radius: 12px;
    max-width: 400px;
    width: 100%;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    margin: auto; /* centers in the space below the topbar */
}

/* Title */
.auth-card h2 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--text);
}

/* Form spacing */
.form label {
    display: block;
    margin-bottom: 1rem;
    color: var(--muted);
    font-size: 13px;
}

.form input, .form select, .form textarea {
    width: 100%;
    margin-top: 0.3rem;
}

.form input {
    padding: 0 12px;
    height: var(--control-h);
    border-radius: var(--radius-input);
    border: 1px solid var(--border);
    background: var(--surface-accent);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    box-sizing: border-box;
}

/* Hint text */
.hint {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    text-align: center;
    color: var(--muted);
}

/* ---------- Users inline form: neat 3 columns ---------- */
.form-inline-3 {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px 14px;
    align-items: end;
    margin-bottom: 12px;
}

.form-inline-3 label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--muted);
}

.form-inline-3 input {
    min-width: 220px;
}

.form-inline-3 .actions-end {
    display: flex;
    justify-content: flex-end;
    align-items: end;
}

/* ---------- CSV form: aligned & clean ---------- */
.csv-form {
    display: grid;
    grid-template-columns: 1fr 2fr auto;
    gap: 14px;
    align-items: end; /* align button with bottom of inputs */
    margin: 12px 0 10px; /* more breathing room */
}

.csv-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--muted);
    font-size: 14px;
}

/* file field tidy */
.file-field {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-btn {
    flex-shrink: 0;
}

.file-name {
    flex: 1;
    font-size: 13px;
    color: var(--muted);
    padding: 8px 10px;
    border: 1px dashed var(--border);
    border-radius: 8px;
    background: var(--surface-accent);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* make Upload button same height as inputs */
.csv-form .primary {
    height: 42px;
    padding: 0 16px;
}

/* spacing below */
.hint {
    margin-top: 6px;
    font-size: 13px;
    color: var(--muted);
}

/* Responsive tweaks */
@media (max-width: 900px) {
    .form-inline-3 {
        grid-template-columns: 1fr;
    }

    .csv-form {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .file-field {
        flex-direction: column;
        align-items: stretch;
    }

    .file-name {
        max-width: 100%;
    }
}

/* ----- PIN Auth UI ----- */
.pin-display {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.pin-display span {
    width: 16px;
    height: 16px;
    border-bottom: 2px solid var(--border);
    font-size: 24px;
    text-align: center;
    line-height: 16px;
    color: var(--text);
}

.pin-display span.filled::after {
    content: "•";
    font-size: 28px;
    line-height: 16px;
}

.pin-keypad {
    display: grid;
    grid-template-columns: repeat(3, 60px);
    gap: 12px;
    justify-content: center;
    margin-top: 16px;
}

.pin-keypad button {
    height: 60px;
    border-radius: 12px;
    font-size: 20px;
    font-weight: 600;
    background: var(--surface-accent);
    border: 1px solid var(--border);
    cursor: pointer;
    color: var(--text);
}

.pin-keypad button.primary {
    grid-column: span 3;
    background: var(--accent);
    color: var(--accent-contrast);
}

/* --- Chart filters fix --- */
.form.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) auto;
    gap: 12px 16px;
    align-items: end;
}

.form.filters label {
    flex-direction: row !important; /* override the column rule */
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--muted);
}

.form.filters label select,
.form.filters label input {
    flex: 1;
}

.form.filters button {
    justify-self: end;
    padding: 10px 16px;
    height: 42px;
}

/* ---------- Settings page rebuild ---------- */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: 18px;
    align-items: start;
    width: 100%;
    max-width: none;
}

.settings-col {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.settings-card {
    padding: 18px;
}

.settings-card .card-head {
    margin-bottom: 14px;
}

.settings-card h3 {
    margin: 0;
    font-size: 15px;
}

/* fix: "Tambah" button aligned to bottom of its label+input column */
.form-inline-3 .actions-end {
    padding-top: 21px; /* label line height + gap, so button sits flush with inputs */
    align-self: end;
}

.form-inline-3 .actions-end button {
    white-space: nowrap;
}

/* config form: plates full width, unit cards stacked */
.config-form {
    display: grid;
    gap: 14px;
}

.config-form .field-1col label,
.unit-card label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
}

.unit-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    background: var(--surface);
}

.unit-card h4 {
    margin: 0 0 10px;
    font-size: 13px;
    color: var(--text);
}

.hint-left {
    margin: 10px 2px 0;
    font-size: 12.5px;
    color: var(--muted);
}

@media (max-width: 900px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

/* fix: settings form grid must fit the card column (no overflow) */
.form-inline-3 {
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
    align-items: end;
}

.form-inline-3 input {
    min-width: 0;
    width: 100%;
}

.form-inline-3 .actions-end {
    padding-top: 0;
    align-self: end;
}

/* ---- language switcher ---- */
.lang-switch {
    display: inline-flex;
    gap: 2px;
    padding: 2px;
    border-radius: 8px;
    background: var(--surface-accent, rgba(128,128,128,.15));
    margin-right: 10px;
}

.lang-btn {
    border: none;
    background: transparent;
    color: var(--text, #111827);
    font-size: 12.5px;
    padding: 3px 10px;
    border-radius: 6px;
    cursor: pointer;
}

.lang-btn.active {
    background: var(--accent, #2563eb);
    color: #fff;
    font-weight: 600;
}

.auth-lang {
    text-align: center;
    margin-bottom: 14px;
    font-size: 13px;
}

.auth-lang a {
    color: var(--muted, #6b7280);
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 6px;
}

.auth-lang a.active {
    color: var(--accent, #2563eb);
    font-weight: 700;
}

.auth-lang span {
    color: var(--muted, #6b7280);
}


/* ================= Bootstrap normalization (entry page) =================
   index.html loads Bootstrap 5.3 CDN BEFORE style.css — these overrides
   pull Bootstrap components onto the same tokens as the custom pages. */
.btn {
    --bs-btn-padding-y: 0;
    --bs-btn-padding-x: 16px;
    --bs-btn-font-size: var(--fs-base);
    --bs-btn-border-radius: var(--radius-input);
    --bs-btn-border-width: 1px;
    min-height: var(--control-h);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.form-control,
.form-select {
    min-height: var(--control-h);
    border-radius: var(--radius-input);
    font-size: var(--fs-base);
    background-color: var(--surface-accent);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 0 12px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

.card {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.modal-content {
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
}

.table {
    font-size: 13px;
    --bs-table-color: var(--text);
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--border);
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    min-height: 32px;
    border-radius: var(--radius-input);
    border: 1px solid var(--border);
    background: var(--surface-accent);
    color: var(--text);
    font-size: var(--fs-sm);
    padding: 0 10px;
}

.api-key-result {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-accent);
}
.api-key-result code {
    display: block;
    margin-top: 8px;
    padding: 8px 10px;
    font-size: 13px;
    word-break: break-all;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    user-select: all;
}
