:root {
    --bg: #f4f6fb;
    --surface: #ffffff;
    --surface-subtle: #f8fafc;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    --text: #0f172a;
    --text-muted: #64748b;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-soft: #eef2ff;
    --success: #059669;
    --success-soft: #ecfdf5;
    --amber: #d97706;
    --amber-soft: #fffbeb;
    --danger: #dc2626;
    --danger-soft: #fef2f2;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 4px 10px -6px rgba(15, 23, 42, 0.05);
}

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

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
}

.hidden { display: none !important; }
.muted { color: var(--text-muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }

/* Auth Gate */
.auth-gate {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: radial-gradient(circle at top right, #e0e7ff 0%, var(--bg) 55%);
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 36px;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.auth-card h1 {
    margin: 16px 0 8px;
    font-size: 22px;
    font-weight: 700;
}

.auth-actions {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}

.config-help {
    margin-top: 20px;
    text-align: left;
    background: var(--surface-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
    font-size: 12.5px;
}

.config-help pre {
    margin: 8px 0 0;
    padding: 10px;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 12px;
}

/* Brand & Topbar */
.brand-logo {
    display: block;
    height: 60px;
    width: auto;
    margin: 0 auto;
    object-fit: contain;
}

.brand-logo.sm {
    height: 38px;
    margin: 0;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.brand-badge.sm {
    width: 34px;
    height: 34px;
    font-size: 12px;
    border-radius: 9px;
}

.app-shell:not(.hidden) {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    flex-shrink: 0;
    background: #000000;
    color: #f8fafc;
    border-bottom: 1px solid #262626;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.topbar-left, .topbar-right {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.brand-mark {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-title { font-weight: 700; font-size: 15px; line-height: 1.2; color: #ffffff; }
.brand-sub { font-size: 11.5px; color: #a1a1aa; }

.nav-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.nav-tab {
    border: 1px solid transparent;
    background: transparent;
    color: #d4d4d8;
    padding: 8px 13px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s ease;
}

.nav-tab:hover { background: rgba(255, 255, 255, 0.09); color: #ffffff; }
.nav-tab.active {
    background: rgba(251, 221, 0, 0.14);
    color: #fbdd00;
    border-color: rgba(251, 221, 0, 0.42);
}

.topbar .pill-neutral { background: #27272a; color: #e4e4e7; }
.topbar .nav-tab.active .pill-neutral { background: rgba(251, 221, 0, 0.22); color: #fef08a; }
.topbar .pill-amber { background: rgba(217, 119, 6, 0.22); color: #fcd34d; border-color: rgba(245, 158, 11, 0.45); }
.topbar .pill-green { background: rgba(5, 150, 105, 0.22); color: #6ee7b7; border-color: rgba(16, 185, 129, 0.45); }

.user-pill {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 4px 10px 4px 6px;
    border-radius: 999px;
    background: #141414;
    border: 1px solid #27272a;
}

.user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
}

.user-meta { display: flex; flex-direction: column; line-height: 1.15; }
.user-name { font-weight: 600; font-size: 12.5px; color: #f8fafc; }
.user-email { font-size: 11px; color: #a1a1aa; }

.topbar .btn {
    background: #18181b;
    border-color: #3f3f46;
    color: #f8fafc;
}
.topbar .btn:hover { background: #27272a; }
.topbar .btn-ghost {
    background: transparent;
    border-color: transparent;
    color: #d4d4d8;
}
.topbar .btn-ghost:hover { background: rgba(255, 255, 255, 0.1); color: #ffffff; }

/* Layout */
.main-content {
    flex: 1;
    min-height: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.tab-panel { display: none; }
.tab-panel.active {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

#tab-export.tab-panel.active {
    display: block;
    overflow-y: auto;
    padding: 18px 20px 32px;
}

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

.tab-panel.active > .card {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    box-shadow: none;
}

#tab-export .card {
    flex: initial;
    display: block;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.card-header {
    flex-shrink: 0;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.card-header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.header-pagination {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 13px;
}

.card-body { padding: 20px; }

.section-title { margin: 0; font-size: 17px; font-weight: 700; }
.section-sub { margin: 2px 0 0; font-size: 13px; color: var(--text-muted); }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    box-shadow: var(--shadow-sm);
}

.stat-label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.stat-value { font-size: 26px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat-hint { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* Toolbar & Inputs */
.toolbar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 18px;
    background: var(--surface-subtle);
    border-bottom: 1px solid var(--border);
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

input[type="text"], input[type="email"], input[type="search"], input[type="number"], select, textarea {
    font: inherit;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 7px 11px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.14);
}

.search-input { min-width: 260px; }

.checkbox-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 11px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}

/* Buttons & Pills */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
}

.btn:hover { background: var(--surface-subtle); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-sm { padding: 5px 10px; font-size: 12.5px; }

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.btn-primary:hover { background: var(--primary-hover); }

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

.btn-danger {
    background: var(--danger-soft);
    border-color: #fecaca;
    color: var(--danger);
}
.btn-danger:hover { background: #fee2e2; }

.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--surface-subtle); }

.btn-icon {
    border: none;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px 8px;
    border-radius: 6px;
}
.btn-icon:hover { background: var(--surface-subtle); color: var(--text); }

.pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}

.pill-neutral { background: #e2e8f0; color: #334155; }
.pill-amber { background: var(--amber-soft); color: var(--amber); border: 1px solid #fde68a; }
.pill-green { background: var(--success-soft); color: var(--success); border: 1px solid #a7f3d0; }
.pill-indigo { background: var(--primary-soft); color: var(--primary); border: 1px solid #c7d2fe; }
.pill-red { background: var(--danger-soft); color: var(--danger); border: 1px solid #fecaca; }

/* Tables */
.table-wrap {
    overflow: auto;
    max-height: 68vh;
}

.tab-panel.active > .card > .table-wrap {
    flex: 1;
    min-height: 0;
    max-height: none;
}

table.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}

.data-table th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #f8fafc;
    color: #334155;
    font-weight: 700;
    font-size: 12px;
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    user-select: none;
}

.data-table th.sortable { cursor: pointer; }
.data-table th.sortable:hover { background: #eef2ff; color: var(--primary); }

.data-table td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: var(--surface);
}

.data-table tbody tr:hover td { background: #f8fafc; }
.data-table tbody tr.row-staged td { background: #fffdf5; }
.data-table tbody tr.row-staged:hover td { background: #fef9e7; }

.sticky-col {
    position: sticky;
    left: 0;
    z-index: 2;
    border-right: 1px solid var(--border);
    box-shadow: 2px 0 6px rgba(15, 23, 42, 0.04);
}
.data-table th.sticky-col { z-index: 5; }

.sticky-sku {
    position: sticky;
    left: var(--sticky-sku-left, 128px);
    z-index: 1;
    border-right: 1px solid var(--border-strong);
    box-shadow: 2px 0 6px rgba(15, 23, 42, 0.06);
    font-weight: 600;
}
.data-table th.sticky-sku { z-index: 4; }

.sticky-col-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sticky-col-wrap input[type="checkbox"] {
    width: 15px;
    height: 15px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--primary);
}

.row-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    border-radius: 6px;
    border: 1px solid #c7d2fe;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
}
.row-open-btn:hover { background: var(--primary); color: #fff; }

.pagination-bar {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid var(--border);
    background: var(--surface-subtle);
    flex-wrap: wrap;
}

/* Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-dialog {
    width: 100%;
    max-width: 960px;
    max-height: 92vh;
    background: var(--surface);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-dialog.wide { max-width: 1240px; }

.modal-header {
    padding: 16px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-header h2 { margin: 0; font-size: 17px; font-weight: 700; }

.modal-body {
    padding: 20px 22px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--border);
    background: var(--surface-subtle);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

/* Modal Form Tabs & Grid */
.sub-tabs {
    display: flex;
    gap: 6px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.sub-tab {
    border: none;
    background: transparent;
    padding: 8px 12px;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    cursor: pointer;
}
.sub-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-field.span-2 { grid-column: span 2; }
.form-field.span-full { grid-column: 1 / -1; }
.form-field label { font-size: 12px; font-weight: 600; color: #334155; }
.form-field textarea { min-height: 90px; resize: vertical; }

.derived-box {
    background: var(--primary-soft);
    border: 1px solid #c7d2fe;
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 12.5px;
    color: #1e1b4b;
}

/* Alerts & Toasts */
.alert {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 14px;
}
.alert-error { background: var(--danger-soft); border: 1px solid #fecaca; color: var(--danger); }
.alert-info { background: var(--primary-soft); border: 1px solid #c7d2fe; color: #3730a3; }
.alert-warn { background: var(--amber-soft); border: 1px solid #fde68a; color: #92400e; }

.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 80;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: #0f172a;
    color: #fff;
    padding: 11px 16px;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    font-size: 13px;
    font-weight: 500;
    max-width: 380px;
}
.toast.toast-success { background: #065f46; }
.toast.toast-error { background: #991b1b; }

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 18px;
}

/* Invited Users & Access Control Modal */
.users-info-banner {
    background: var(--surface-subtle);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13.5px;
    color: var(--text);
    margin-bottom: 16px;
}

.invite-user-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.invite-user-row input[name="email"] {
    flex: 1.4 1 240px;
}

.invite-user-row input[name="name"] {
    flex: 1 1 190px;
}

.invite-user-row select[name="role"] {
    flex: 0 0 118px;
}

.users-table-wrap {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: auto;
    max-height: 50vh;
}

.users-table th {
    background: var(--surface-subtle);
}

.users-table td {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    max-width: none;
    padding: 12px 14px;
    vertical-align: middle;
}

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

.user-submeta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.mono-muted {
    font-size: 12.5px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap !important;
}

.user-actions-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.btn-pill {
    border-radius: 999px;
    padding: 5px 14px;
}

.btn-dark {
    background: #0f172a;
    border-color: #0f172a;
    color: #fff;
    border-radius: 999px;
    padding: 8px 18px;
}
.btn-dark:hover {
    background: #1e293b;
}

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

@media (max-width: 900px), (max-height: 540px) {
    .app-shell:not(.hidden) {
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    .tab-panel.active > .card > .table-wrap {
        min-height: 55vh;
        max-height: 70vh;
    }
}

/* Edit Timeline & Date Range Filter */
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--primary-soft);
    border: 1px solid #c7d2fe;
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
}

.filter-chip-clear {
    border: none;
    background: transparent;
    color: var(--primary);
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
}

.history-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.history-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.history-range-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.history-date-field {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
}

.history-date-field input[type="datetime-local"] {
    font: inherit;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 6px 9px;
}

.timeline-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-subtle);
    padding: 12px 14px 10px;
    margin-bottom: 12px;
}

.timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.timeline-title {
    font-size: 13px;
    font-weight: 700;
}

.timeline-legend {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    flex-wrap: wrap;
}

.legend-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 2px;
}
.legend-added { background: var(--success); }
.legend-edited { background: var(--primary); margin-left: 6px; }

.timeline-track {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    overflow-x: auto;
    padding: 4px 2px 6px;
    min-height: 128px;
}

.timeline-node {
    flex: 0 0 auto;
    min-width: 56px;
    padding: 6px 6px 4px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}

.timeline-node:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
}

.timeline-node.in-range {
    background: var(--surface);
    border-color: #c7d2fe;
    box-shadow: var(--shadow-sm);
}

.timeline-node.out-range {
    opacity: 0.45;
}

.timeline-count {
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.timeline-bar-slot {
    width: 24px;
    height: 64px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.timeline-bar {
    width: 100%;
    border-radius: 5px 5px 2px 2px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: var(--primary);
}

.timeline-seg-edited {
    width: 100%;
    background: var(--primary);
}

.timeline-seg-added {
    width: 100%;
    background: var(--success);
}

.timeline-tick {
    width: 100%;
    height: 2px;
    background: var(--border-strong);
    position: relative;
}

.timeline-node.in-range .timeline-tick {
    background: var(--primary);
}

.timeline-label {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

.history-summary-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 13px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-subtle);
    margin-bottom: 12px;
}

.history-table-wrap {
    max-height: 38vh;
    border: 1px solid var(--border);
    border-radius: 10px;
}

/* Save & Restore Database State Modal */
.state-info-banner {
    background: var(--surface-subtle);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13.5px;
    color: var(--text);
    margin-bottom: 14px;
    line-height: 1.55;
}

.state-info-banner code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
    background: #eef2f7;
    padding: 1px 5px;
    border-radius: 4px;
}

.state-controls-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.state-controls-row input[type="text"] {
    flex: 1.6 1 280px;
}

.btn-pill-lg {
    border-radius: 999px;
    padding: 8px 18px;
}

.state-seed-status {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-bottom: 14px;
    font-variant-numeric: tabular-nums;
}

.state-table-wrap {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: auto;
    max-height: 46vh;
}

.state-table th {
    background: var(--surface-subtle);
}

.state-table td {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    max-width: none;
    padding: 12px 14px;
    vertical-align: middle;
}

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

.state-saved-at {
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.state-filename {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
}

.state-note-cell {
    max-width: 280px !important;
    word-break: break-word;
}

.state-submeta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.state-row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}
