/*
=======================================================================
THREESIXOH! DARK MODE AUDIT FIX v1
Final internal-shell dark-mode accessibility layer.

Goals:
  - Readable foreground/background contrast
  - Consistent text hierarchy
  - Preserve department identity
  - Preserve semantic success/warning/danger colors
  - Preserve specialized calendar appointment colors
  - Dark mode only
=======================================================================
*/


/* ===================================================================
   CORE PALETTE
   =================================================================== */

html[data-theme="dark"] body.tso-shell-enabled {
    --tso-bg:#0f172a;
    --tso-surface:#182235;
    --tso-line:#3b526b;
    --tso-line-strong:#58708c;

    --tso-text:#f8fafc;
    --tso-muted:#b8c5d6;

    --text:#f8fafc;
    --muted:#b8c5d6;
    --panel:#182235;
    --line:#3b526b;

    --tso-teal:#2dd4bf;
    --tso-teal-dark:#5eead4;
    --tso-orange:#fbbf24;
    --tso-success:#86efac;
    --tso-warning:#fde68a;
    --tso-danger:#fda4af;

    background:#0f172a !important;
    color:#e7eef8 !important;
}


/* ===================================================================
   BRIGHTER DEPARTMENT COLORS FOR DARK SURFACES
   =================================================================== */

html[data-theme="dark"] body.tso-shell-enabled[data-tso-module^="customer"],
html[data-theme="dark"] body.tso-shell-enabled[data-tso-module^="document"] {
    --tso-module:#5eead4;
}

html[data-theme="dark"] body.tso-shell-enabled[data-tso-module^="sales"] {
    --tso-module:#fde68a;
}

html[data-theme="dark"] body.tso-shell-enabled[data-tso-module^="production"],
html[data-theme="dark"] body.tso-shell-enabled[data-tso-module^="field"] {
    --tso-module:#86efac;
}

html[data-theme="dark"] body.tso-shell-enabled[data-tso-module^="report"] {
    --tso-module:#a5b4fc;
}

html[data-theme="dark"] body.tso-shell-enabled[data-tso-module^="admin"],
html[data-theme="dark"] body.tso-shell-enabled[data-tso-module^="setting"] {
    --tso-module:#c4b5fd;
}

html[data-theme="dark"] body.tso-shell-enabled[data-tso-module^="alert"],
html[data-theme="dark"] body.tso-shell-enabled[data-tso-module^="warranty"],
html[data-theme="dark"] body.tso-shell-enabled[data-tso-module^="service"] {
    --tso-module:#fda4af;
}


/* ===================================================================
   GLOBAL TEXT HIERARCHY
   =================================================================== */

html[data-theme="dark"] body.tso-shell-enabled :where(
    h1,h2,h3,h4,h5,h6,
    .page-title,
    .section-title,
    .tso-record-title,
    .tso-sales-record-title,
    .tso-production-record-title
) {
    color:#f8fafc !important;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    small,
    .muted,
    .field-help,
    .address-lookup-status,
    .tso-record-subtitle,
    .tso-sales-record-subtitle,
    .tso-production-record-subtitle
) {
    color:#b8c5d6 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .panel strong {
    color:#f8fafc !important;
}

html[data-theme="dark"] body.tso-shell-enabled .panel p {
    color:#c0ccda;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .tso-eyebrow,
    .eyebrow
) {
    color:var(--tso-module,#5eead4) !important;
}

html[data-theme="dark"] body.tso-shell-enabled a:not(.button) {
    color:#67e8f9;
}

html[data-theme="dark"] body.tso-shell-enabled a:not(.button):hover {
    color:#cffafe;
}


/* ===================================================================
   CORE PANELS / CARDS
   =================================================================== */

html[data-theme="dark"] body.tso-shell-enabled :where(
    .panel,
    section.panel,
    .card,
    .record-card,
    .dashboard-card,
    .job-card
) {
    background:#182235 !important;
    border-color:#3b526b !important;
    color:#e7eef8 !important;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .tso-panel-heading,
    .section-head,
    .panel-head,
    .tso-card-head,
    .tso-sales-panel-head,
    .tso-production-panel-head,
    .reporting-section-head
) h2 {
    color:#f8fafc !important;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .tso-panel-heading,
    .section-head,
    .panel-head,
    .tso-card-head,
    .tso-sales-panel-head,
    .tso-production-panel-head,
    .reporting-section-head
) p {
    color:#b8c5d6 !important;
}


/* ===================================================================
   KPI / METRIC CARDS
   =================================================================== */

html[data-theme="dark"] body.tso-shell-enabled :where(
    .stat,
    .stat-card,
    .metric-card,
    .tso-kpi-card,
    .tso-dashboard-card,
    .tso-record-kpi,
    .tso-sales-kpi,
    .tso-production-kpi,
    .reporting-snapshot-card,
    .reporting-metric-card,
    .financial-tile,
    .payment-summary-card,
    .closeout-card,
    .warranty-summary-card,
    .quality-card,
    .role-summary-grid article,
    .tso-calendar360-stats article
) {
    background:#223149 !important;
    border-color:#415b78 !important;
    color:#f8fafc !important;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .stat,
    .stat-card,
    .metric-card,
    .tso-record-kpi,
    .tso-sales-kpi,
    .tso-production-kpi,
    .reporting-snapshot-card,
    .reporting-metric-card,
    .financial-tile,
    .payment-summary-card,
    .closeout-card,
    .warranty-summary-card,
    .quality-card
) > strong {
    color:#f8fafc !important;
    opacity:1 !important;
    text-shadow:none !important;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .stat,
    .stat-card,
    .metric-card,
    .tso-record-kpi,
    .tso-sales-kpi,
    .tso-production-kpi,
    .reporting-snapshot-card,
    .reporting-metric-card,
    .financial-tile,
    .payment-summary-card,
    .closeout-card,
    .warranty-summary-card,
    .quality-card
) > span {
    color:#c0ccda !important;
    opacity:1 !important;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .stat,
    .stat-card,
    .metric-card,
    .tso-record-kpi,
    .tso-sales-kpi,
    .tso-production-kpi,
    .reporting-snapshot-card,
    .reporting-metric-card
) > small {
    color:#b8c5d6 !important;
    opacity:1 !important;
}


/* ===================================================================
   CUSTOMER 360 / PROPERTY / RECORD DETAIL
   =================================================================== */

html[data-theme="dark"] body.tso-shell-enabled .tso-record-contact-line {
    color:#c0ccda !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-record-contact-line a {
    color:#5eead4 !important;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .tso-related-row,
    .tso-document-row,
    .tso-next-appointment,
    .tso-customer-summary-card,
    .tso-property-card,
    .tso-note,
    .tso-task-item,
    .tso-inline-create
) {
    background:#14243a !important;
    border-color:#38516f !important;
    color:#e7eef8 !important;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .tso-related-row,
    .tso-document-row,
    .tso-next-appointment,
    .tso-customer-summary-card,
    .tso-property-card
):hover {
    background:#1d324d !important;
    border-color:#506d8d !important;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .tso-related-copy strong,
    .tso-document-row strong,
    .tso-next-appointment strong,
    .tso-customer-summary-card strong,
    .tso-property-card strong,
    .tso-note strong,
    .tso-task-item strong
) {
    color:#f8fafc !important;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .tso-related-copy small,
    .tso-document-row small,
    .tso-next-appointment small,
    .tso-customer-summary-card small,
    .tso-property-card small,
    .tso-note small,
    .tso-task-item small
) {
    color:#b8c5d6 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-fact-list dt {
    color:#aebdd0 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-fact-list dd {
    color:#f1f5f9 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-fact-list > div {
    border-color:#38516f !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-record-empty {
    background:#102039 !important;
    border-color:#3b526b !important;
    color:#b8c5d6 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-record-empty strong {
    color:#f1f5f9 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-record-empty p {
    color:#b8c5d6 !important;
}


/* ===================================================================
   CUSTOMER TIMELINE
   =================================================================== */

html[data-theme="dark"] body.tso-shell-enabled .tso-timeline-panel {
    background:#182235 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-timeline-event {
    border-color:#38516f !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-timeline-time {
    color:#aebdd0 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-timeline-event-head strong {
    color:#f8fafc !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-timeline-category {
    color:var(--tso-module,#cbd5e1) !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-timeline-content p {
    color:#d3dce8 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-timeline-content small {
    color:#b8c5d6 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-timeline-rail::after {
    background:#415b78 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-timeline-filters a {
    background:#24344c !important;
    border-color:#496581 !important;
    color:#d8e1ed !important;
    text-decoration:none !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-timeline-filters a:hover {
    background:#304965 !important;
    color:#ffffff !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-timeline-filters a.active {
    background:#f8fafc !important;
    border-color:#f8fafc !important;
    color:#0f172a !important;
}


/* ===================================================================
   CHIPS / BADGES
   =================================================================== */

html[data-theme="dark"] body.tso-shell-enabled :where(
    .badge,
    .tso-stage-chip,
    .tso-soft-chip,
    .accounting-status,
    .payment-progress,
    .collection-status,
    .aging-badge,
    .transaction-status,
    .closeout-progress,
    .closeout-status,
    .warranty-status,
    .quality-status,
    .exception-status
) {
    background:#273951 !important;
    border-color:#526d8c !important;
    color:#e7eef8 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-lifecycle-badge {
    background:#123c3a !important;
    border-color:#2dd4bf !important;
    color:#99f6e4 !important;
}


/* Success */

html[data-theme="dark"] body.tso-shell-enabled :where(
    .status-confirmed,
    .status-completed,
    .status-synced,
    .status-succeeded,
    .status-ready-to-sync,
    .collection-status.Paid-in-Full,
    .transaction-status.Confirmed,
    .closeout-status.Ready-for-Accounting,
    .closeout-status.Accounting-Confirmed
) {
    background:#153b2c !important;
    border-color:#3f8a62 !important;
    color:#bbf7d0 !important;
}


/* Warning */

html[data-theme="dark"] body.tso-shell-enabled :where(
    .status-no-show,
    .status-pending,
    .status-processing,
    .collection-status.Payment-Plan,
    .collection-status.Follow-Up
) {
    background:#3b3018 !important;
    border-color:#8c6d28 !important;
    color:#fde68a !important;
}


/* Danger */

html[data-theme="dark"] body.tso-shell-enabled :where(
    .status-cancelled,
    .status-error,
    .collection-status.Disputed,
    .aging-badge.overdue
) {
    background:#3d2028 !important;
    border-color:#94505d !important;
    color:#fecdd3 !important;
}


/* ===================================================================
   FORMS
   =================================================================== */

html[data-theme="dark"] body.tso-shell-enabled input:not([type="checkbox"]):not([type="radio"]),
html[data-theme="dark"] body.tso-shell-enabled select,
html[data-theme="dark"] body.tso-shell-enabled textarea {
    background:#102039 !important;
    border-color:#526d8c !important;
    color:#f8fafc !important;
}

html[data-theme="dark"] body.tso-shell-enabled option {
    background:#102039 !important;
    color:#f8fafc !important;
}

html[data-theme="dark"] body.tso-shell-enabled input::placeholder,
html[data-theme="dark"] body.tso-shell-enabled textarea::placeholder {
    color:#9fb0c5 !important;
    opacity:1 !important;
}

html[data-theme="dark"] body.tso-shell-enabled label {
    color:#e7eef8 !important;
}

html[data-theme="dark"] body.tso-shell-enabled label small {
    color:#b8c5d6 !important;
}

html[data-theme="dark"] body.tso-shell-enabled input:focus,
html[data-theme="dark"] body.tso-shell-enabled select:focus,
html[data-theme="dark"] body.tso-shell-enabled textarea:focus {
    border-color:#2dd4bf !important;
    box-shadow:0 0 0 3px rgba(45,212,191,.18) !important;
    outline:none !important;
}

html[data-theme="dark"] body.tso-shell-enabled input:disabled,
html[data-theme="dark"] body.tso-shell-enabled select:disabled,
html[data-theme="dark"] body.tso-shell-enabled textarea:disabled,
html[data-theme="dark"] body.tso-shell-enabled input[readonly] {
    background:#18273b !important;
    color:#c0ccda !important;
    opacity:1 !important;
}


/* ===================================================================
   BUTTONS
   =================================================================== */

html[data-theme="dark"] body.tso-shell-enabled :where(
    .button,
    button
):not(.check):not(.link-button) {
    background:#20344d;
    border-color:#526d8c;
    color:#f8fafc;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .button,
    button
):not(.check):not(.link-button):hover {
    background:#2a4564;
    border-color:#6987a7;
    color:#ffffff;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .button.primary,
    button.primary,
    input[type="submit"].primary
) {
    background:#143d5c !important;
    border-color:#5680a1 !important;
    color:#ffffff !important;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .button.primary,
    button.primary,
    input[type="submit"].primary
):hover {
    background:#1a4d70 !important;
    border-color:#6c96b7 !important;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .button.danger,
    .danger-button
) {
    background:#521f2a !important;
    border-color:#b96774 !important;
    color:#ffe4e6 !important;
}


/* ===================================================================
   TABLES
   =================================================================== */

html[data-theme="dark"] body.tso-shell-enabled table {
    color:#e7eef8 !important;
}

html[data-theme="dark"] body.tso-shell-enabled thead th {
    background:#142239 !important;
    color:#cbd5e1 !important;
    border-color:#415b78 !important;
}

html[data-theme="dark"] body.tso-shell-enabled tbody td {
    color:#e2e8f0 !important;
    border-color:#344d68 !important;
}

html[data-theme="dark"] body.tso-shell-enabled tbody td small {
    color:#aebdd0 !important;
}

html[data-theme="dark"] body.tso-shell-enabled tbody tr:hover td {
    background:#1c3049 !important;
}


/* ===================================================================
   SALES / OPPORTUNITIES
   =================================================================== */

html[data-theme="dark"] body.tso-shell-enabled .tso-sales-column {
    background:#101d30 !important;
    border-color:#38516f !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-sales-column-head {
    background:#1b2d44 !important;
    border-color:#38516f !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-sales-column-head h2 {
    color:#f8fafc !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-opportunity-card {
    background:#223149 !important;
    border-color:#415b78 !important;
    color:#f8fafc !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-opportunity-card:hover {
    background:#2a405d !important;
    border-color:#5d7897 !important;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .tso-opportunity-card strong,
    .tso-opportunity-scope span,
    .tso-opportunity-followup strong,
    .tso-opportunity-value strong,
    .tso-appointment-date strong,
    .tso-sales-doc-card em
) {
    color:#f8fafc !important;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .tso-opportunity-card small,
    .tso-opportunity-scope small,
    .tso-opportunity-followup span,
    .tso-opportunity-value span,
    .tso-sales-appointment-chip small,
    .tso-sales-doc-card small
) {
    color:#b8c5d6 !important;
}


/* ===================================================================
   PRODUCTION / FIELD
   =================================================================== */

html[data-theme="dark"] body.tso-shell-enabled :where(
    .tso-production-column,
    .production-column
) {
    background:#101d30 !important;
    border-color:#38516f !important;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .tso-production-column-head,
    .production-column-head
) {
    background:#1b2d44 !important;
    border-color:#38516f !important;
    color:#f8fafc !important;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .tso-production-job-card,
    .job-card
) {
    background:#223149 !important;
    border-color:#415b78 !important;
    color:#f8fafc !important;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .tso-production-job-card,
    .job-card
):hover {
    background:#2a405d !important;
    border-color:#5d7897 !important;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .tso-production-job-card strong,
    .job-card strong,
    .tso-field-checkin-list strong,
    .tso-prod-day-row > div:first-child strong
) {
    color:#f8fafc !important;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .tso-production-job-card small,
    .job-card small,
    .tso-field-checkin-list p,
    .tso-field-checkin-list small,
    .tso-prod-day-row > div:first-child span
) {
    color:#b8c5d6 !important;
}


/* ===================================================================
   CALENDARS
   Do NOT replace individual appointment/status backgrounds.
   =================================================================== */

html[data-theme="dark"] body.tso-shell-enabled :where(
    .tso-calendar-scroll,
    .tso-month-calendar,
    .tso-week-calendar,
    .tso-day-calendar,
    .tso-agenda-calendar,
    .tso-prod-calendar-scroll,
    .tso-prod-month-calendar,
    .tso-prod-week-calendar,
    .tso-prod-day-calendar
) {
    border-color:#415b78 !important;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .tso-calendar-weekday,
    .tso-week-day-column > header,
    .tso-prod-calendar-weekday,
    .tso-prod-week-day > header
) {
    background:#162a42 !important;
    border-color:#415b78 !important;
    color:#cbd5e1 !important;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .tso-calendar-day-cell,
    .tso-week-day-column,
    .tso-prod-calendar-day-cell,
    .tso-prod-week-day
) {
    background:#18283f !important;
    border-color:#415b78 !important;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .tso-calendar-day-head a,
    .tso-week-day-column header a,
    .tso-prod-calendar-day-head a,
    .tso-prod-week-day header a
) {
    color:#f1f5f9 !important;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .tso-calendar-day-head span,
    .tso-week-day-column header span,
    .tso-week-day-column header small,
    .tso-prod-calendar-day-head span,
    .tso-prod-week-day header span,
    .tso-prod-week-day header small,
    .tso-calendar-empty
) {
    color:#aebdd0 !important;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .tso-calendar-appointment,
    .tso-day-appointment-row,
    .tso-agenda-row,
    .tso-prod-calendar-event,
    .tso-prod-day-row,
    .tso-prod-agenda-row
) {
    color:#f8fafc !important;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .tso-calendar-appointment small,
    .tso-day-appointment-row small,
    .tso-agenda-row small,
    .tso-prod-calendar-event small,
    .tso-prod-day-row small,
    .tso-prod-agenda-row small
) {
    color:#b8c5d6 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-day-appointment-time strong {
    color:#f8fafc !important;
}


/* ===================================================================
   SMART SCHEDULING
   =================================================================== */

html[data-theme="dark"] body.tso-shell-enabled :where(
    .smart-scheduling,
    .fixed-sales-slot-picker,
    .fixed-sales-slot-picker-v2
) {
    background:#13263e !important;
    border-color:#466985 !important;
    color:#e7eef8 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .smart-scheduling-head strong {
    color:#93c5fd !important;
}

html[data-theme="dark"] body.tso-shell-enabled .smart-scheduling-head small,
html[data-theme="dark"] body.tso-shell-enabled .smart-scheduling-status,
html[data-theme="dark"] body.tso-shell-enabled .smart-suggestion-meta span,
html[data-theme="dark"] body.tso-shell-enabled .smart-suggestion-foot {
    color:#b8c5d6 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .smart-suggestion-card {
    background:#1c3049 !important;
    border-color:#496581 !important;
    color:#f8fafc !important;
}

html[data-theme="dark"] body.tso-shell-enabled .smart-suggestion-card:hover {
    background:#274361 !important;
    border-color:#7ca8d4 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .smart-suggestion-card.selected {
    background:#153b2c !important;
    border-color:#4ade80 !important;
}


/* ===================================================================
   HANDOFF
   =================================================================== */

html[data-theme="dark"] body.tso-shell-enabled :where(
    .tso-handoff-card,
    .handoff-status-banner,
    .handoff-summary-grid > div,
    .handoff-readonly-grid > div,
    .handoff-queue-card,
    .accepted-handoff-history,
    .inset-panel,
    .review-item
) {
    background:#18283f !important;
    border-color:#415b78 !important;
    color:#e7eef8 !important;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .tso-handoff-card,
    .handoff-status-banner,
    .handoff-summary-grid > div,
    .handoff-readonly-grid > div,
    .handoff-queue-card,
    .accepted-handoff-history,
    .review-item
) :where(p,span,small) {
    color:#b8c5d6 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .handoff-source-status .source-ok,
html[data-theme="dark"] body.tso-shell-enabled .correction-card.resolved,
html[data-theme="dark"] body.tso-shell-enabled .tso-handoff-summary-card.is-ready {
    background:#153b2c !important;
    border-color:#3f8a62 !important;
    color:#bbf7d0 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .handoff-source-status .source-missing,
html[data-theme="dark"] body.tso-shell-enabled .correction-card.open {
    background:#3d2028 !important;
    border-color:#94505d !important;
    color:#fecdd3 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .correction-card {
    background:#3b3018 !important;
    border-color:#8c6d28 !important;
    color:#fde68a !important;
}


/* ===================================================================
   REPORTING
   =================================================================== */

html[data-theme="dark"] body.tso-shell-enabled :where(
    .reporting-snapshot-card,
    .reporting-metric-card,
    .reporting-dataset-card,
    .report-builder-step,
    .report-field-option,
    .report-filter-row
) {
    background:#223149 !important;
    border-color:#415b78 !important;
    color:#f8fafc !important;
}

html[data-theme="dark"] body.tso-shell-enabled .reporting-dataset-card:hover {
    background:#2a405d !important;
    border-color:#6f8cac !important;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .reporting-snapshot-card strong,
    .reporting-metric-card strong,
    .reporting-dataset-card h3
) {
    color:#f8fafc !important;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .reporting-snapshot-card span,
    .reporting-metric-card span,
    .reporting-dataset-card p,
    .reporting-dataset-card small,
    .reporting-breadcrumb
) {
    color:#b8c5d6 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .reporting-module-label {
    background:#2a3156 !important;
    border-color:#6674aa !important;
    color:#c7d2fe !important;
}

html[data-theme="dark"] body.tso-shell-enabled .reporting-definition-note {
    background:#173451 !important;
    border-color:#4d7299 !important;
    color:#dbeafe !important;
}


/* ===================================================================
   ACCOUNTING
   =================================================================== */

html[data-theme="dark"] body.tso-shell-enabled .accounting-banner {
    background:#3b3018 !important;
    border-color:#8c6d28 !important;
    color:#fde68a !important;
}

html[data-theme="dark"] body.tso-shell-enabled .accounting-banner p {
    color:#fde68a !important;
}

html[data-theme="dark"] body.tso-shell-enabled .accounting-stat-grid .stat-card {
    background:#223149 !important;
    border-color:#415b78 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .accounting-stat-grid strong {
    color:#f8fafc !important;
}

html[data-theme="dark"] body.tso-shell-enabled .accounting-stat-grid :where(span,small) {
    color:#b8c5d6 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .readiness-list li {
    background:#18283f !important;
    border-color:#415b78 !important;
    color:#e7eef8 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .readiness-list li.ready {
    background:#153b2c !important;
    border-color:#3f8a62 !important;
    color:#bbf7d0 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .readiness-list li.missing {
    background:#3b3018 !important;
    border-color:#8c6d28 !important;
    color:#fde68a !important;
}


/* ===================================================================
   CLOSEOUT / FINAL PAPERWORK
   =================================================================== */

html[data-theme="dark"] body.tso-shell-enabled :where(
    .closeout-card,
    .financial-tile,
    .closeout-state-banner > div,
    .closeout-requirement
) {
    background:#223149 !important;
    border-color:#415b78 !important;
    color:#f8fafc !important;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .closeout-card,
    .financial-tile,
    .closeout-state-banner
) span {
    color:#b8c5d6 !important;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .closeout-card,
    .financial-tile,
    .closeout-state-banner
) strong {
    color:#f8fafc !important;
}

html[data-theme="dark"] body.tso-shell-enabled .closeout-card.warning,
html[data-theme="dark"] body.tso-shell-enabled .closeout-requirement.missing {
    background:#3b3018 !important;
    border-color:#8c6d28 !important;
    color:#fde68a !important;
}

html[data-theme="dark"] body.tso-shell-enabled .closeout-card.ready,
html[data-theme="dark"] body.tso-shell-enabled .closeout-requirement.complete,
html[data-theme="dark"] body.tso-shell-enabled .financial-tile.balanced {
    background:#153b2c !important;
    border-color:#3f8a62 !important;
    color:#bbf7d0 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .financial-tile.variance {
    background:#3d2028 !important;
    border-color:#94505d !important;
    color:#fecdd3 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .financial-tile.emphasis {
    background:#173451 !important;
    border-color:#4d7299 !important;
    color:#dbeafe !important;
}


/* ===================================================================
   PAYMENT COLLECTIONS
   =================================================================== */

html[data-theme="dark"] body.tso-shell-enabled :where(
    .payment-summary-card,
    .payment-state-banner > div,
    .payment-financial-grid .financial-tile,
    .payment-requirement,
    .inline-entry-form
) {
    background:#223149 !important;
    border-color:#415b78 !important;
    color:#f8fafc !important;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .payment-summary-card,
    .payment-state-banner,
    .payment-financial-grid .financial-tile
) span {
    color:#b8c5d6 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .payment-summary-card.warning,
html[data-theme="dark"] body.tso-shell-enabled .payment-requirement.missing {
    background:#3b3018 !important;
    border-color:#8c6d28 !important;
    color:#fde68a !important;
}

html[data-theme="dark"] body.tso-shell-enabled .payment-summary-card.danger {
    background:#3d2028 !important;
    border-color:#94505d !important;
    color:#fecdd3 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .payment-summary-card.success,
html[data-theme="dark"] body.tso-shell-enabled .payment-requirement.complete,
html[data-theme="dark"] body.tso-shell-enabled .payment-state-banner.Paid-in-Full > div,
html[data-theme="dark"] body.tso-shell-enabled .paid-in-full-confirmation {
    background:#153b2c !important;
    border-color:#3f8a62 !important;
    color:#bbf7d0 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .payment-summary-card.emphasis {
    background:#173451 !important;
    border-color:#4d7299 !important;
    color:#dbeafe !important;
}


/* ===================================================================
   WARRANTY
   =================================================================== */

html[data-theme="dark"] body.tso-shell-enabled :where(
    .warranty-summary-card,
    .warranty-state-banner > div,
    .warranty-requirement,
    .warranty-registration-card,
    .warranty-info-grid > div,
    .warranty-upload-grid form,
    .warranty-add-registration
) {
    background:#223149 !important;
    border-color:#415b78 !important;
    color:#f8fafc !important;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .warranty-summary-card,
    .warranty-state-banner,
    .warranty-info-grid,
    .warranty-registration-card
) :where(span,small,p) {
    color:#b8c5d6 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .warranty-requirement.complete {
    background:#153b2c !important;
    border-color:#3f8a62 !important;
    color:#bbf7d0 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .warranty-requirement.missing {
    background:#3b3018 !important;
    border-color:#8c6d28 !important;
    color:#fde68a !important;
}


/* ===================================================================
   PRODUCTION QUALITY
   =================================================================== */

html[data-theme="dark"] body.tso-shell-enabled :where(
    .quality-card,
    .quality-item,
    .punch-item,
    .signature-box,
    .quality-requirement
) {
    background:#223149 !important;
    border-color:#415b78 !important;
    color:#f8fafc !important;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .quality-card,
    .quality-item,
    .punch-item
) :where(p,span,small) {
    color:#b8c5d6 !important;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .quality-item.fail,
    .punch-item.overdue
) {
    background:#3d2028 !important;
    border-color:#94505d !important;
    color:#fecdd3 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .quality-item.pass,
html[data-theme="dark"] body.tso-shell-enabled .quality-requirement.complete {
    background:#153b2c !important;
    border-color:#3f8a62 !important;
    color:#bbf7d0 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .quality-item.pending,
html[data-theme="dark"] body.tso-shell-enabled .quality-requirement.missing {
    background:#3b3018 !important;
    border-color:#8c6d28 !important;
    color:#fde68a !important;
}


/*
Signature canvases intentionally remain white because the signature ink
is rendered dark and must remain visible.
*/

html[data-theme="dark"] body.tso-shell-enabled .signature-pad {
    background:#ffffff !important;
    border-color:#94a3b8 !important;
}


/* ===================================================================
   PRODUCTION EXCEPTIONS / CHANGE ORDERS
   =================================================================== */

html[data-theme="dark"] body.tso-shell-enabled :where(
    .exception-card,
    .exception-record,
    .exception-impact > div
) {
    background:#223149 !important;
    border-color:#415b78 !important;
    color:#f8fafc !important;
}

html[data-theme="dark"] body.tso-shell-enabled .exception-impact span {
    color:#b8c5d6 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .share-link-box {
    background:#173451 !important;
    border-color:#4d7299 !important;
    color:#dbeafe !important;
}


/* ===================================================================
   REQUIREMENTS
   =================================================================== */

html[data-theme="dark"] body.tso-shell-enabled .requirement-list-toggle {
    background:#18283f !important;
    border-color:#415b78 !important;
    color:#f8fafc !important;
}

html[data-theme="dark"] body.tso-shell-enabled .requirement-list-toggle:hover {
    background:#243a55 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .requirement-action.secondary {
    background:#223149 !important;
    border-color:#526d8c !important;
    color:#bfdbfe !important;
}

html[data-theme="dark"] body.tso-shell-enabled .requirement-inline-help {
    background:#3b3018 !important;
    border-color:#8c6d28 !important;
    color:#fde68a !important;
}


/* ===================================================================
   ADMIN / SETTINGS
   =================================================================== */

html[data-theme="dark"] body.tso-shell-enabled .settings-card {
    background:#223149 !important;
    border-color:#415b78 !important;
    color:#f8fafc !important;
}

html[data-theme="dark"] body.tso-shell-enabled .settings-card:hover {
    background:#2a405d !important;
    border-color:#637f9f !important;
}

html[data-theme="dark"] body.tso-shell-enabled .settings-card :where(
    strong,h2,h3
) {
    color:#f8fafc !important;
}

html[data-theme="dark"] body.tso-shell-enabled .settings-card :where(
    p,small,span
) {
    color:#b8c5d6 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .role-permission-scroll {
    background:#18283f !important;
    border-color:#415b78 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .role-permission-table tbody th,
html[data-theme="dark"] body.tso-shell-enabled .role-permission-table .permission-name-column {
    background:#1b2d44 !important;
    color:#f8fafc !important;
    border-color:#415b78 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .role-permission-actions {
    background:rgba(24,40,63,.97) !important;
    border-color:#415b78 !important;
}


/* ===================================================================
   FEEDBACK / BUG REPORTING
   =================================================================== */

html[data-theme="dark"] body.tso-shell-enabled .feedback-card,
html[data-theme="dark"] body.tso-shell-enabled .feedback-attachment-card,
html[data-theme="dark"] body.tso-shell-enabled .feedback-timeline article {
    background:#223149 !important;
    border-color:#415b78 !important;
    color:#f8fafc !important;
}

html[data-theme="dark"] body.tso-shell-enabled .feedback-card strong,
html[data-theme="dark"] body.tso-shell-enabled .feedback-timeline strong {
    color:#f8fafc !important;
}

html[data-theme="dark"] body.tso-shell-enabled .feedback-card small,
html[data-theme="dark"] body.tso-shell-enabled .feedback-timeline small,
html[data-theme="dark"] body.tso-shell-enabled .feedback-privacy-note {
    color:#b8c5d6 !important;
}


/* ===================================================================
   NOTIFICATIONS / ALERTS
   Works even if module-alerts is not present on body.
   =================================================================== */

html[data-theme="dark"] body.tso-shell-enabled .notification-row {
    background:#18283f !important;
    border-color:#415b78 !important;
    color:#e7eef8 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-alert-title {
    color:#f8fafc !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-alert-body {
    color:#d3dce8 !important;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .tso-alert-meta,
    .tso-alert-detail-line
) {
    color:#b8c5d6 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-alert-dismiss {
    background:#243951 !important;
    border-color:#526d8c !important;
    color:#dbe5ef !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-alert-dismiss:hover {
    background:#304a68 !important;
    color:#ffffff !important;
}


/* ===================================================================
   LEGACY / SECONDARY SURFACES
   =================================================================== */

html[data-theme="dark"] body.tso-shell-enabled :where(
    .mapping-item,
    .job-summary-grid > div,
    .schedule-strip > div,
    .inline-entry-form,
    .readiness-item,
    .queue-summary span,
    .saved-view,
    .save-view-form,
    .mfa-qr-card,
    .mfa-manual-setup,
    .details-card
) {
    background:#18283f !important;
    border-color:#415b78 !important;
    color:#e7eef8 !important;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .mapping-item,
    .job-summary-grid > div,
    .schedule-strip > div,
    .readiness-item,
    .details-card
) :where(span,small,p) {
    color:#b8c5d6 !important;
}


/* ===================================================================
   WARNING / SUCCESS / ERROR SURFACES
   =================================================================== */

html[data-theme="dark"] body.tso-shell-enabled :where(
    .warning-box,
    .confirm-duplicate,
    .tso-production-warning,
    .tso-qualification-warning,
    .tso-handoff-warning
) {
    background:#3b3018 !important;
    border-color:#8c6d28 !important;
    color:#fde68a !important;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .warning-box,
    .confirm-duplicate,
    .tso-production-warning,
    .tso-qualification-warning,
    .tso-handoff-warning
) :where(strong,p,span,small) {
    color:inherit !important;
}

html[data-theme="dark"] body.tso-shell-enabled .flash {
    background:#153b2c !important;
    border-color:#3f8a62 !important;
    color:#bbf7d0 !important;
}

html[data-theme="dark"] body.tso-shell-enabled .flash.error {
    background:#3d2028 !important;
    border-color:#94505d !important;
    color:#fecdd3 !important;
}


/* ===================================================================
   CODE / PREFORMATTED DATA
   =================================================================== */

html[data-theme="dark"] body.tso-shell-enabled :where(
    pre,code
) {
    background:#0b1627 !important;
    border-color:#38516f !important;
    color:#dbeafe !important;
}


/* ===================================================================
   EMPTY STATES
   =================================================================== */

html[data-theme="dark"] body.tso-shell-enabled :where(
    .tso-empty-state,
    .tso-record-empty,
    .tso-production-empty,
    .tso-sales-empty,
    .empty-state,
    .empty-column
) {
    background:#102039 !important;
    border-color:#415b78 !important;
    color:#b8c5d6 !important;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .tso-empty-state,
    .tso-record-empty,
    .tso-production-empty,
    .tso-sales-empty,
    .empty-state,
    .empty-column
) strong {
    color:#f1f5f9 !important;
}


/* ===================================================================
   DROPDOWNS / NAVIGATION POPUPS
   =================================================================== */

html[data-theme="dark"] body.tso-shell-enabled .nav-dropdown {
    background:#18283f !important;
    border-color:#526d8c !important;
    color:#f8fafc !important;
}

html[data-theme="dark"] body.tso-shell-enabled .nav-dropdown :where(
    a,strong
) {
    color:#f8fafc !important;
}

html[data-theme="dark"] body.tso-shell-enabled .nav-dropdown :where(
    p,small,.muted
) {
    color:#b8c5d6 !important;
}


/* ===================================================================
   TOPBAR
   =================================================================== */

html[data-theme="dark"] body.tso-shell-enabled .tso-app-topbar {
    background:rgba(19,34,54,.98) !important;
    border-color:#38516f !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-topbar-copy strong,
html[data-theme="dark"] body.tso-shell-enabled .tso-topbar-copy-text strong,
html[data-theme="dark"] body.tso-shell-enabled .tso-user-chip strong {
    color:#f8fafc !important;
}

html[data-theme="dark"] body.tso-shell-enabled .tso-topbar-copy span,
html[data-theme="dark"] body.tso-shell-enabled .tso-topbar-copy-text span,
html[data-theme="dark"] body.tso-shell-enabled .tso-user-chip small {
    color:#b8c5d6 !important;
}

html[data-theme="dark"] body.tso-shell-enabled :where(
    .tso-topbar-icon,
    .tso-user-chip,
    .tso-mobile-nav-toggle
) {
    background:#18283f !important;
    border-color:#415b78 !important;
    color:#f8fafc !important;
}


/* ===================================================================
   FOCUS VISIBILITY
   =================================================================== */

html[data-theme="dark"] body.tso-shell-enabled :where(
    a,
    button,
    input,
    select,
    textarea,
    summary
):focus-visible {
    outline:2px solid #5eead4 !important;
    outline-offset:2px !important;
}


/* ===================================================================
   DISABLED CONTENT
   =================================================================== */

html[data-theme="dark"] body.tso-shell-enabled :where(
    button:disabled,
    .disabled,
    .inactive
) {
    opacity:.72;
}


/* ===================================================================
   ACCESSIBLE SCROLLBARS
   =================================================================== */

html[data-theme="dark"] body.tso-shell-enabled {
    scrollbar-color:#58708c #0b1627;
}

html[data-theme="dark"] body.tso-shell-enabled ::-webkit-scrollbar-track {
    background:#0b1627;
}

html[data-theme="dark"] body.tso-shell-enabled ::-webkit-scrollbar-thumb {
    background:#58708c;
}


/* THREESIXOH_HANDOFF_DARK_COMPLETION_V2_START */

/*
=======================================================================
HANDOFF LEGACY READINESS COMPONENTS
=======================================================================
The handoff screen contains both newer review-item markup and older
requirement-row markup. Dark mode must cover both.
=======================================================================
*/


/* ----------------------------------------------------------------
   HANDOFF STATUS / PROGRESS BANNER
   ---------------------------------------------------------------- */

html[data-theme="dark"]
body.tso-shell-enabled
.handoff-status-banner {
    background:#18283f !important;
    border-color:#415b78 !important;
    color:#e7eef8 !important;

    box-shadow:none !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.handoff-status-banner strong,
html[data-theme="dark"]
body.tso-shell-enabled
.handoff-status-banner h2,
html[data-theme="dark"]
body.tso-shell-enabled
.handoff-status-banner h3 {
    color:#f8fafc !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.handoff-status-banner p,
html[data-theme="dark"]
body.tso-shell-enabled
.handoff-status-banner small,
html[data-theme="dark"]
body.tso-shell-enabled
.handoff-status-banner span:not(.badge) {
    color:#b8c5d6 !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.handoff-progress {
    background:#0b182a !important;
    border:1px solid #38516f !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.handoff-progress > span {
    background:linear-gradient(
        90deg,
        #2dd4bf,
        #67e8f9
    ) !important;
}


/* ----------------------------------------------------------------
   WARNING / NEXT REQUIRED ACTION
   ---------------------------------------------------------------- */

html[data-theme="dark"]
body.tso-shell-enabled
.handoff-status-banner + .panel,

html[data-theme="dark"]
body.tso-shell-enabled
.handoff-alert,

html[data-theme="dark"]
body.tso-shell-enabled
.warning-panel {
    background:#18283f !important;
    border-color:#526b86 !important;
    color:#e7eef8 !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.warning-panel strong {
    color:#fde68a !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.warning-panel p,
html[data-theme="dark"]
body.tso-shell-enabled
.warning-panel small {
    color:#c7d3e1 !important;
}


/* ----------------------------------------------------------------
   CRITICAL MISSING ITEMS OUTER PANEL
   ---------------------------------------------------------------- */

html[data-theme="dark"]
body.tso-shell-enabled
.handoff-review-panel {
    background:#17273e !important;
    border-color:#536d89 !important;
    color:#e7eef8 !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.handoff-review-panel
.section-head {
    background:#122138 !important;
    border-color:#415b78 !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.handoff-review-panel
.section-head h2,

html[data-theme="dark"]
body.tso-shell-enabled
.handoff-review-panel
.section-head h3 {
    color:#f8fafc !important;
}


/* ----------------------------------------------------------------
   LEGACY REQUIREMENT LIST
   This is the large white area visible in the screenshot.
   ---------------------------------------------------------------- */

html[data-theme="dark"]
body.tso-shell-enabled
.handoff-requirement-list {
    background:#101e32 !important;

    border:1px solid #344d68 !important;
    border-radius:9px !important;

    padding:8px !important;

    color:#e7eef8 !important;

    scrollbar-color:#5d7897 #101e32 !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.handoff-requirement-list
.requirement-row {
    display:flex !important;

    align-items:center !important;

    gap:10px !important;

    margin:0 0 7px !important;

    padding:10px 11px !important;

    background:#1b2d45 !important;

    border:1px solid #3f5874 !important;
    border-radius:8px !important;

    color:#e7eef8 !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.handoff-requirement-list
.requirement-row:last-child {
    margin-bottom:0 !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.handoff-requirement-list
.requirement-row:first-of-type {
    border-top:1px solid #3f5874 !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.requirement-row strong {
    color:#f8fafc !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.requirement-row p,

html[data-theme="dark"]
body.tso-shell-enabled
.requirement-row small,

html[data-theme="dark"]
body.tso-shell-enabled
.requirement-row span:not(.requirement-icon) {
    color:#b8c5d6 !important;
}


/* Missing requirement indicator */

html[data-theme="dark"]
body.tso-shell-enabled
.requirement-icon.missing {
    background:#522732 !important;
    border:1px solid #9f5967 !important;
    color:#fecdd3 !important;
}


/* Completed requirement indicator */

html[data-theme="dark"]
body.tso-shell-enabled
.requirement-icon.passed {
    background:#153b2c !important;
    border:1px solid #3f8a62 !important;
    color:#bbf7d0 !important;
}


/* Buttons inside missing-item rows */

html[data-theme="dark"]
body.tso-shell-enabled
.handoff-requirement-list
.button,

html[data-theme="dark"]
body.tso-shell-enabled
.handoff-requirement-list
button {
    margin-left:auto !important;

    background:#193a57 !important;

    border-color:#597996 !important;

    color:#f8fafc !important;

    white-space:nowrap !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.handoff-requirement-list
.button:hover,

html[data-theme="dark"]
body.tso-shell-enabled
.handoff-requirement-list
button:hover {
    background:#24506f !important;

    border-color:#7fa0be !important;

    color:#ffffff !important;
}


/* ----------------------------------------------------------------
   NEWER REVIEW ITEM STRUCTURE
   Keep this covered as well.
   ---------------------------------------------------------------- */

html[data-theme="dark"]
body.tso-shell-enabled
.handoff-review-list {
    background:transparent !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.review-item {
    background:#1b2d45 !important;

    border-color:#3f5874 !important;

    color:#e7eef8 !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.review-item strong {
    color:#f8fafc !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.review-item p,

html[data-theme="dark"]
body.tso-shell-enabled
.review-item small {
    color:#b8c5d6 !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.review-item.complete {
    background:#153b2c !important;

    border-color:#3f8a62 !important;
}


/* ----------------------------------------------------------------
   READINESS GATE / SUMMARY CARDS
   ---------------------------------------------------------------- */

html[data-theme="dark"]
body.tso-shell-enabled
.handoff-overview-grid
> .panel,

html[data-theme="dark"]
body.tso-shell-enabled
.locked-handoff-panel,

html[data-theme="dark"]
body.tso-shell-enabled
.inset-panel {
    background:#17273e !important;

    border-color:#415b78 !important;

    color:#e7eef8 !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.handoff-summary-grid
> div,

html[data-theme="dark"]
body.tso-shell-enabled
.handoff-readonly-grid
> div {
    background:#1b2d45 !important;

    border-color:#415b78 !important;

    color:#e7eef8 !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.handoff-summary-grid strong,

html[data-theme="dark"]
body.tso-shell-enabled
.handoff-readonly-grid strong {
    color:#f8fafc !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.handoff-summary-grid span,

html[data-theme="dark"]
body.tso-shell-enabled
.handoff-readonly-grid span {
    color:#b8c5d6 !important;
}


/* ----------------------------------------------------------------
   SOURCE STATUS CARDS
   ---------------------------------------------------------------- */

html[data-theme="dark"]
body.tso-shell-enabled
.handoff-source-status
> div {
    background:#1b2d45 !important;

    border-color:#415b78 !important;

    color:#e7eef8 !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.handoff-source-status
.source-ok {
    background:#153b2c !important;

    border-color:#3f8a62 !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.handoff-source-status
.source-ok strong,

html[data-theme="dark"]
body.tso-shell-enabled
.handoff-source-status
.source-ok span {
    color:#bbf7d0 !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.handoff-source-status
.source-missing {
    background:#3d2028 !important;

    border-color:#94505d !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.handoff-source-status
.source-missing strong,

html[data-theme="dark"]
body.tso-shell-enabled
.handoff-source-status
.source-missing span {
    color:#fecdd3 !important;
}


/* ----------------------------------------------------------------
   HANDOFF FORM INPUT READABILITY
   ---------------------------------------------------------------- */

html[data-theme="dark"]
body.tso-shell-enabled
.handoff-form
input:not([type="checkbox"]):not([type="radio"]),

html[data-theme="dark"]
body.tso-shell-enabled
.handoff-form
select,

html[data-theme="dark"]
body.tso-shell-enabled
.handoff-form
textarea {
    background:#0f2036 !important;

    border-color:#526d8c !important;

    color:#f8fafc !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.handoff-form
option {
    background:#0f2036 !important;

    color:#f8fafc !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.handoff-form
input::placeholder,

html[data-theme="dark"]
body.tso-shell-enabled
.handoff-form
textarea::placeholder {
    color:#9fb0c5 !important;

    opacity:1 !important;
}


/* THREESIXOH_HANDOFF_DARK_COMPLETION_V2_END */


/* THREESIXOH_REQUIREMENT_NAVIGATOR_DARK_V1_START */

/*
=======================================================================
GLOBAL REQUIREMENT NAVIGATOR — DARK MODE
=======================================================================
This component is injected by requirements.js and styled by
requirements.css. It is separate from the handoff template's own
Readiness Gate.
=======================================================================
*/


/* ---------------------------------------------------------------
   OUTER NAVIGATOR
   --------------------------------------------------------------- */

html[data-theme="dark"]
body.tso-shell-enabled
.requirement-navigator {
    background:#15253b !important;

    border-color:#415b78 !important;

    color:#e7eef8 !important;

    box-shadow:
        0 8px 22px rgba(0,0,0,.18) !important;
}


/* ---------------------------------------------------------------
   HEADER
   --------------------------------------------------------------- */

html[data-theme="dark"]
body.tso-shell-enabled
.requirement-navigator-header {
    background:linear-gradient(
        180deg,
        #1b2d45,
        #17273e
    ) !important;

    border-color:#415b78 !important;

    color:#e7eef8 !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.requirement-navigator-heading h2 {
    color:#f8fafc !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.requirement-navigator-heading p {
    color:#b8c5d6 !important;
}


/* ---------------------------------------------------------------
   MAIN STATUS ICON
   --------------------------------------------------------------- */

html[data-theme="dark"]
body.tso-shell-enabled
.requirement-navigator-icon {
    background:#3b3018 !important;

    border-color:#8c6d28 !important;

    color:#fde68a !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.requirement-navigator.is-complete
.requirement-navigator-icon {
    background:#153b2c !important;

    border-color:#3f8a62 !important;

    color:#bbf7d0 !important;
}


/* ---------------------------------------------------------------
   COUNT BADGE
   --------------------------------------------------------------- */

html[data-theme="dark"]
body.tso-shell-enabled
.requirement-count-badge {
    background:#3d2028 !important;

    border:1px solid #94505d !important;

    color:#fecdd3 !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.requirement-navigator.is-complete
.requirement-count-badge {
    background:#153b2c !important;

    border-color:#3f8a62 !important;

    color:#bbf7d0 !important;
}


/* ---------------------------------------------------------------
   PROGRESS
   --------------------------------------------------------------- */

html[data-theme="dark"]
body.tso-shell-enabled
.requirement-progress-wrap {
    background:#17273e !important;

    color:#e7eef8 !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.requirement-progress-track {
    background:#0c192a !important;

    border:1px solid #38516f !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.requirement-progress-bar {
    background:linear-gradient(
        90deg,
        #2dd4bf,
        #67e8f9
    ) !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.requirement-progress-copy {
    color:#b8c5d6 !important;
}


/* ---------------------------------------------------------------
   NEXT REQUIRED ACTION
   --------------------------------------------------------------- */

html[data-theme="dark"]
body.tso-shell-enabled
.requirement-next {
    background:#16314b !important;

    border-color:#4f718f !important;

    color:#e7eef8 !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.requirement-next-copy span {
    color:#67e8f9 !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.requirement-next-copy strong {
    color:#f8fafc !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.requirement-next-copy small {
    color:#b8c5d6 !important;
}


/* ---------------------------------------------------------------
   ACTION BUTTONS
   --------------------------------------------------------------- */

html[data-theme="dark"]
body.tso-shell-enabled
.requirement-action {
    background:#194361 !important;

    border-color:#5b819d !important;

    color:#f8fafc !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.requirement-action:hover {
    background:#245978 !important;

    border-color:#81a7c1 !important;

    color:#ffffff !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.requirement-action.secondary {
    background:#1c3049 !important;

    border-color:#587792 !important;

    color:#dbeafe !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.requirement-item.no-target
.requirement-action {
    background:#25384f !important;

    border-color:#647b94 !important;

    color:#d7e2ee !important;
}


/* ---------------------------------------------------------------
   EXPAND / COLLAPSE BAR
   --------------------------------------------------------------- */

html[data-theme="dark"]
body.tso-shell-enabled
.requirement-list-toggle {
    background:#122138 !important;

    border-color:#415b78 !important;

    color:#e7eef8 !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.requirement-list-toggle:hover {
    background:#1b3049 !important;

    color:#ffffff !important;
}


/* ---------------------------------------------------------------
   REQUIREMENT LIST
   --------------------------------------------------------------- */

html[data-theme="dark"]
body.tso-shell-enabled
.requirement-list {
    background:#101e32 !important;

    border-color:#415b78 !important;

    color:#e7eef8 !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.requirement-item {
    background:#182a42 !important;

    border-color:#344d68 !important;

    color:#e7eef8 !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.requirement-item:hover {
    background:#1d334d !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.requirement-item strong {
    color:#f8fafc !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.requirement-item small {
    color:#b8c5d6 !important;
}


/* ---------------------------------------------------------------
   REQUIREMENT NUMBER / ERROR INDICATOR
   --------------------------------------------------------------- */

html[data-theme="dark"]
body.tso-shell-enabled
.requirement-item-index {
    background:#522732 !important;

    border:1px solid #9f5967 !important;

    color:#fecdd3 !important;
}


/* ---------------------------------------------------------------
   INLINE HELP
   --------------------------------------------------------------- */

html[data-theme="dark"]
body.tso-shell-enabled
.requirement-inline-help {
    background:#3b3018 !important;

    border:1px solid #8c6d28 !important;

    color:#fde68a !important;
}


/* ---------------------------------------------------------------
   FLOATING REQUIREMENTS BUTTON
   --------------------------------------------------------------- */

html[data-theme="dark"]
body.tso-shell-enabled
.requirement-floating-button {
    background:#7f1d2d !important;

    border:1px solid #be6371 !important;

    color:#ffffff !important;

    box-shadow:
        0 10px 28px rgba(0,0,0,.34) !important;
}


html[data-theme="dark"]
body.tso-shell-enabled
.requirement-floating-count {
    background:#f8fafc !important;

    color:#991b1b !important;
}


/* ---------------------------------------------------------------
   REQUIREMENT HIGHLIGHT
   --------------------------------------------------------------- */

html[data-theme="dark"]
body.tso-shell-enabled
.requirement-highlight {
    outline-color:
        rgba(103,232,249,.42) !important;
}


/* THREESIXOH_REQUIREMENT_NAVIGATOR_DARK_V1_END */

