:root {
    --color-bg: #ffffff;
    --color-text: #111827;
    --color-muted: #6b7280;
    --color-border: #e5e7eb;
    --color-card-bg: #ffffff;
    --color-primary: #111827;
    --color-primary-hover: #000000;
    --color-danger: #b91c1c;
    --accent-primary: #1E3A8A;
    --accent-hover: #1E40AF;
    --accent-tint: #EEF2FF;
    --accent-focus: #3B82F6;
    --admin-accent: #334155;
    --admin-accent-tint: #F1F5F9;
    --admin-border: #CBD5E1;
    --header-band-bg: #1a2442;

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 40px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f0f2f5;
    color: #1a1a2e;
    line-height: 1.6;
}

header {
    background: #1a1a2e;
    color: #fff;
    padding: 0 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

header h1 {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.version-tag {
    font-size: 11px;
    font-weight: 500;
    background: rgba(255,255,255,0.15);
    padding: 2px 8px;
    border-radius: 10px;
    letter-spacing: 0.3px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-badge {
    background: rgba(255,255,255,0.15);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
}

.container {
    max-width: 960px;
    margin: 24px auto;
    padding: 0 16px;
}

.info-panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 3px solid #4a6cf7;
    border-radius: 6px;
    padding: 18px 22px;
    margin-bottom: 20px;
}

.info-panel-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 10px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.info-panel-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.info-panel-list li {
    position: relative;
    padding: 4px 0 4px 18px;
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
}

.info-panel-list li::before {
    content: "\2022";
    position: absolute;
    left: 0;
    color: #4a6cf7;
    font-weight: 700;
}

.info-panel-list li strong {
    color: #1e293b;
}

.card {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.card h2 {
    margin-bottom: 16px;
    font-size: 18px;
    color: #1a1a2e;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    font-weight: 500;
    font-size: 14px;
    color: #444;
}

input[type="text"],
input[type="password"],
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #4a6cf7;
    box-shadow: 0 0 0 3px rgba(74,108,247,0.1);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: #4a6cf7;
    color: #fff;
}

.btn-primary:hover {
    background: #3b5de7;
}

.btn-outline {
    background: transparent;
    color: #4a6cf7;
    border: 1px solid #4a6cf7;
}

.btn-outline:hover {
    background: #f0f3ff;
}

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

.btn-full {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.v2-stack {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.v2-stack-tight {
    gap: var(--space-2);
}

.v2-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    align-items: center;
}

.v2-row-tight {
    gap: var(--space-2);
}

.v2-section {
    margin-top: 0;
    margin-bottom: 32px;
}

.v2-section + .v2-section {
    margin-top: 0;
}

.v2-section-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
}

.v2-section-subtitle {
    margin: 0;
    font-size: 12px;
    color: var(--color-muted);
}


.v2-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-3);
    align-items: end;
}

.v2-filter-field {
    display: grid;
    gap: var(--space-1);
}

.v2-filter-field label {
    font-size: 12px;
    color: var(--color-muted);
}

.v2-filter-hint {
    font-size: 12px;
    color: var(--color-muted);
    margin: 0;
}

.v2-meta {
    display: grid;
    gap: var(--space-2);
}

.v2-meta-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: var(--space-3);
    align-items: baseline;
}

.v2-meta-k {
    font-size: 12px;
    color: var(--color-muted);
}

.v2-meta-v {
    font-size: 13px;
    color: var(--color-text);
}

.v2-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    word-break: break-all;
}

.v2-empty {
    border: 1px dashed var(--color-border);
    border-radius: 12px;
    padding: var(--space-6);
    text-align: center;
    background: #fafafa;
}

.v2-empty-title {
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.v2-empty-body {
    color: var(--color-muted);
    margin-bottom: var(--space-4);
}

.v2-empty-actions {
    display: flex;
    justify-content: center;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.login-card {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.login-card h1 {
    font-size: 24px;
    margin-bottom: 4px;
    color: #1a1a2e;
}

.subtitle {
    color: #666;
    font-size: 14px;
    margin-bottom: 24px;
}

.alert {
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.muted {
    color: #888;
    font-size: 13px;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.matter-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.matter-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.matter-header h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.exports-list {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e5e7eb;
}

.exports-list h4 {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.export-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
    flex-wrap: wrap;
    gap: 8px;
}

.export-item:last-child {
    border-bottom: none;
}

.export-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.export-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pass {
    background: #d1fae5;
    color: #065f46;
}

.status-info {
    background: #dbeafe;
    color: #1e3a8a;
}

.status-warn {
    background: #fef3c7;
    color: #92400e;
}

.status-fail {
    background: #fee2e2;
    color: #991b1b;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    position: relative;
    z-index: 101;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.verify-summary {
    margin-bottom: 16px;
}

.verify-summary p {
    margin-bottom: 4px;
    font-size: 14px;
}

.verify-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.verify-table th,
.verify-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.verify-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #444;
}

/* UI V2 table redesign */
.table-v2 {
    overflow-x: auto;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: #fff;
}

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

.table-v2 thead th,
table.table-v2 thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fafafa;
    border-bottom: 1px solid var(--color-border);
    color: #374151;
    font-weight: 600;
}

.table-v2 th,
.table-v2 td,
table.table-v2 th,
table.table-v2 td {
    text-align: left;
    padding: 12px 14px;
    line-height: 1.45;
    border-bottom: 1px solid #f1f5f9;
}

.table-v2 tbody tr:hover,
table.table-v2 tbody tr:hover {
    background: #f9fafb;
}

.table-v2-striped tbody tr:nth-child(even) {
    background: #fcfcfd;
}

.cell-num {
    text-align: right !important;
    font-variant-numeric: tabular-nums;
}

.cell-muted {
    color: var(--color-muted);
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-neutral {
    background: #e5e7eb;
    color: #374151;
}

.badge-blue {
    background: #dbeafe;
    color: #1d4ed8;
}

.table-empty-v2 {
    text-align: center;
    color: var(--color-muted);
    padding: 20px 14px;
}

code {
    font-family: "SF Mono", "Fira Code", monospace;
    font-size: 12px;
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
}

.back-link {
    display: inline-block;
    margin-bottom: 16px;
    color: #4a6cf7;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

.upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.upload-slot {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    background: #fafbfc;
}

.upload-slot h4 {
    font-size: 14px;
    margin-bottom: 4px;
}

.upload-status {
    margin: 8px 0;
    min-height: 24px;
}

.upload-filename {
    font-size: 12px;
    color: #333;
    word-break: break-all;
}

.file-input {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 8px;
    font-size: 13px;
}

.upload-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.matter-actions-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.section-header h2 {
    margin-bottom: 0;
}

.section-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-disabled-demo {
    opacity: 0.5;
    cursor: not-allowed;
    position: relative;
}

.sources-display {
    min-height: 40px;
}

.sources-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.source-block {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 14px 16px;
}

.source-block h4 {
    font-size: 13px;
    color: #4a6cf7;
    margin-bottom: 10px;
    font-weight: 600;
}

.source-field {
    font-size: 13px;
    padding: 3px 0;
    color: #334155;
}

.source-label {
    font-weight: 500;
    color: #64748b;
}

.source-value {
    color: #1e293b;
}

.sources-group-title {
    font-size: 14px;
    color: #4a6cf7;
    margin: 16px 0 8px 0;
    padding-bottom: 4px;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
}

.sources-group-title:first-of-type {
    margin-top: 0;
}

.helper-text {
    margin-top: 4px;
    font-size: 12px;
    font-style: italic;
}

.workflow-mode-badge {
    display: inline-block;
    background: #f0f3ff;
    color: #4a6cf7;
    border: 1px solid #c7d2fe;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
    letter-spacing: 0.2px;
}

.coming-soon-panel {
    margin-top: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fafbfc;
}

.coming-soon-panel summary {
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.coming-soon-panel summary::before {
    content: "\25B6";
    font-size: 9px;
    transition: transform 0.2s;
}

.coming-soon-panel[open] summary::before {
    transform: rotate(90deg);
}

.coming-soon-panel summary::-webkit-details-marker {
    display: none;
}

.coming-soon-list {
    list-style: none;
    padding: 0 14px 12px 14px;
    margin: 0;
}

.coming-soon-list li {
    position: relative;
    padding: 3px 0 3px 18px;
    font-size: 13px;
    color: #94a3b8;
}

.coming-soon-list li::before {
    content: "\2022";
    position: absolute;
    left: 0;
    color: #cbd5e1;
    font-weight: 700;
}

select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.2s;
}

select:focus {
    outline: none;
    border-color: #4a6cf7;
    box-shadow: 0 0 0 3px rgba(74,108,247,0.1);
}

input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

input[type="number"]:focus {
    outline: none;
    border-color: #4a6cf7;
    box-shadow: 0 0 0 3px rgba(74,108,247,0.1);
}

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

@media (max-width: 640px) {
    .matter-header {
        flex-direction: column;
    }
    .export-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .upload-grid {
        grid-template-columns: 1fr;
    }
    .sources-grid {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .section-header {
        flex-direction: column;
    }
}

.readiness-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin: 12px 0;
}
.readiness-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    background: #f8f9fb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}
.readiness-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.readiness-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.vendor-selector {
    display: flex;
    gap: 24px;
    margin: 12px 0 8px;
}
.vendor-radio {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    cursor: pointer;
}
.vendor-card {
    margin-top: 8px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}
.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.15s;
}
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.input-readonly {
    background: #f3f4f6 !important;
    color: #6b7280;
    cursor: default;
}

.integration-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.diag-panel {
    margin-top: 12px;
}
.diag-details {
    padding: 10px 14px;
    background: #f8f9fb;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    font-size: 13px;
    line-height: 1.7;
}
.diag-details code {
    background: #e5e7eb;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 12px;
}

.alert {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
}
.alert-warn {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    color: #92400e;
}

.back-link {
    display: inline-block;
    margin-bottom: 16px;
    color: #2563eb;
    text-decoration: none;
    font-size: 14px;
}
.back-link:hover {
    text-decoration: underline;
}

.workspace-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    color: #cbd5e1;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.2);
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}


.v2-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4, 16px);
    margin-bottom: var(--space-6);
}

@media (min-width: 640px) {
    .v2-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .v2-kpi-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

.dash-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1.25rem 1rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.dash-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}

.dash-card-label {
    font-size: 13px;
    color: #64748b;
    margin-top: 4px;
    font-weight: 500;
}

.text-error {
    color: #dc2626;
}

.hidden {
    display: none !important;
}

.readiness-container {
    max-width: 1120px;
}

.readiness-header-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.readiness-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.readiness-summary-card {
    border-left: 4px solid #16a34a;
}

.readiness-summary-warn {
    border-left-color: #d97706;
}

.readiness-summary-fail {
    border-left-color: #dc2626;
}

.section-toggle {
    width: 100%;
    border: none;
    background: #f8fafc;
    border-radius: 6px;
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 10px;
}

.readiness-row {
    cursor: pointer;
}

.readiness-row-warn {
    background: #fffbeb;
}

.readiness-row-fail {
    background: #fef2f2;
}

.readiness-detail-row td {
    background: #f8fafc;
}

.readiness-detail-panel p {
    margin-bottom: 8px;
}

.readiness-audit-micro {
    margin-bottom: 10px;
}

.env-banner { background: #7a1f1f; color: #fff; text-align: center; font-weight: 700; letter-spacing: 0.04em; padding: 0.45rem 0.75rem; border-bottom: 2px solid #d9a441; }

.env-banner-paused {
    background: #b91c1c;
}

.layout-v2-body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    background: var(--color-bg);
    color: var(--color-text);
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.page-subtitle {
    font-size: 13px;
    color: var(--color-muted);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: var(--space-3);
}

.layout-v2-card,
.card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: var(--space-5);
    margin-bottom: var(--space-5);
    box-shadow: none;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
}

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

.btn-secondary,
.btn-outline {
    background: white;
    border: 1px solid var(--color-border);
    color: var(--color-text);
    padding: 8px 14px;
    border-radius: 6px;
}

.btn-secondary:hover,
.btn-outline:hover {
    background: #f9fafb;
}

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

table,
.verify-table {
    width: 100%;
    border-collapse: collapse;
}

th,
.verify-table th {
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-3);
    background: transparent;
}

td,
.verify-table td {
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-3);
}

tr:hover,
.verify-table tbody tr:hover {
    background: #f9fafb;
}

.layout-v2-sidebar {
    background: #fafafa;
}

.sidebar-v2-brand {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: var(--space-4);
}

.layout-v2-sidebar a:hover {
    background: #f3f4f6;
}

/* UI V2 layout foundation (light mode only) */
.layout-v2-body {
    background: #ffffff;
    color: #111827;
}

.layout-v2-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 100vh;
}

.layout-v2-sidebar {
    border-right: 1px solid #e5e7eb;
    background: #fafafa;
    padding: 1.25rem 0.9rem;
}

.sidebar-v2-brand {
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.sidebar-v2-meta {
    margin-bottom: 1.2rem;
    font-size: 12px;
}

.sidebar-v2-group {
    margin-bottom: 1rem;
}


.sidebar-section-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 0;
    background: transparent;
    padding: 0.55rem 0.55rem 0.4rem 0.7rem;
    margin: 0;
    border-radius: 8px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 11px;
    cursor: pointer;
}

.sidebar-section-toggle:hover {
    background: #f3f4f6;
}

.sidebar-section-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22);
}

.sidebar-section-title {
    text-align: left;
}

.sidebar-section-caret {
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 6px solid currentColor;
    transition: transform 0.15s ease;
}

.sidebar-section-toggle.is-open .sidebar-section-caret {
    transform: rotate(90deg);
}

.sidebar-section-body.is-collapsed {
    display: none;
}
.nav-section-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9ca3af;
    margin: 0.7rem 0 0.4rem;
}


.icon {
    display: inline-flex;
    vertical-align: middle;
    flex: 0 0 auto;
}

.icon-muted { color: var(--color-muted); }
.icon-strong { color: var(--color-text); }

.btn .icon { margin-right: 8px; }
.nav-link .icon { margin-right: 10px; }
.nav-link {
    display: flex;
    align-items: center;
    position: relative;
    padding: 0.42rem 0.55rem 0.42rem 0.7rem;
    border-radius: 8px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 0.15rem;
}

.nav-link:hover { background: #f3f4f6; }

.nav-link.nav-link-active {
    background: #fff7cc;
    border: 1px solid #fde68a;
    border-radius: 10px;
    color: #111827;
    font-weight: 600;
}

.nav-link.nav-link-active:hover {
    background: #fff3b0;
}

.nav-link .icon { color: var(--color-muted); }
.nav-link-active .icon { color: var(--color-text); }

.nav-link-active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 3px;
    border-radius: 999px;
    background: var(--accent-primary);
}

a:hover {
    color: var(--accent-primary);
}

.layout-v2-main {
    background: #ffffff;
    min-width: 0;
    max-width: 100%;
}

.layout-v2-content-wrap {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px 2rem;
    min-width: 0;
    box-sizing: border-box;
}


.v2-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--rail-w, 280px);
    gap: var(--space-6);
    align-items: start;
    min-width: 0;
    overflow-x: hidden;
}

.v2-content-grid-single {
    grid-template-columns: minmax(0, 1fr);
}

.v2-main-col {
    min-width: 0;
}

.v2-right-rail {
    position: relative;
    min-width: 0;
}

.v2-right-rail .v2-fyi-card {
    width: 100%;
}

.v2-fyi-card {
    width: 100%;
    background: #fef9c3;
    color: #111111;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: var(--space-4);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.v2-fyi-eyebrow {
    display: inline-block;
    margin-bottom: var(--space-2);
    padding: var(--space-1) var(--space-2);
    border-radius: 999px;
    border: 1px solid #facc15;
    background: #fef08a;
    color: #111111;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.v2-fyi-title {
    margin: 0 0 var(--space-2);
    font-size: 1rem;
    line-height: 1.4;
}

.v2-fyi-lines {
    margin: 0;
    padding-left: 1.1rem;
    display: grid;
    gap: var(--space-2);
}

.v2-fyi-lines li {
    color: #1f2937;
    font-size: 0.92rem;
}

.v2-fyi-example {
    margin-top: var(--space-3);
    font-size: 0.9rem;
    color: #1f2937;
}

@media (max-width: 1100px) {
    .v2-content-grid {
        grid-template-columns: 1fr;
    }

    .v2-right-rail {
        margin-top: var(--space-2);
    }
}
.page-header-v2 {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.page-header-v2 h1 {
    margin: 0;
    font-size: 1.9rem;
}

.page-header-v2-subtitle {
    margin-top: 0.25rem;
    color: #6b7280;
}

.admin-scope .page-header-v2 {
    border-bottom: 1px solid var(--admin-border);
    padding-bottom: 0.9rem;
}

.admin-scope .nav-section-label {
    color: var(--admin-accent);
}

.admin-scope .layout-v2-sidebar {
    background: var(--admin-accent-tint);
    border-right-color: var(--admin-border);
}

.admin-scope .card-subtle {
    background: var(--admin-accent-tint);
    border-color: var(--admin-border);
}

.admin-scope .btn-secondary {
    border-color: var(--admin-border);
}

.admin-scope .btn-secondary:hover {
    background: var(--admin-accent-tint);
}

.card, .card-v2 {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: none;
    padding: 1.25rem;
}

.btn { border-radius: 8px; }
.btn-primary { background: #111827; }
.btn-primary:hover { background: #1f2937; }
.btn-outline {
    color: #111827;
    border-color: #d1d5db;
}

.verify-table th, .verify-table td {
    padding: 0.65rem 0.7rem;
}

.verify-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.flash-v2 {
    background: #eff6ff;
    border-bottom: 1px solid #bfdbfe;
    color: #1e3a8a;
    padding: 0.55rem 1rem;
}

.flash-v2-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

@media (max-width: 980px) {
    .layout-v2-shell { grid-template-columns: 1fr; }
    .layout-v2-sidebar { border-right: none; border-bottom: 1px solid #e5e7eb; }
}

/* UI V2 PR-3 shared forms, tables, and empty states */
.form-v2-stack {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.form-grid-v2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
}

.form-row-v2 {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.form-row-v2-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.form-row-v2-help,
.form-row-v2-error {
    font-size: 12px;
    margin: 0;
}

.form-row-v2-help { color: #6b7280; }
.form-row-v2-error { color: #b91c1c; }

.form-row-v2-control input,
.form-row-v2-control textarea,
.form-row-v2-control select {
    min-height: 40px;
}

.button-row-v2 {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.button-row-v2-secondary,
.button-row-v2-danger,
.button-row-v2-primary {
    display: inline-flex;
    gap: var(--space-2);
    align-items: center;
    flex-wrap: wrap;
}

.button-row-v2-danger { margin-right: auto; }

/* UI V2 PR-5 form/workflow cleanup */
.form {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    padding: var(--space-4);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: #fff;
}

.form-section-title {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-4);
}

.form-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin: 0;
}

.form label,
.form-row label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.form input[type="text"],
.form input[type="password"],
.form input[type="number"],
.form input[type="file"],
.form select,
.form textarea,
.form-row input[type="text"],
.form-row input[type="password"],
.form-row input[type="number"],
.form-row input[type="file"],
.form-row select,
.form-row textarea {
    width: 100%;
    min-height: 40px;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    font: inherit;
}

.form textarea,
.form-row textarea {
    min-height: 100px;
    resize: vertical;
}

.form input:focus,
.form select:focus,
.form textarea:focus,
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: #9ca3af;
    box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.18);
}

.help-text,
.hint {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
}

.error-text {
    font-size: 12px;
    color: #b91c1c;
    margin: 0;
}

.success-text {
    font-size: 12px;
    color: #047857;
    margin: 0;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.form-actions-right {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
    margin-left: auto;
}

.btn-primary,
.btn-secondary,
.btn-danger {
    min-height: 36px;
}

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

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

.btn-primary:focus,
.btn-primary:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.3);
}

.card-highlight {
    background: var(--accent-tint);
}

.btn-danger {
    background: #b91c1c;
}

.btn-danger:hover {
    background: #991b1b;
}

.btn:disabled,
.btn[disabled] {
    background: #f3f4f6;
    color: #9ca3af;
    border-color: #e5e7eb;
    cursor: not-allowed;
    box-shadow: none;
}

.danger-zone {
    margin-top: var(--space-4);
    padding: var(--space-4);
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fef9f9;
}

.danger-zone .form-section-title {
    color: #991b1b;
}

@media (max-width: 780px) {
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
}

.empty-state-v2 {
    border: 1px dashed #d1d5db;
    border-radius: 10px;
    padding: var(--space-5);
    text-align: center;
    background: #fafafa;
}

.empty-state-v2-compact {
    padding: var(--space-4);
}

.empty-state-v2-icon {
    display: flex;
    justify-content: center;
    color: var(--color-muted);
    margin-bottom: var(--space-2);
}

.empty-state-v2-icon .icon {
    width: 32px;
    height: 32px;
}

.empty-state-v2-title {
    font-size: 16px;
    margin-bottom: var(--space-1);
}

.empty-state-v2-body {
    color: #6b7280;
    margin-bottom: var(--space-3);
}

.table-v2-wrap {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.table-v2-wrap table {
    width: 100%;
}

.table-v2 th,
.table-v2 td {
    vertical-align: middle;
}

.table-v2-empty-row:hover {
    background: transparent;
}

.table-v2-dense td,
.table-v2-dense th,
.verify-table.table-v2-dense td,
.verify-table.table-v2-dense th {
    padding: 10px 12px;
}

.cell-truncate {
    display: inline-block;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

#adminWorkspacesTable .col-actions,
#adminWorkspacesTable th.col-actions,
#adminWorkspacesTable td.col-actions,
#adminWorkspacesTable td.ws-actions-cell {
    display: table-cell !important;
    width: 1%;
    min-width: 96px;
    white-space: nowrap;
    text-align: right;
}


.ws-card-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-workspaces-panel {
    max-height: 680px;
    overflow-y: auto;
}

.admin-workspaces-sticky {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    margin-bottom: 10px;
    padding-bottom: 10px;
}

.admin-workspaces-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-workspaces-filter-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.admin-workspaces-filter {
    width: min(320px, 100%);
}

.admin-workspaces-counter {
    font-size: 13px;
}

.admin-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.ws-card {
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 14px 16px;
    background: #fff;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    justify-content: space-between;
}

.ws-card-main {
    min-width: 0;
    flex: 1 1 auto;
}

.ws-card-title {
    font-weight: 600;
}

.ws-card-id {
    font-family: monospace;
    font-size: 12px;
    color: var(--color-muted);
}

.ws-card-id-row {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.ws-copy-id-btn {
    padding: 0 8px;
    min-height: 24px;
}

.ws-copy-id-btn.is-success {
    border-color: var(--color-success, #1f9d55);
    color: var(--color-success, #1f9d55);
}

.ws-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
    color: var(--color-muted);
    font-size: 13px;
}

.ws-card-actions {
    flex: 0 0 auto;
}

.ws-actions-btn,
#adminWorkspacesTable .ws-actions-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    white-space: nowrap;
}

.ws-actions-cell {
    position: relative;
}

.ws-actions-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.10);
    padding: 6px;
    z-index: 10;
    min-width: 180px;
}

.ws-actions-menu.hidden {
    display: none;
}

.ws-actions-item {
    width: 100%;
    text-align: left;
    padding: 8px 10px;
    border-radius: 8px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.ws-actions-item:hover,
.ws-actions-item:focus-visible {
    background: rgba(0, 0, 0, 0.04);
}

.login-v2-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1rem;
}

/* Demo-2 login visual differentiation */
.login-v2-card {
  background: var(--demo2-sidebar-bg);
  border: 1px solid var(--demo2-sidebar-border);
  box-shadow: 0 4px 16px rgba(110,31,38,0.08);
    width: 100%;
    max-width: 460px;
}

.login-v2-signup {
    margin-top: var(--space-3);
    text-align: center;
}

@media (max-width: 768px) {
    .form-grid-v2 {
        grid-template-columns: 1fr;
    }
}

/* UI V2 PR-8 matter detail layout */
.grid-2col {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: var(--space-5);
    align-items: start;
}

.stack-mobile {
    margin-bottom: var(--space-5);
}

.action-row {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    align-items: center;
}

.action-dropdown {
    position: relative;
}

.action-dropdown summary {
    list-style: none;
}

.action-dropdown summary::-webkit-details-marker {
    display: none;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 180px;
    z-index: 10;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 8px;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
    display: grid;
    gap: 6px;
}

.detail-list-v2 {
    display: grid;
    gap: 8px;
    margin-bottom: var(--space-4);
}

@media (max-width: 980px) {
    .grid-2col {
        grid-template-columns: minmax(0, 1fr);
    }

    .dropdown-menu {
        position: static;
        margin-top: 6px;
    }
}

/* UI V2 PR-9 mobile optimization */
:root {
    --env-banner-offset: 0px;
}

.hide-mobile { display: flex;
    align-items: center; }
.show-mobile { display: none; }

.page-header-v2-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: flex-end;
}

.env-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--color-border);
}

.env-pill-dev { background: #f8fafc; color: #334155; border-color: #e2e8f0; }
.env-pill-staging { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.env-pill-prod { background: #fef2f2; color: #991b1b; border-color: #fecaca; }

.prod-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #7f1d1d;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: var(--space-4);
}

.prod-banner small {
    font-weight: 500;
    color: #991b1b;
}

.env-banner {
    position: sticky;
    top: 0;
    z-index: 45;
}

.table-v2 thead th,
table.table-v2 thead th {
    top: var(--env-banner-offset, 0px);
}

.mobile-card-list {
    display: grid;
    gap: 0.75rem;
}

.mobile-data-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.8rem;
    background: #fff;
}

.mobile-data-card-title {
    font-weight: 600;
    margin-bottom: 0.4rem;
    word-break: break-word;
}

.mobile-data-card-grid {
    display: grid;
    grid-template-columns: minmax(100px, 1fr) minmax(0, 1.3fr);
    gap: 0.35rem 0.65rem;
    align-items: center;
}

.mobile-data-card-grid dt {
    color: #6b7280;
    font-size: 12px;
}

.mobile-data-card-grid dd {
    margin: 0;
    word-break: break-word;
}

@media (max-width: 768px) {
    .layout-v2-shell {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .layout-v2-main {
        min-width: 0;
    }

    .layout-v2-content-wrap {
        padding: 1rem 0.8rem 1.25rem;
        overflow-x: hidden;
    }

    .layout-v2-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: min(300px, 86vw);
        z-index: 60;
        transform: translateX(-104%);
        transition: transform 0.2s ease;
        border-right: 1px solid #e5e7eb;
        border-bottom: none;
        overflow-y: auto;
        padding-top: 0.8rem;
    }

    .nav-toggle {
        position: fixed;
        left: 0.75rem;
        top: calc(var(--env-banner-offset, 0px) + 0.7rem);
        z-index: 65;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border: 1px solid #d1d5db;
        border-radius: 10px;
        background: #fff;
        font-size: 20px;
        color: #111827;
    }

    .nav-close {
        display: inline-flex;
        margin-left: auto;
        margin-bottom: 0.5rem;
        width: 40px;
        height: 40px;
        align-items: center;
        justify-content: center;
        border: 1px solid #d1d5db;
        border-radius: 8px;
        background: #fff;
        font-size: 18px;
    }

    .nav-overlay {
        position: fixed;
        inset: 0;
        background: rgba(17, 24, 39, 0.45);
        z-index: 55;
    }

    body.nav-open {
        overflow: hidden;
    }

    body.nav-open .layout-v2-sidebar {
        transform: translateX(0);
    }

    .page-header-v2 {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding-left: 3rem;
    }

    .page-header-v2 h1 {
        font-size: 1.45rem;
        line-height: 1.3;
    }

    .page-header-v2-actions {
        justify-content: flex-start;
    }

    .btn,
    .nav-link,
    .action-dropdown summary,
    .dropdown-menu .btn,
    a.btn {
        min-height: 42px;
    }

    .action-row,
    .button-row-v2,
    .form-actions,
    .form-actions-right {
        gap: 0.65rem;
    }

    .hide-mobile { display: none !important; }
    .show-mobile { display: block !important; }

    .table-v2-wrap,
    .table-v2 {
        overflow-x: auto;
    }
}

@media (min-width: 769px) {
    .nav-toggle,
    .nav-close,
    .nav-overlay {
        display: none !important;
    }
}

.wtm-card {
    margin-top: 1rem;
    background: #f8fbff;
    border: 1px solid #dbe7f7;
}

.wtm-card details > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.wtm-card details > summary::-webkit-details-marker {
    display: none;
}

.wtm-summary-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #0f172a;
}

.wtm-summary-copy {
    color: #475569;
    font-size: 0.95rem;
}

.wtm-body {
    margin-top: 0.8rem;
    border-top: 1px solid #e2e8f0;
    padding-top: 0.8rem;
}

.wtm-body h4 {
    margin: 0.8rem 0 0.35rem;
    font-size: 0.95rem;
}

.wtm-body p {
    margin: 0;
    color: #334155;
}

.wtm-link {
    display: inline-block;
    margin-top: 0.8rem;
    color: #64748b;
    text-decoration: none;
}

.wtm-link:hover {
    text-decoration: underline;
}

/* UI V2 final pass: ultra-professional refinement */
:root {
    --color-border: #e6eaf0;
    --color-muted: #667085;
    --accent-tint: #f7f9fc;
    --admin-accent-tint: #f8fafc;
    --admin-border: #d9dee8;
}

html,
body,
.layout-v2-body {
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
.page-title,
.page-header-v2 h1 {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
}

h2,
.card h2,
.card-title,
.section-header h2 {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0;
}

.page-subtitle,
.page-header-v2-subtitle,
.subtitle {
    font-size: 13px;
    color: var(--color-muted);
}

p,
li,
span,
small,
td,
.muted,
.help-text {
    font-weight: 400;
}

.layout-v2-content-wrap {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px 2rem;
    box-sizing: border-box;
}

.layout-v2-card,
.card,
.card-v2 {
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: var(--space-5);
    margin-bottom: var(--space-5);
    box-shadow: none;
}

.page-header-v2 {
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid #edf1f6;
}

.admin-scope .page-header-v2 {
    border-bottom-color: var(--admin-border);
}

.form,
.form-v2-stack,
.form-section,
.form-grid,
.form-grid-v2,
.form-row,
.form-row-v2,
.form-group {
    row-gap: var(--space-3);
}

.form-row,
.form-row-v2,
.form-group {
    margin-bottom: 0;
}

.table-v2,
.verify-table,
table.table-v2 {
    border-color: var(--color-border);
}

.table-v2 thead th,
table.table-v2 thead th,
.verify-table th,
th {
    font-size: 12.5px;
    letter-spacing: 0.01em;
    color: var(--color-text);
    font-weight: 625;
    border-bottom: 1px solid var(--color-border);
}

.table-v2 th.cell-num,
.table-v2 td.cell-num,
table.table-v2 th.cell-num,
table.table-v2 td.cell-num {
    text-align: right;
}

.table-v2 th,
.table-v2 td,
table.table-v2 th,
table.table-v2 td,
.verify-table th,
.verify-table td,
th,
td {
    padding: 12px 14px;
    border-bottom: 1px solid #edf1f6;
}

.table-v2 tbody tr:hover,
.verify-table tbody tr:hover,
tr:hover {
    background: #fafbfd;
}

.btn,
a.btn,
button.btn {
    min-height: 38px;
    padding: 8px 14px;
    gap: 8px;
    font-weight: 500;
    border-radius: 8px;
    line-height: 1.2;
}

.btn-sm {
    min-height: 32px;
    padding: 6px 10px;
}

.btn .icon,
.nav-link .icon {
    margin-right: 0;
}

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

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

.btn-primary:focus,
.btn-primary:focus-visible,
.btn:focus,
.btn:focus-visible,
a:focus,
a:focus-visible,
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22);
}

.btn-secondary,
.btn-outline {
    background: #fff;
    border: 1px solid #d6dce5;
    color: #1f2937;
}

.btn-secondary:hover,
.btn-outline:hover {
    background: #f9fafb;
    color: #111827;
}

.btn:disabled,
.btn[disabled] {
    background: #f5f6f8;
    border-color: #e6eaf0;
    color: #98a2b3;
    opacity: 1;
}

.nav-section-label {
    margin: var(--space-4) 0 var(--space-2);
    color: #98a2b3;
}

.nav-link {
    padding: 0.5rem 0.6rem 0.5rem 0.8rem;
}

.nav-link.nav-link-active {
    background: #fff7cc;
    border: 1px solid #fde68a;
    border-radius: 10px;
    color: #111827;
}

.nav-link.nav-link-active:hover {
    background: #fff3b0;
}

.nav-link-active::before {
    width: 2px;
    background: var(--accent-primary);
}

a {
    color: inherit;
}

a:hover {
    color: var(--accent-primary);
}

.card-highlight,
.info-panel,
.flash-v2 {
    background: var(--accent-tint);
    border-color: #e6ecf7;
}

.wtm-card {
    background: #fafbfc;
    border-color: var(--color-border);
}

.dropdown-menu {
    box-shadow: none;
    border-color: var(--color-border);
}

.admin-scope .layout-v2-sidebar {
    background: var(--admin-accent-tint);
}

.admin-scope .card-subtle {
    background: #fbfcfd;
    border-color: var(--admin-border);
}

@media (max-width: 768px) {
    .layout-v2-content-wrap {
        padding: var(--space-4);
    }

    .page-header-v2 {
        padding-left: 3rem;
    }
}

/* UI theme variants (staging/dev only via body.theme-*) */
body.theme-modern {
    --color-bg: #f8fafc;
    --color-card-bg: #ffffff;
    --color-text: #0f172a;
    --color-muted: #64748b;
    --color-border: #e2e8f0;
    --accent-primary: #4f46e5;
    --accent-hover: #4338ca;
    --accent-focus: #6366f1;
    --accent-tint: #eef2ff;
    --admin-accent: #334155;
    --admin-accent-tint: #f1f5f9;
    --admin-border: #cbd5e1;
}

body.theme-legal {
    --color-bg: #fbfbfa;
    --color-card-bg: #ffffff;
    --color-text: #111827;
    --color-muted: #4b5563;
    --color-border: #e5e7eb;
    --accent-primary: #111827;
    --accent-hover: #0b1220;
    --accent-focus: #64748b;
    --accent-tint: #f3f4f6;
    --admin-accent: #374151;
    --admin-accent-tint: #f3f4f6;
    --admin-border: #d1d5db;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.theme-legal .page-title,
body.theme-legal .card-title,
body.theme-legal h1,
body.theme-legal h2 {
    font-family: Georgia, Cambria, "Times New Roman", Times, serif;
    letter-spacing: 0.01em;
}

body.theme-security {
    --color-bg: #f8fafc;
    --color-card-bg: #ffffff;
    --color-text: #0f172a;
    --color-muted: #64748b;
    --color-border: #e2e8f0;
    --accent-primary: #0b2a4a;
    --accent-hover: #062036;
    --accent-focus: #22d3ee;
    --accent-tint: #ecfeff;
    --admin-accent: #334155;
    --admin-accent-tint: #f1f5f9;
    --admin-border: #cbd5e1;
}


body.theme-safe {
    --color-bg: #f5f5f5;
    --color-card-bg: #ffffff;
    --color-text: #111827;
    --color-muted: #4b5563;
    --color-border: #d1d5db;
    --accent-primary: #111827;
    --accent-hover: #000000;
    --accent-focus: #374151;
    --accent-tint: #f3f4f6;
    --admin-accent: #374151;
    --admin-accent-tint: #f3f4f6;
    --admin-border: #d1d5db;
}

body.theme-safe .header-band {
    background: var(--color-card-bg);
    border-color: var(--color-border);
    padding: 0.75rem;
}

.header-band {
    width: 100%;
    background: var(--header-band-bg);
    color: #ffffff;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 0;
}

.page-header-v2.header-band {
    background: var(--header-band-bg);
    color: #ffffff;
}

.page-header-v2.header-band .page-header-v2-subtitle {
    color: rgba(255, 255, 255, 0.78);
}

body.theme-modern .header-band {
    background: linear-gradient(90deg, #eef2ff 0%, #f8fafc 45%, #ecfeff 100%);
    border-color: var(--color-border);
    padding: 0.75rem;
}

body.theme-security .header-band {
    background: linear-gradient(90deg, #eff6ff 0%, #f8fafc 45%, #ecfeff 100%);
    border-color: var(--color-border);
    padding: 0.75rem;
}

.theme-picker-select {
    font-size: 12px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 0.2rem 0.35rem;
    background: var(--color-card-bg);
    color: var(--color-text);
    min-width: 200px;
}

#uploadPolicyMessage {
    margin-top: var(--space-3);
}

#summaryCards + .v2-section {
    margin-top: var(--space-4);
}

body.theme-modern .btn-primary:hover {
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-hover));
}


/* UI V2 PR-10 auth/admin control standardization */
.form-label {
    display: block;
    margin-bottom: var(--space-2);
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.form-input,
.form-select {
    width: 100%;
    min-height: 40px;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.35;
    background: var(--color-card-bg);
    color: var(--color-text);
}

input[type="password"].form-input,
input[type="text"].form-input,
input[type="email"].form-input,
select.form-select {
    min-height: 40px;
}

.form-input:focus,
.form-select:focus,
input[type="password"].form-input:focus {
    outline: none;
    border-color: var(--accent-focus);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
}

.form-v2-stack > .btn,
.form > .btn {
    align-self: flex-end;
}

.form-v2-stack > .btn.btn-full,
.form > .btn.btn-full {
    align-self: stretch;
}

.sidebar-v2-brand {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    line-height: 1.3;
    padding: 0.1rem 0;
}

.sidebar-v2-version {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-muted);
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    align-items: end;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-field input {
    width: 100%;
}

/* UI V2 PR-13 layout rhythm + density refinement */
:root {
    --space-5: 20px;
    --space-6: 28px;
}

.layout-v2-content-wrap {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px 1.35rem;
    box-sizing: border-box;
}

.layout-v2-main .layout-v2-content-wrap > :first-child {
    margin-top: 0;
}

.page-header-v2 {
    gap: 0.7rem;
    margin-bottom: 0.7rem;
    padding: 0.6rem 0 0.65rem;
    border-bottom: 1px solid #e9eef5;
}

.page-header-v2-title-block {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.page-header-v2 h1 {
    font-size: 22px;
    line-height: 1.25;
}

.page-header-v2-subtitle {
    margin-top: 0;
    line-height: 1.45;
}

.header-band {
    width: 100%;
    background: var(--header-band-bg);
    color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.layout-v2-card,
.card,
.card-v2 {
    padding: 1rem 1.1rem;
    margin-bottom: 0.9rem;
}

.layout-v2-content-wrap > .layout-v2-card:first-of-type,
.layout-v2-content-wrap > .card:first-of-type,
.layout-v2-content-wrap > .card-v2:first-of-type {
    margin-top: 0.15rem;
}

.sidebar-v2-brand-block {
    display: flex;
    flex-direction: column;
    gap: 0.32rem;
    margin: 0.15rem 0 0.95rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid #e5e7eb;
}

.sidebar-v2-brand {
    font-size: 17px;
    font-weight: 750;
    letter-spacing: 0.01em;
    line-height: 1.2;
    margin: 0;
    padding: 0;
}

.sidebar-v2-version {
    font-size: 11px;
    line-height: 1.2;
    color: #98a2b3;
}

.sidebar-v2-meta {
    margin-bottom: 0;
    font-size: 12px;
    line-height: 1.45;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.2rem;
}

.sidebar-v2-user,
.sidebar-v2-workspace {
    min-width: 0;
}

.sidebar-v2-workspace {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.sidebar-v2-separator {
    color: #9ca3af;
}

.sidebar-v2-group:first-of-type {
    margin-top: 0.15rem;
}

.table-v2 th,
.table-v2 td,
table.table-v2 th,
table.table-v2 td,
.verify-table th,
.verify-table td,
th,
td {
    padding: 10px 12px;
}

.table-v2-dense th,
.table-v2-dense td,
.verify-table.table-v2-dense th,
.verify-table.table-v2-dense td {
    padding: 9px 11px;
    line-height: 1.4;
}

.table-v2 thead th,
table.table-v2 thead th,
.verify-table th,
th {
    font-size: 12px;
}

.table-empty-v2,
.empty-state-v2 {
    padding: 1rem;
    border-radius: 9px;
}

.table-empty-v2 {
    position: relative;
    border: 1px dashed #d8dee8;
    background: #f8fafc;
    color: #475467;
    text-align: center;
}

.table-empty-v2::before {
    content: "⌁";
    display: block;
    font-size: 18px;
    color: #98a2b3;
    margin-bottom: 6px;
}

.table-empty-v2::after {
    content: "Tip: Remove date filters to load the latest 200 events.";
    display: block;
    font-size: 12px;
    color: #667085;
    margin-top: 6px;
}

.usage-filter-card {
    margin-bottom: 0.8rem;
}

.usage-filter-row {
    gap: 0.6rem;
}

.usage-results-card {
    padding-top: 0.85rem;
    min-height: 0;
}

.usage-empty-state {
    max-width: 620px;
    margin: 0 auto;
}

.usage-empty-state-tip {
    margin: 0.25rem 0 0;
    font-size: 12px;
    color: #667085;
}

.dashboard-cards-tight {
    row-gap: 0.7rem;
    column-gap: 0.7rem;
}

.admin-dash-title {
    margin-top: 0;
}

.admin-dash-title-reset {
    margin: 0;
}

.admin-dash-subtitle {
    margin-top: 0;
}

.admin-dash-message {
    margin-bottom: 0.75rem;
}

.admin-dash-controls-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-bottom: 0.75rem;
}

.admin-dash-select {
    padding: 6px 10px;
    min-height: auto;
}

.admin-dash-select-wide {
    min-width: 260px;
}

.admin-dash-select-plan {
    min-width: 160px;
}

.admin-dash-field-error {
    margin: 0.35rem 0 0 0;
}

.admin-dash-action-row {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.admin-dash-note {
    margin-top: 0.75rem;
}

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

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

.admin-dash-filter-input {
    padding: 6px 10px;
    min-height: auto;
    font-size: 13px;
}


.admin-alert-card {
    border-left: 4px solid #f59e0b;
}

.admin-card-title-reset {
    margin-top: 0;
}

.admin-workspace-lifecycle-note {
    margin-top: -0.25rem;
}

.admin-form-row {
    margin-bottom: 1rem;
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.admin-form-row-wrap {
    flex-wrap: wrap;
}

.admin-form-group-grow {
    flex: 1;
    margin-bottom: 0;
}

.admin-form-group-user {
    flex: 1;
    min-width: 120px;
    margin-bottom: 0;
}

.admin-form-group-role {
    min-width: 80px;
    margin-bottom: 0;
}

.admin-retention-result {
    margin-top: 0.75rem;
}

.card-tight {
    padding-top: 0.9rem;
}

@media (max-width: 768px) {
    .layout-v2-content-wrap {
        padding: 1rem 0.8rem 1.1rem;
    }

    .page-header-v2 {
        padding-top: 0.55rem;
        padding-bottom: 0.65rem;
    }
}


.v2-skel-group {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.v2-skel-line {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #e5e7eb 20%, #f3f4f6 50%, #e5e7eb 80%);
  background-size: 200% 100%;
  animation: v2-skel-shimmer 1.2s ease-in-out infinite;
}

.v2-skel-line:nth-child(1) { width: 92%; }
.v2-skel-line:nth-child(2) { width: 84%; }
.v2-skel-line:nth-child(3) { width: 76%; }

@keyframes v2-skel-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}


.ui-settings-theme-controls {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4, 16px);
    align-items: flex-end;
}

.ui-settings-theme-field {
    min-width: 240px;
    max-width: 360px;
}

.ui-settings-theme-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

#theme-picker-message {
    margin-top: var(--space-3);
}


.v2-last-refreshed { margin-top: 6px; }


@media (max-width: 900px) {
    .ws-card {
        flex-direction: column;
    }

    .ws-card-actions {
        align-self: flex-end;
    }
}

.admin-connectors-shell {
    max-width: 100%;
    overflow: hidden;
}

.admin-connectors-card-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 100%;
}

.admin-connectors-card {
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 14px 16px;
    background: #fff;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.admin-connectors-card-heading {
    margin-bottom: 10px;
}

.admin-connectors-card-title {
    margin: 0;
    font-size: 16px;
}

.admin-connectors-card-id {
    margin: 4px 0 0 0;
    font-size: 12px;
}

.admin-connectors-provider-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-connectors-provider-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
    border-top: 1px solid #f1f5f9;
    padding-top: 10px;
}

.admin-connectors-provider-row:first-child {
    border-top: 0;
    padding-top: 0;
}

.admin-connectors-provider-meta {
    min-width: 0;
    flex: 1 1 280px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-connectors-provider-name {
    font-weight: 600;
}

.admin-connectors-provider-details,
.admin-connectors-provider-error {
    font-size: 12px;
}

.admin-connectors-provider-error {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.admin-connectors-copy-btn {
    flex: 0 0 auto;
}

.admin-connectors-empty {
    margin: 0;
}

.admin-platform-tokens-create-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.admin-platform-tokens-shell,
.admin-platform-tokens-card-stack,
.admin-platform-token-card {
    max-width: 100%;
}

.admin-platform-tokens-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.admin-platform-tokens-title {
    margin: 0;
    font-size: 16px;
}

.admin-platform-tokens-card-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
}

.admin-platform-token-card {
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 14px 16px;
    background: #fff;
}

.admin-platform-token-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-platform-token-title-wrap {
    display: flex;
    gap: 8px;
    align-items: center;
    min-width: 0;
}

.admin-platform-token-title {
    margin: 0;
    font-size: 16px;
    overflow-wrap: anywhere;
}

.admin-platform-token-actions {
    margin-left: auto;
}

.admin-platform-token-meta {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-platform-token-meta-row {
    font-size: 12px;
}

.admin-platform-token-meta-label {
    font-weight: 600;
}

.matter-banner {
    margin-bottom: 12px;
    border-radius: 8px;
    padding: 10px 12px;
    border: 1px solid transparent;
    font-size: 13px;
}

.matter-banner-info,
.matter-banner-processing {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e3a8a;
}

.matter-banner-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.matter-banner-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.upload-slot {
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.upload-slot.drag-over {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
    background: #eff6ff;
}

.upload-slot:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.upload-slot-uploading {
    border-color: #93c5fd;
}

.upload-progress {
    position: relative;
    margin: 8px 0;
    border-radius: 999px;
    background: #e5e7eb;
    height: 14px;
    overflow: hidden;
}

.upload-progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #60a5fa, #2563eb);
    transition: width 0.2s ease;
}

.upload-progress-label {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #111827;
    font-size: 11px;
    font-weight: 600;
}

.skeleton-stack {
    display: grid;
    gap: 10px;
}

.skeleton-line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 37%, #f3f4f6 63%);
    background-size: 400% 100%;
    animation: skeleton-shimmer 1.4s ease infinite;
}

@keyframes skeleton-shimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

.preview-meta {
    margin-bottom: 8px;
}

.preview-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.activity-list {
    list-style: none;
    display: grid;
    gap: 10px;
    padding: 0;
    margin: 0;
}

.activity-list li {
    border-left: 2px solid #e5e7eb;
    padding-left: 10px;
}

/* =========================================================
   DEV / DEMO-2 visual differentiation
   Applies only to the second copy
   ========================================================= */

:root {
  --demo2-sidebar-bg: #f6e9ea;
  --demo2-sidebar-border: #ead2d5;
  --demo2-header-bg: #6e1f26;
  --demo2-header-bg-2: #5c1820;
  --demo2-header-text: #ffffff;
}

/* Left navigation / sidebar */
.sidebar,
[class*="sidebar"],
aside {
  background: var(--demo2-sidebar-bg) !important;
  border-right: 1px solid var(--demo2-sidebar-border) !important;
}

/* Top page header / hero bar */
.page-header,
.section-header,
.hero,
.card-hero,
[class*="page-header"],
[class*="hero"] {
  background: linear-gradient(180deg, var(--demo2-header-bg) 0%, var(--demo2-header-bg-2) 100%) !important;
  color: var(--demo2-header-text) !important;
}

/* Make header text stay readable */
.page-header h1,
.page-header h2,
.page-header h3,
.section-header h1,
.section-header h2,
.section-header h3,
.hero h1,
.hero h2,
.hero h3,
.card-hero h1,
.card-hero h2,
.card-hero h3,
[class*="page-header"] h1,
[class*="page-header"] h2,
[class*="hero"] h1,
[class*="hero"] h2 {
  color: #ffffff !important;
}

.page-header p,
.section-header p,
.hero p,
.card-hero p,
[class*="page-header"] p,
[class*="hero"] p {
  color: rgba(255, 255, 255, 0.92) !important;
}


.demo2-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: 6px auto 4px 0;
  padding: 3px 8px;
  border-radius: 999px;
  background: #6e1f26;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}



