/* auth.css — login / signup landing (and related auth pages) */

*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --auth-bg: #0d0d0f;
    --auth-bg-elevated: #16161a;
    --auth-bg-input: #1c1c22;
    --auth-border: #2e2e36;
    --auth-border-focus: #5b8def;
    --auth-text: #f2f2f5;
    --auth-text-muted: #9a9aa6;
    --auth-accent: #4caf50;
    --auth-accent-hover: #5fcf63;
    --auth-link: #8ab4ff;
    --auth-radius: 12px;
    --auth-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    --auth-font: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif;
}

html {
    -webkit-text-size-adjust: 100%;
}

body.auth-page {
    margin: 0;
    min-height: 100vh;
    font-family: var(--auth-font);
    font-size: 16px;
    line-height: 1.5;
    color: var(--auth-text);
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(76, 175, 80, 0.12), transparent 55%),
        var(--auth-bg);
}

.auth-shell {
    width: 100%;
    max-width: 56rem; /* ~896px */
    margin: 0 auto;
    padding: 1.5rem 1rem 2.5rem;
}

@media (min-width: 768px) {
    .auth-shell {
        padding: 3rem 1.5rem 4rem;
        max-width: 64rem; /* larger on desktop */
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-header h1 {
    margin: 0 0 0.35rem;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 650;
    letter-spacing: -0.02em;
}

.auth-header p {
    margin: 0;
    color: var(--auth-text-muted);
    font-size: clamp(0.95rem, 2.2vw, 1.05rem);
}

/* Side-by-side on tablet+; stack on phone */
.auth-panels {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: 1fr;
}

@media (min-width: 720px) {
    .auth-panels {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        align-items: start;
    }
}

.auth-card {
    background: var(--auth-bg-elevated);
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius);
    box-shadow: var(--auth-shadow);
    padding: 1.35rem 1.25rem 1.5rem;
}

@media (min-width: 768px) {
    .auth-card {
        padding: 1.75rem 1.75rem 2rem;
    }
}

.auth-card h2 {
    margin: 0 0 1.1rem;
    font-size: clamp(1.15rem, 2.5vw, 1.35rem);
    font-weight: 600;
}

.auth-card form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.auth-field label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--auth-text-muted);
}

.auth-field input {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0.7rem 0.85rem;
    font: inherit;
    font-size: 1rem; /* ≥16px avoids iOS focus zoom */
    color: var(--auth-text);
    background: var(--auth-bg-input);
    border: 1px solid var(--auth-border);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

@media (min-width: 768px) {
    .auth-field input {
        padding: 0.85rem 1rem;
        font-size: 1.05rem;
    }
}

.auth-field input:focus {
    border-color: var(--auth-border-focus);
    box-shadow: 0 0 0 3px rgba(91, 141, 239, 0.25);
}

.auth-field input::placeholder {
    color: #6a6a76;
}

.auth-captcha {
    display: flex;
    justify-content: center;
    overflow-x: auto;
    max-width: 100%;
    min-height: 78px;
}

.auth-actions {
    margin-top: 0.25rem;
}

.auth-actions button,
.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0;
    padding: 0.8rem 1rem;
    font: inherit;
    font-size: 1.05rem;
    font-weight: 600;
    color: #0b1a0c;
    background: var(--auth-accent);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.05s ease;
}

@media (min-width: 768px) {
    .auth-actions button {
        padding: 0.9rem 1.1rem;
        font-size: 1.1rem;
    }
}

.auth-actions button:hover,
.auth-btn:hover {
    background: var(--auth-accent-hover);
}

.auth-actions button:active {
    transform: translateY(1px);
}

.auth-hint {
    margin: 0;
    font-size: 0.85rem;
    color: var(--auth-text-muted);
}

.auth-footer {
    margin-top: 1.75rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--auth-text-muted);
}

.auth-footer a {
    color: var(--auth-link);
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Utility for message pages that link this stylesheet later */
.auth-message {
    max-width: 28rem;
    margin: 0 auto;
    text-align: center;
}

/* ==========================================================================
   Dashboard (same design tokens as auth landing)
   ========================================================================== */

body.dash-page {
    margin: 0;
    min-height: 100vh;
    font-family: var(--auth-font);
    font-size: 16px;
    line-height: 1.5;
    color: var(--auth-text);
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(76, 175, 80, 0.1), transparent 55%),
        var(--auth-bg);
}

.dash-shell {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 1rem 0.85rem 2.5rem;
}

@media (min-width: 768px) {
    .dash-shell {
        max-width: 72rem;
        padding: 1.75rem 1.5rem 3rem;
    }
}

@media (min-width: 1200px) {
    .dash-shell {
        max-width: 90rem; /* room for Handsontable on large desktops */
        padding: 2rem 1.75rem 3.5rem;
    }
}

.dash-topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
    margin-bottom: 1.25rem;
}

.dash-topbar h1 {
    margin: 0;
    font-size: clamp(1.35rem, 3.5vw, 1.85rem);
    font-weight: 650;
    letter-spacing: -0.02em;
}

.dash-topbar .dash-sub {
    margin: 0.25rem 0 0;
    color: var(--auth-text-muted);
    font-size: 0.95rem;
}

.dash-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.dash-nav a {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.85rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--auth-link);
    text-decoration: none;
    border: 1px solid var(--auth-border);
    border-radius: 8px;
    background: var(--auth-bg-elevated);
    transition: background 0.15s ease, border-color 0.15s ease;
}

.dash-nav a:hover {
    border-color: var(--auth-border-focus);
    background: var(--auth-bg-input);
}

.dash-nav a.dash-nav-danger {
    color: #ff8a8a;
    border-color: #5a2a2a;
}

.dash-nav a.dash-nav-danger:hover {
    border-color: #a00;
    background: #2a1212;
}

.dash-alerts {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
}

.dash-alert {
    margin: 0;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--auth-border);
    background: var(--auth-bg-elevated);
    font-size: 0.95rem;
}

.dash-alert-warn {
    border-color: #6a4a00;
    background: #2a2208;
    color: #f0d78c;
}

.dash-alert-error {
    border-color: #6a2020;
    background: #2a1212;
    color: #ffb0b0;
}

.dash-alert code {
    font-size: 0.85em;
    word-break: break-all;
}

.dash-grid {
    display: grid;
    gap: 1.15rem;
    grid-template-columns: 1fr;
}

@media (min-width: 900px) {
    .dash-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.35rem;
    }

    .dash-card-wide {
        grid-column: 1 / -1;
    }
}

.dash-card {
    background: var(--auth-bg-elevated);
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius);
    box-shadow: var(--auth-shadow);
    padding: 1.25rem 1.15rem 1.35rem;
}

@media (min-width: 768px) {
    .dash-card {
        padding: 1.5rem 1.5rem 1.65rem;
    }
}

.dash-card h2 {
    margin: 0 0 0.85rem;
    font-size: clamp(1.05rem, 2.2vw, 1.2rem);
    font-weight: 600;
}

.dash-card p {
    margin: 0 0 0.65rem;
    color: var(--auth-text-muted);
    font-size: 0.95rem;
}

.dash-card p:last-child {
    margin-bottom: 0;
}

.dash-card strong {
    color: var(--auth-text);
}

.dash-meta {
    display: grid;
    gap: 0.65rem 1rem;
    margin: 0;
}

.dash-meta div {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.dash-meta dt {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--auth-text-muted);
}

.dash-meta dd {
    margin: 0;
    font-size: 0.95rem;
    word-break: break-all;
}

.dash-meta code,
.dash-token {
    display: block;
    padding: 0.45rem 0.6rem;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--auth-text);
    background: var(--auth-bg-input);
    border: 1px solid var(--auth-border);
    border-radius: 6px;
    overflow-x: auto;
}

.dash-token-row {
    display: flex;
    align-items: stretch;
    gap: 0.4rem;
    min-width: 0;
}

.dash-token-row .dash-token {
    flex: 1 1 auto;
    min-width: 0;
}

.dash-copy-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    min-height: 2.35rem;
    margin: 0;
    padding: 0;
    color: var(--auth-text-muted);
    background: var(--auth-bg-input);
    border: 1px solid var(--auth-border);
    border-radius: 6px;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.dash-copy-btn:hover {
    color: var(--auth-text);
    border-color: var(--auth-border-focus);
    background: #25252e;
}

.dash-copy-btn:focus-visible {
    outline: none;
    border-color: var(--auth-border-focus);
    box-shadow: 0 0 0 3px rgba(91, 141, 239, 0.25);
}

.dash-copy-btn.is-copied {
    color: var(--auth-accent);
    border-color: rgba(76, 175, 80, 0.55);
}

.dash-copy-icon {
    display: block;
}

.dash-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 0.85rem;
}

.dash-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1rem;
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    color: #0b1a0c;
    background: var(--auth-accent);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.dash-btn:hover {
    background: var(--auth-accent-hover);
}

.dash-btn-secondary {
    color: var(--auth-text);
    background: var(--auth-bg-input);
    border: 1px solid var(--auth-border);
}

.dash-btn-secondary:hover {
    border-color: var(--auth-border-focus);
    background: #25252e;
}

.dash-btn-danger {
    color: #fff;
    background: #a33;
}

.dash-btn-danger:hover {
    background: #c44;
}

.dash-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.dash-card-danger {
    border-color: #5a2a2a;
    background: linear-gradient(180deg, #1c1214 0%, var(--auth-bg-elevated) 40%);
}

.dash-card-danger h2 {
    color: #ff8a8a;
}

/* Plugin / UXP setup placeholder card */
.dash-card-setup {
    border-color: #2a3a4a;
    background: linear-gradient(165deg, #121820 0%, var(--auth-bg-elevated) 45%);
}

.dash-card-setup-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    margin-bottom: 0.85rem;
}

.dash-card-setup-header h2 {
    margin: 0;
}

.dash-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 650;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #9ec5ff;
    background: rgba(90, 140, 220, 0.15);
    border: 1px solid rgba(90, 140, 220, 0.35);
    border-radius: 999px;
}

.dash-setup-steps {
    margin: 0.75rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.65rem;
}

@media (min-width: 900px) {
    .dash-setup-steps {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem 1.25rem;
    }
}

.dash-setup-steps li {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    margin: 0;
    padding: 0.65rem 0.75rem;
    background: var(--auth-bg-input);
    border: 1px solid var(--auth-border);
    border-radius: 8px;
}

.dash-setup-step-num {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #0b1a0c;
    background: var(--auth-accent);
    border-radius: 6px;
}

.dash-setup-steps li div {
    min-width: 0;
}

.dash-setup-steps strong {
    display: block;
    margin-bottom: 0.2rem;
    color: var(--auth-text);
    font-size: 0.95rem;
}

.dash-setup-steps p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--auth-text-muted);
}

.dash-setup-note {
    margin: 1rem 0 0;
    padding: 0.65rem 0.75rem;
    font-size: 0.88rem;
    color: var(--auth-text-muted);
    border-left: 3px solid rgba(90, 140, 220, 0.5);
    background: rgba(90, 140, 220, 0.06);
    border-radius: 0 8px 8px 0;
}

.dash-setup-note code {
    font-size: 0.85em;
}

.dash-setup-actions {
    margin-top: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
}

.dash-btn[disabled],
.dash-btn.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

/* Onboard: folder + CSV */
.dash-card-onboard {
    border-color: #2a4030;
    background: linear-gradient(165deg, #101812 0%, var(--auth-bg-elevated) 42%);
}

.dash-onboard-grid {
    display: grid;
    gap: 1rem;
    margin-top: 0.85rem;
}

@media (min-width: 900px) {
    .dash-onboard-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.25rem;
    }
}

.dash-onboard-panel {
    padding: 0.9rem 1rem;
    background: var(--auth-bg-input);
    border: 1px solid var(--auth-border);
    border-radius: 10px;
}

.dash-onboard-panel h3 {
    margin: 0 0 0.65rem;
    font-size: 1rem;
    font-weight: 600;
}

.dash-field-label {
    display: block;
    margin: 0.35rem 0 0.3rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--auth-text-muted);
}

.dash-text-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.6rem 0.75rem;
    font: inherit;
    font-size: 0.95rem;
    color: var(--auth-text);
    background: var(--auth-bg-elevated);
    border: 1px solid var(--auth-border);
    border-radius: 8px;
    outline: none;
}

.dash-text-input:focus {
    border-color: var(--auth-border-focus);
    box-shadow: 0 0 0 3px rgba(91, 141, 239, 0.22);
}

/* Path prefix: emphasize browser path limitation */
.dash-path-prefix-box {
    margin: 0 0 0.85rem;
    padding: 0.75rem 0.85rem 0.85rem;
    border: 1px solid rgba(230, 170, 60, 0.55);
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(230, 170, 60, 0.12) 0%, rgba(18, 18, 22, 0.6) 55%);
    box-shadow: inset 0 0 0 1px rgba(230, 170, 60, 0.12);
}

.dash-path-prefix-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.65rem;
    margin-bottom: 0.4rem;
}

.dash-path-prefix-title .dash-field-label {
    margin: 0;
    color: #f0d48a;
    font-weight: 600;
}

.dash-path-prefix-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0.45rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #1a1200;
    background: #e6aa3c;
    border-radius: 999px;
}

.dash-text-input-emphasis {
    border-color: rgba(230, 170, 60, 0.65);
    background: #1a1610;
}

.dash-text-input-emphasis:focus {
    border-color: #f0c14a;
    box-shadow: 0 0 0 3px rgba(230, 170, 60, 0.28);
}

.dash-path-prefix-note {
    margin: 0.65rem 0 0;
    padding: 0.55rem 0.65rem;
    font-size: 0.86rem;
    line-height: 1.45;
    color: #e8d5a8;
    background: rgba(0, 0, 0, 0.28);
    border-left: 3px solid #e6aa3c;
    border-radius: 0 6px 6px 0;
}

.dash-path-prefix-note strong {
    color: #ffd978;
}

.dash-path-prefix-note code {
    color: #ffe9b0;
    font-size: 0.88em;
}

.dash-import-preview {
    margin-top: 0.75rem;
    max-height: 9rem;
    overflow: auto;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--auth-text-muted);
    border: 1px solid var(--auth-border);
    border-radius: 8px;
    padding: 0.5rem 0.65rem;
    background: #0c0c10;
}

.dash-import-preview.is-empty {
    display: none;
}

.dash-onboard-notes {
    margin: 0.85rem 0 0;
    padding-left: 1.15rem;
    font-size: 0.85rem;
    color: var(--auth-text-muted);
}

.dash-onboard-notes li {
    margin: 0.25rem 0;
}

.dash-table-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem 1rem;
    margin-bottom: 0.5rem;
}

.dash-table-toolbar h2 {
    margin: 0;
}

.dash-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin: 0;
    padding: 0.5rem 0.85rem;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--auth-text);
    background: var(--auth-bg-input);
    border: 1px solid var(--auth-border);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.dash-icon-btn:hover {
    border-color: var(--auth-accent);
    color: var(--auth-accent-hover);
    background: #1a241c;
}

.dash-icon-btn:focus-visible {
    outline: none;
    border-color: var(--auth-border-focus);
    box-shadow: 0 0 0 3px rgba(91, 141, 239, 0.25);
}

.dash-icon-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.dash-icon-btn svg {
    display: block;
    flex-shrink: 0;
}

.dash-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.dash-icon-btn-danger {
    color: #ff9a9a;
    border-color: #5a2a2a;
    background: #1c1214;
}

.dash-icon-btn-danger:hover:not(:disabled) {
    color: #fff;
    border-color: #c44;
    background: #3a1515;
}

.dash-icon-btn-danger:focus-visible {
    border-color: #e66;
    box-shadow: 0 0 0 3px rgba(200, 60, 60, 0.3);
}

/* Fully removed from layout (use sparingly) */
.dash-icon-btn.is-hidden {
    display: none;
}

/* Keep footprint; hide interaction (e.g. Delete after Top/End jump) */
.dash-icon-btn.is-invisible {
    visibility: hidden;
    pointer-events: none;
}

/* Fixed footprint: never wrap / grow the toolbar (avoids reflow). */
.dash-selection-hint {
    box-sizing: border-box;
    flex: 0 0 15.5rem;
    width: 15.5rem;
    min-width: 15.5rem;
    max-width: 15.5rem;
    margin: 0;
    padding: 0.35rem 0.5rem;
    font-size: 0.8rem;
    line-height: 1.25;
    color: var(--auth-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
}

.dash-selection-hint.is-empty {
    /* Keep layout slot; hide content only */
    visibility: hidden;
    pointer-events: none;
}

.dash-selection-hint:not(.is-empty) {
    border-color: var(--auth-border);
    background: var(--auth-bg-input);
}

.dash-selection-hint .dash-sel-id {
    color: #a8b0c0;
    font-variant-numeric: tabular-nums;
}

.dash-selection-hint .dash-sel-path {
    color: var(--auth-text-muted);
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.78rem;
}

@media (min-width: 900px) {
    .dash-selection-hint {
        flex-basis: 18rem;
        width: 18rem;
        min-width: 18rem;
        max-width: 18rem;
    }
}

@media (max-width: 600px) {
    .dash-selection-hint {
        flex-basis: 11.5rem;
        width: 11.5rem;
        min-width: 11.5rem;
        max-width: 11.5rem;
        font-size: 0.75rem;
    }
}

.dash-save-status {
    margin: 0 0 0.65rem;
    min-height: 1.35em;
    font-size: 0.95rem;
    color: var(--auth-text-muted);
}

.dash-save-status-pending {
    color: #c8c8d0;
}

.dash-save-status-ok {
    color: #6dca72;
}

.dash-save-status-ok .dash-save-field {
    color: #8fd992;
    font-weight: 600;
}

.dash-save-status-ok .dash-save-id {
    color: #a8e0ab;
    font-weight: 600;
}

.dash-save-status-error {
    color: #ff8a8a;
}

.dash-table-wrap {
    margin-top: 0.5rem;
    width: 100%;
    /* Outer wrap: allow page-level horizontal scroll if HOT overflows the card */
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--auth-border);
    border-radius: 8px;
    background: #111114;
    /* Prefer classic/thin scrollbars when content is wider than the wrap */
    scrollbar-width: thin;
    scrollbar-color: #6a6a76 #1a1a1e;
}

.dash-table-wrap::-webkit-scrollbar {
    height: 12px;
    width: 12px;
}

.dash-table-wrap::-webkit-scrollbar-thumb {
    background: #6a6a76;
    border-radius: 6px;
}

.dash-table-wrap::-webkit-scrollbar-track {
    background: #1a1a1e;
}

#hot {
    min-height: 12rem;
    width: 100%;
}

/* Master fills the card; hider/spreader width is driven by colgroup (JS) */
.dash-table-wrap .ht_master.handsontable {
    width: 100% !important;
}

/*
 * Handsontable scrolls inside .wtHolder. Keep overflow auto (not hidden) so
 * horizontal scrollbars appear when colgroup is wider than the viewport
 * (narrow windows, long auto-fit paths, etc.).
 */
.dash-table-wrap .ht_master .wtHolder {
    width: 100% !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    scrollbar-width: thin;
    scrollbar-color: #6a6a76 #1a1a1e;
}

.dash-table-wrap .ht_master .wtHolder::-webkit-scrollbar {
    height: 12px;
    width: 12px;
}

.dash-table-wrap .ht_master .wtHolder::-webkit-scrollbar-thumb {
    background: #6a6a76;
    border-radius: 6px;
}

.dash-table-wrap .ht_master .wtHolder::-webkit-scrollbar-track {
    background: #1a1a1e;
}

.dash-table-wrap .ht_master .wtHider,
.dash-table-wrap .ht_master .wtSpreader {
    box-sizing: border-box;
}

/* Handsontable sits better on dark chrome */
.dash-table-wrap .handsontable {
    font-size: 13px;
}

/* Clip long path/meta instead of wrapping (widths are intentional) */
.dash-table-wrap .handsontable td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 768px) {
    .dash-table-wrap .handsontable {
        font-size: 14px;
    }
}

/* Category autocomplete / dropdown list (Handsontable editor) */
.handsontableEditor.autocompleteEditor .ht_master,
.handsontable.listbox {
    background: #1c1c22;
    color: #f2f2f5;
    border-color: #2e2e36;
}

.handsontable.listbox .htCore tr td {
    background: #1c1c22;
    color: #f2f2f5;
    border-color: #2e2e36;
}

.handsontable.listbox .htCore tr td.current,
.handsontable.listbox .htCore tr:hover td {
    background: #2a3a4a !important;
    color: #fff !important;
}

.handsontableInput {
    background: #1c1c22 !important;
    color: #f2f2f5 !important;
    border-color: #5b8def !important;
}

/* Brief success flash for a whole row after save/create */
.handsontable td.dash-ht-flash {
    background: rgba(76, 175, 80, 0.42) !important;
    transition: background-color 0.35s ease;
}

.handsontable td.dash-ht-flash-fade {
    background: rgba(76, 175, 80, 0.12) !important;
    transition: background-color 0.55s ease;
}

.dash-footer-note {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--auth-text-muted);
}

.dash-footer-note a {
    color: var(--auth-link);
}
