:root {
  /* Canvas is separate from color-mixing bases to preserve semantic tones. */
  --app-canvas: #000000;
  --ops-bg: #071016;
  --ops-bg-soft: #0b1720;
  --ops-panel: #0f202b;
  --ops-panel-2: #132936;
  --ops-line: #244453;
  --ops-line-hot: #22d3ee;
  --ops-text: #e6f7fb;
  --ops-muted: #89a8b3;
  --ops-cyan: #28e7ff;
  --ops-blue: #3b82f6;
  --ops-green: #54f1a6;
  --ops-amber: #fbbf24;
  --ops-red: #ff6b7a;
  --ops-violet: #c084fc;
  --ops-glass: rgba(13, 31, 42, 0.72);
  --ops-glass-strong: rgba(15, 36, 48, 0.84);
  --ops-glass-line: rgba(118, 238, 255, 0.24);
  --ops-glass-shine: rgba(255, 255, 255, 0.11);
  --status-scheduled: var(--ops-green);
  --status-unscheduled: #ffe45c;
  --status-routing: var(--ops-blue);
  --status-capacity: #ff4050;
  --status-no-coverage: #ff8a00;
  --status-vip: var(--ops-violet);
  --map-status-scheduled: #54f1a6;
  --map-status-unscheduled: #ffe45c;
  --map-status-routing: #3b82f6;
  --map-status-capacity: #ff4050;
  --map-status-no-coverage: #ff8a00;
  --map-status-vip: #c084fc;
  --map-zone: var(--ops-cyan);
  --map-zone-fill: rgba(40, 231, 255, 0.075);
  --map-tech-home: #60a5fa;
  --map-tech-coverage: #a855f7;
  --map-tech-coverage-fill: rgba(192, 132, 252, 0.048);
  --map-marker-outline: rgba(3, 12, 17, 0.96);
  --map-service-order-radius: 11;
  --map-service-order-outline-width: 3;
  --map-service-order-fill-opacity: 1;
  --panel-background: rgba(7, 18, 25, 0.82);
  --panel-background-soft: rgba(7, 16, 22, 0.56);
  --panel-border: rgba(118, 238, 255, 0.16);
  --panel-border-strong: rgba(118, 238, 255, 0.28);
  --panel-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 18px 46px rgba(0, 0, 0, 0.22);
  --panel-radius: 8px;
  --control-pill-radius: 999px;
  --panel-padding: 22px;
  --text-primary: var(--ops-text);
  --text-secondary: var(--ops-muted);
  --text-heading: #f4fbff;
  --semantic-success-surface: color-mix(in srgb, var(--ops-green) 12%, var(--panel-background));
  --semantic-success-surface-strong: color-mix(in srgb, var(--ops-green) 20%, var(--panel-background));
  --semantic-success-border: color-mix(in srgb, var(--ops-green) 48%, var(--panel-border));
  --semantic-success-text: color-mix(in srgb, var(--ops-green) 82%, var(--text-primary));
  --semantic-success-button-text: #042317;
  --semantic-info-surface: color-mix(in srgb, var(--ops-cyan) 10%, var(--panel-background));
  --semantic-info-surface-strong: color-mix(in srgb, var(--ops-cyan) 18%, var(--panel-background));
  --semantic-info-border: color-mix(in srgb, var(--ops-cyan) 48%, var(--panel-border));
  --semantic-warning-surface: color-mix(in srgb, var(--ops-amber) 12%, var(--panel-background));
  --semantic-warning-surface-strong: color-mix(in srgb, var(--ops-amber) 22%, var(--panel-background));
  --semantic-warning-border: color-mix(in srgb, var(--ops-amber) 52%, var(--panel-border));
  --semantic-warning-text: color-mix(in srgb, var(--ops-amber) 80%, var(--text-primary));
  --action-primary: var(--ops-cyan);
  --action-hover: #b8f5ff;
  --focus-ring: rgba(40, 231, 255, 0.42);
  --transition-fast: 140ms ease;
  --bs-body-bg: var(--app-canvas);
  --bs-body-color: var(--ops-text);
  --bs-border-color: var(--ops-line);
  --bs-secondary-color: var(--ops-muted);
  --bs-tertiary-bg: var(--ops-bg-soft);
  color-scheme: dark;
}

/* Zone Planner weekly grid extends existing operational table patterns. */
.zone-planner-week-scroll { overflow-x: auto; }
.zone-planner-week-table { min-width: 1080px; border-collapse: separate; border-spacing: 6px 8px; background: transparent; }
.zone-planner-week-table th { white-space: nowrap; }
.zone-planner-header-tech, .zone-planner-day-heading { padding: 9px; min-height: 54px; text-align: center; color: var(--ops-text); font-weight: 900; border: 1px solid rgba(118, 238, 255, .32); border-radius: 8px; background: rgba(16, 36, 46, .82); }
.zone-planner-week-table thead th span { display: block; color: var(--text-secondary); font-size: .75rem; font-weight: 400; }
.zone-planner-day-today { border-color: rgba(56, 189, 248, .92); background: linear-gradient(180deg, rgba(125, 211, 252, .34), rgba(14, 165, 233, .14) 58%), rgba(8, 47, 73, .96); box-shadow: inset 0 0 0 1px rgba(186, 230, 253, .24), 0 0 22px rgba(14, 165, 233, .34); }
.zone-planner-tech { position: sticky; left: 0; z-index: 2; min-width: 160px; }
.zone-planner-week-table .zone-planner-tech,
.zone-planner-week-table .zone-planner-cell { border: 1px solid rgba(118, 238, 255, .32); border-radius: 8px; }
.zone-planner-cell { min-width: 150px; min-height: 132px; padding: 7px !important; vertical-align: top; background: linear-gradient(180deg, rgba(148, 163, 174, .12), transparent 54%), rgba(12, 30, 39, .8); }
.zone-planner-cell-available { border-color: rgba(85, 240, 160, .62) !important; box-shadow: inset 0 0 0 1px rgba(85, 240, 160, .18); }
.zone-planner-cell-unavailable { border-color: rgba(255, 92, 118, .72) !important; box-shadow: inset 0 0 0 1px rgba(255, 92, 118, .2); }
.zone-planner-cell-gap { background: color-mix(in srgb, var(--status-unscheduled) 12%, transparent); }
.zone-planner-cell-conflict { background: color-mix(in srgb, var(--status-capacity) 14%, transparent); }
.zone-planner-cell-state, .zone-planner-capacity { color: var(--text-secondary); font-size: .75rem; }
.zone-planner-assignment { display: flex; flex-wrap: wrap; gap: .25rem .5rem; align-items: center; margin-top: .35rem; padding: .25rem .4rem; border-radius: .35rem; background: color-mix(in srgb, var(--status-scheduled) 14%, transparent); font-size: .8rem; }
.zone-planner-assignment-paused { background: color-mix(in srgb, var(--text-secondary) 14%, transparent); }
.zone-planner-empty, .zone-planner-warning { margin-top: .35rem; font-size: .8rem; }
.zone-planner-warning { color: var(--status-capacity); font-weight: 600; }
#zone-calendar-availability { scroll-margin-top: 5rem; }
.zone-planner-zone-overlay { position: fixed; z-index: 1080; max-height: 260px; overflow-y: auto; padding: .25rem; border: 1px solid var(--panel-border); border-radius: .5rem; background: var(--panel-background); box-shadow: var(--panel-shadow); }
.zone-planner-zone-choice { display: block; width: 100%; padding: .5rem .65rem; border: 0; border-radius: .3rem; color: var(--text-primary); text-align: left; background: transparent; }
.zone-planner-zone-choice:hover, .zone-planner-zone-choice:focus { background: color-mix(in srgb, var(--action-primary) 18%, transparent); outline: none; }

/* Keep Planner availability stronger than the shared Routing cell baseline. */
.zone-planner-week-table .zone-planner-cell.zone-planner-cell-available {
  border-color: rgba(85, 240, 160, .78) !important;
  box-shadow: inset 0 0 0 1px rgba(85, 240, 160, .24), 0 0 10px rgba(85, 240, 160, .08);
}
.zone-planner-week-table .zone-planner-cell.zone-planner-cell-unavailable {
  border-color: rgba(255, 92, 118, .82) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 92, 118, .26), 0 0 10px rgba(255, 92, 118, .08);
}
.zone-planner-week-table .zone-planner-cell.routing-cell-today {
  border-color: rgba(56, 189, 248, .94) !important;
  box-shadow: inset 0 0 0 2px rgba(125, 211, 252, .24), 0 0 18px rgba(14, 165, 233, .26);
}

[data-p2p-theme="light"] .dispatch-map-layer-controls label {
  color: var(--frost-text-secondary) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(231, 244, 248, 0.8)),
    #f4fbfd !important;
  border-color: rgba(67, 101, 119, 0.24) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
  font-weight: 800;
}

[data-p2p-theme="light"] .dispatch-map-layer-controls label[data-layer-key="zones"] {
  border-color: rgba(8, 151, 184, 0.58) !important;
}

[data-p2p-theme="light"] .dispatch-map-layer-controls label[data-layer-key="scheduled"] {
  border-color: rgba(36, 170, 105, 0.58) !important;
}

[data-p2p-theme="light"] .dispatch-map-layer-controls label[data-layer-key="unscheduled"] {
  border-color: rgba(199, 138, 0, 0.62) !important;
}

[data-p2p-theme="light"] .dispatch-map-layer-controls label[data-layer-key="techHomes"] {
  border-color: rgba(45, 140, 255, 0.58) !important;
}

[data-p2p-theme="light"] .dispatch-map-layer-controls label[data-layer-key="noCoverage"] {
  border-color: rgba(207, 92, 8, 0.62) !important;
}

[data-p2p-theme="light"] .dispatch-map-layer-controls label[data-layer-key="noAvailability"] {
  border-color: rgba(216, 59, 79, 0.62) !important;
}

[data-p2p-theme="light"] .dispatch-map-layer-controls input {
  accent-color: var(--frost-action-strong);
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] .dispatch-map-layer-controls label {
    color: var(--frost-text-secondary) !important;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(231, 244, 248, 0.8)),
      #f4fbfd !important;
    border-color: rgba(67, 101, 119, 0.24) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
    font-weight: 800;
  }

  [data-p2p-theme="auto"] .dispatch-map-layer-controls label[data-layer-key="zones"] {
    border-color: rgba(8, 151, 184, 0.58) !important;
  }

  [data-p2p-theme="auto"] .dispatch-map-layer-controls label[data-layer-key="scheduled"] {
    border-color: rgba(36, 170, 105, 0.58) !important;
  }

  [data-p2p-theme="auto"] .dispatch-map-layer-controls label[data-layer-key="unscheduled"] {
    border-color: rgba(199, 138, 0, 0.62) !important;
  }

  [data-p2p-theme="auto"] .dispatch-map-layer-controls label[data-layer-key="techHomes"] {
    border-color: rgba(45, 140, 255, 0.58) !important;
  }

  [data-p2p-theme="auto"] .dispatch-map-layer-controls label[data-layer-key="noCoverage"] {
    border-color: rgba(207, 92, 8, 0.62) !important;
  }

  [data-p2p-theme="auto"] .dispatch-map-layer-controls label[data-layer-key="noAvailability"] {
    border-color: rgba(216, 59, 79, 0.62) !important;
  }

  [data-p2p-theme="auto"] .dispatch-map-layer-controls input {
    accent-color: var(--frost-action-strong);
  }
}

/*
 * Midnight desktop semantic tone layer
 *
 * This is the shared counterpart to the accepted Command Center treatment.
 * It preserves Path2Point's existing semantic hues while lowering luminance
 * against the Midnight base, keeping operational state in foreground accents
 * rather than colored card fills or neon glow. Frost and Technician Mobile
 * are intentionally outside this dark-theme-only layer.
 */
[data-p2p-theme="dark"] {
  --midnight-tone-green: color-mix(in srgb, var(--status-scheduled) 75%, var(--ops-bg));
  --midnight-tone-amber: color-mix(in srgb, var(--status-unscheduled) 75%, var(--ops-bg));
  --midnight-tone-orange: color-mix(in srgb, var(--status-no-coverage) 75%, var(--ops-bg));
  --midnight-tone-red: color-mix(in srgb, var(--status-capacity) 75%, var(--ops-bg));
  --midnight-tone-blue: color-mix(in srgb, var(--status-routing) 75%, var(--ops-bg));
  --midnight-tone-cyan: color-mix(in srgb, var(--ops-cyan) 75%, var(--ops-bg));
  --midnight-tone-violet: color-mix(in srgb, var(--status-vip) 75%, var(--ops-bg));
  --midnight-heading-cyan: color-mix(in srgb, var(--ops-cyan) 82%, var(--ops-bg));
  --midnight-surface: rgba(7, 18, 25, 0.86);
  --midnight-surface-raised: rgba(12, 30, 39, 0.82);
  --midnight-surface-subtle: rgba(4, 14, 20, 0.58);
  --midnight-accent-border: color-mix(in srgb, currentColor 30%, var(--panel-border));
  --map-status-scheduled: var(--midnight-tone-green);
  --map-status-unscheduled: var(--midnight-tone-amber);
  --map-status-routing: var(--midnight-tone-blue);
  --map-status-capacity: var(--midnight-tone-red);
  --map-status-no-coverage: var(--midnight-tone-orange);
  --map-status-vip: var(--midnight-tone-violet);
  --map-zone: var(--midnight-heading-cyan);
  --map-tech-home: var(--midnight-tone-blue);
  --map-tech-coverage: var(--midnight-tone-violet);
}

/* Common semantic labels retain their hue in text and borders, not fill. */
[data-p2p-theme="dark"] :is(.semantic-pill, .capacity-status-badge, .dispatch-capacity-badge, .routing-status-chip, .routing-unsaved-badge, .tech-workday-route-pill, .tech-workday-preference-pill, .launch-readiness-pill, .contact-chip-success, .contact-chip-warning, .contact-chip-danger, .vip-priority-badge) {
  color: color-mix(in srgb, var(--semantic-pill-color, var(--capacity-status-color, var(--status-pill-color, var(--status-routing)))) 75%, var(--ops-bg)) !important;
  border-color: color-mix(in srgb, var(--semantic-pill-color, var(--capacity-status-color, var(--status-pill-color, var(--status-routing)))) 32%, var(--panel-border)) !important;
  background: var(--midnight-surface-subtle) !important;
  box-shadow: none !important;
}

[data-p2p-theme="dark"] .routing-status-success,
[data-p2p-theme="dark"] .tech-workday-route-success,
[data-p2p-theme="dark"] .launch-readiness-pill-ready { color: var(--midnight-tone-green) !important; border-color: color-mix(in srgb, var(--midnight-tone-green) 40%, var(--panel-border)) !important; background: var(--midnight-surface-subtle) !important; }
[data-p2p-theme="dark"] .routing-status-warning,
[data-p2p-theme="dark"] .tech-workday-route-warning,
[data-p2p-theme="dark"] .launch-readiness-pill-needs-attention { color: var(--midnight-tone-amber) !important; border-color: color-mix(in srgb, var(--midnight-tone-amber) 40%, var(--panel-border)) !important; background: var(--midnight-surface-subtle) !important; }
[data-p2p-theme="dark"] .routing-status-danger,
[data-p2p-theme="dark"] .launch-readiness-pill-not-started { color: var(--midnight-tone-red) !important; border-color: color-mix(in srgb, var(--midnight-tone-red) 40%, var(--panel-border)) !important; background: var(--midnight-surface-subtle) !important; }
[data-p2p-theme="dark"] :is(.routing-status-routing, .tech-workday-route-routing) { color: var(--midnight-tone-blue) !important; border-color: color-mix(in srgb, var(--midnight-tone-blue) 40%, var(--panel-border)) !important; background: var(--midnight-surface-subtle) !important; }
[data-p2p-theme="dark"] .tech-workday-preference-pill { color: var(--midnight-tone-violet) !important; border-color: color-mix(in srgb, var(--midnight-tone-violet) 38%, var(--panel-border)) !important; }
[data-p2p-theme="dark"] .tech-workday-window-pill { color: var(--ops-text) !important; border-color: rgba(118, 238, 255, 0.18) !important; background: var(--midnight-surface-subtle) !important; box-shadow: none !important; }
[data-p2p-theme="dark"] .contact-chip-success { color: var(--midnight-tone-green) !important; border-color: color-mix(in srgb, var(--midnight-tone-green) 38%, var(--panel-border)) !important; }
[data-p2p-theme="dark"] .contact-chip-warning { color: var(--midnight-tone-amber) !important; border-color: color-mix(in srgb, var(--midnight-tone-amber) 38%, var(--panel-border)) !important; }
[data-p2p-theme="dark"] .contact-chip-danger { color: var(--midnight-tone-red) !important; border-color: color-mix(in srgb, var(--midnight-tone-red) 38%, var(--panel-border)) !important; }
[data-p2p-theme="dark"] :is(.launch-readiness-pill-optional, .launch-readiness-pill-deferred) { color: var(--ops-muted) !important; border-color: rgba(137, 168, 179, 0.26) !important; }

/* Bootstrap badges are calmed only inside desktop management and workspaces;
   the framework palette remains untouched for Frost and Technician Mobile. */
[data-p2p-theme="dark"] :is(.midnight-semantic-badges, .page-wide) .badge {
  border: 1px solid color-mix(in srgb, currentColor 32%, var(--panel-border)) !important;
  background: var(--midnight-surface-subtle) !important;
  box-shadow: none !important;
}
[data-p2p-theme="dark"] :is(.midnight-semantic-badges, .page-wide) :is(.badge.text-bg-success, .badge.bg-success) { color: var(--midnight-tone-green) !important; }
[data-p2p-theme="dark"] :is(.midnight-semantic-badges, .page-wide) :is(.badge.text-bg-warning, .badge.bg-warning) { color: var(--midnight-tone-amber) !important; }
[data-p2p-theme="dark"] :is(.midnight-semantic-badges, .page-wide) :is(.badge.text-bg-danger, .badge.bg-danger, .badge.text-bg-red) { color: var(--midnight-tone-red) !important; }
[data-p2p-theme="dark"] :is(.midnight-semantic-badges, .page-wide) :is(.badge.text-bg-info, .badge.bg-info, .badge.text-bg-primary, .badge.bg-primary) { color: var(--midnight-tone-blue) !important; }
[data-p2p-theme="dark"] :is(.midnight-semantic-badges, .page-wide) :is(.badge.text-bg-secondary, .badge.bg-secondary) { color: var(--ops-muted) !important; }

/* Final desktop Midnight sweep: primary actions remain cyan-led without the
   fluorescent fill and halo used by the original dark treatment. QA Review,
   Parts & Supplies, and Technician Mobile retain their accepted specialized
   controls. */
[data-p2p-theme="dark"] body:not(.technician-mobile-shell) .btn-primary:not(.qa-workspace-page .btn-primary):not(.qa-standalone-page .btn-primary):not(.supplies-catalog-layout .btn-primary) {
  color: #04191e;
  border-color: color-mix(in srgb, #67e8f9 72%, var(--ops-bg));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 48%),
    linear-gradient(180deg, color-mix(in srgb, #75f0ff 72%, var(--ops-bg)), color-mix(in srgb, #1fd3ee 75%, var(--ops-bg)));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(2, 16, 20, 0.26), 0 5px 12px rgba(0, 0, 0, 0.18);
}
[data-p2p-theme="dark"] body:not(.technician-mobile-shell) .btn-primary:not(.qa-workspace-page .btn-primary):not(.qa-standalone-page .btn-primary):not(.supplies-catalog-layout .btn-primary):hover,
[data-p2p-theme="dark"] body:not(.technician-mobile-shell) .btn-primary:not(.qa-workspace-page .btn-primary):not(.qa-standalone-page .btn-primary):not(.supplies-catalog-layout .btn-primary):focus-visible {
  color: #031419;
  border-color: color-mix(in srgb, #a5f3fc 76%, var(--ops-bg));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 46%),
    linear-gradient(180deg, color-mix(in srgb, #a5f3fc 76%, var(--ops-bg)), color-mix(in srgb, #38e7ff 80%, var(--ops-bg)));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), inset 0 -1px 0 rgba(2, 16, 20, 0.28), 0 7px 14px rgba(0, 0, 0, 0.22);
}
[data-p2p-theme="dark"] body:not(.technician-mobile-shell) .btn-outline-primary:not(.qa-workspace-page .btn-outline-primary):not(.qa-standalone-page .btn-outline-primary):not(.supplies-catalog-layout .btn-outline-primary) {
  color: var(--midnight-heading-cyan);
  border-color: color-mix(in srgb, var(--midnight-heading-cyan) 58%, var(--panel-border));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 52%), var(--midnight-surface-subtle);
  box-shadow: none;
}
[data-p2p-theme="dark"] body:not(.technician-mobile-shell) .btn-outline-primary:not(.qa-workspace-page .btn-outline-primary):not(.qa-standalone-page .btn-outline-primary):not(.supplies-catalog-layout .btn-outline-primary):hover,
[data-p2p-theme="dark"] body:not(.technician-mobile-shell) .btn-outline-primary:not(.qa-workspace-page .btn-outline-primary):not(.qa-standalone-page .btn-outline-primary):not(.supplies-catalog-layout .btn-outline-primary):focus-visible {
  color: #031419;
  border-color: color-mix(in srgb, #75f0ff 68%, var(--ops-bg));
  background: color-mix(in srgb, #1fd3ee 72%, var(--ops-bg));
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

/* Technician Coverage keeps its capacity colors but no longer reads as a
   glowing alert board. */
[data-p2p-theme="dark"] .command-util-ring {
  background: conic-gradient(
    var(--midnight-tone-green) 0 calc(var(--within-capacity) * 1%),
    var(--midnight-tone-orange) 0 calc((var(--within-capacity) + var(--near-capacity)) * 1%),
    var(--midnight-tone-red) 0 calc((var(--within-capacity) + var(--near-capacity) + var(--over-capacity)) * 1%),
    rgba(255, 255, 255, 0.08) 0
  );
  filter: none;
}
[data-p2p-theme="dark"] .command-coverage-stats span::before { box-shadow: none; }
[data-p2p-theme="dark"] .command-coverage-stats span.success { color: var(--midnight-tone-green); }
[data-p2p-theme="dark"] .command-coverage-stats span.warning { color: var(--midnight-tone-orange); }
[data-p2p-theme="dark"] .command-coverage-stats span.danger { color: var(--midnight-tone-red); }

/* Coverage management labels use foreground distinction and a quiet shared
   surface instead of saturated semantic fills. */
[data-p2p-theme="dark"] :is(.dispatch-availability-badge, .dispatch-zip-badge) {
  border: 1px solid color-mix(in srgb, currentColor 34%, var(--panel-border));
  background: var(--midnight-surface-subtle);
  box-shadow: none;
}
[data-p2p-theme="dark"] .dispatch-availability-badge.active { color: var(--midnight-tone-green); }
[data-p2p-theme="dark"] .dispatch-availability-badge.overnight,
[data-p2p-theme="dark"] .dispatch-zip-badge { color: var(--midnight-tone-blue); }
[data-p2p-theme="dark"] .dispatch-availability-badge.inactive { color: var(--ops-muted); }

[data-p2p-theme="dark"] .tech-workday-preference-pill { color: var(--midnight-tone-violet) !important; border-color: color-mix(in srgb, var(--midnight-tone-violet) 38%, var(--panel-border)) !important; }
[data-p2p-theme="dark"] .tech-workday-window-pill { color: var(--ops-text) !important; border-color: rgba(118, 238, 255, 0.18) !important; background: var(--midnight-surface-subtle) !important; box-shadow: none !important; }
[data-p2p-theme="dark"] .contact-chip-success { color: var(--midnight-tone-green) !important; border-color: color-mix(in srgb, var(--midnight-tone-green) 38%, var(--panel-border)) !important; }
[data-p2p-theme="dark"] .contact-chip-warning { color: var(--midnight-tone-amber) !important; border-color: color-mix(in srgb, var(--midnight-tone-amber) 38%, var(--panel-border)) !important; }
[data-p2p-theme="dark"] .contact-chip-danger { color: var(--midnight-tone-red) !important; border-color: color-mix(in srgb, var(--midnight-tone-red) 38%, var(--panel-border)) !important; }
[data-p2p-theme="dark"] :is(.launch-readiness-pill-optional, .launch-readiness-pill-deferred) { color: var(--ops-muted) !important; border-color: rgba(137, 168, 179, 0.26) !important; }

/* Dashboard, KPI, and map chrome. */
[data-p2p-theme="dark"] :is(.command-panel-header h2, .command-panel-header a, .command-panel-link, .command-map-footer a) { color: var(--midnight-heading-cyan); }
[data-p2p-theme="dark"] .command-map-legend .command-dot { filter: saturate(0.78) brightness(0.78); }
[data-p2p-theme="dark"] .command-util-ring { filter: saturate(0.78) brightness(0.82); }
[data-p2p-theme="dark"] .kpi-management-card,
[data-p2p-theme="dark"] .kpi-attention-card {
  border-color: var(--midnight-accent-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 58%), var(--midnight-surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 16px 32px rgba(0, 0, 0, 0.2);
}
[data-p2p-theme="dark"] :is(.kpi-management-card::before, .kpi-management-card::after, .kpi-attention-card::after) { box-shadow: none; opacity: 0.45; }
[data-p2p-theme="dark"] .kpi-attention-card:hover,
[data-p2p-theme="dark"] .kpi-attention-card:focus { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 36px rgba(0, 0, 0, 0.24); }
[data-p2p-theme="dark"] :is(.kpi-tone-cyan, .kpi-tone-green, .kpi-tone-blue, .kpi-tone-violet) { color: color-mix(in srgb, currentColor 75%, var(--ops-bg)); }
[data-p2p-theme="dark"] .kpi-status-code-new .kpi-status-dot { color: var(--midnight-tone-blue); background: var(--midnight-tone-blue); }
[data-p2p-theme="dark"] .kpi-status-code-assigned .kpi-status-dot { color: var(--midnight-tone-cyan); background: var(--midnight-tone-cyan); }
[data-p2p-theme="dark"] .kpi-status-code-unscheduled .kpi-status-dot { color: var(--midnight-tone-amber); background: var(--midnight-tone-amber); }
[data-p2p-theme="dark"] .kpi-status-code-scheduled .kpi-status-dot { color: var(--midnight-tone-green); background: var(--midnight-tone-green); }
[data-p2p-theme="dark"] .kpi-status-code-routed .kpi-status-dot,
[data-p2p-theme="dark"] .kpi-status-code-qa_review .kpi-status-dot { color: var(--midnight-tone-violet); background: var(--midnight-tone-violet); }
[data-p2p-theme="dark"] .kpi-status-code-pending_report .kpi-status-dot { color: var(--midnight-tone-orange); background: var(--midnight-tone-orange); }

/* Scheduling keeps capacity and nearby-stop meaning in restrained accents. */
[data-p2p-theme="dark"] .dispatch-suggestion-box-empty {
  border-color: color-mix(in srgb, var(--midnight-tone-red) 42%, var(--panel-border));
  background: var(--midnight-surface-subtle);
  box-shadow: inset 3px 0 0 var(--midnight-tone-red);
}
[data-p2p-theme="dark"] .dispatch-suggestion-card,
[data-p2p-theme="dark"] .dispatch-suggestion-card-success,
[data-p2p-theme="dark"] .dispatch-suggestion-card-warning,
[data-p2p-theme="dark"] .dispatch-suggestion-card-danger,
[data-p2p-theme="dark"] .dispatch-suggestion-card-travel-tech {
  background: var(--midnight-surface) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}
[data-p2p-theme="dark"] .dispatch-suggestion-card-success { border-left-color: var(--midnight-tone-green); }
[data-p2p-theme="dark"] .dispatch-suggestion-card-warning,
[data-p2p-theme="dark"] .dispatch-suggestion-card-travel-tech { border-left-color: var(--midnight-tone-amber); }
[data-p2p-theme="dark"] .dispatch-suggestion-card-danger { border-left-color: var(--midnight-tone-red); }
[data-p2p-theme="dark"] .dispatch-suggestion-nearby-stop-close { --nearby-stop-color: var(--midnight-tone-green); }
[data-p2p-theme="dark"] .dispatch-suggestion-nearby-stop-extended { --nearby-stop-color: var(--midnight-tone-amber); }

/* Routing, Zone Planner, and Tech Workday retain colored edge signals only. */
[data-p2p-theme="dark"] :is(.routing-cell, .zone-planner-week-table .zone-planner-cell, .tech-workday-day-cell) { background: var(--midnight-surface-raised) !important; box-shadow: none !important; }
[data-p2p-theme="dark"] :is(.routing-cell-available, .zone-planner-week-table .zone-planner-cell.routing-cell-available, .tech-workday-day-available) { border-color: color-mix(in srgb, var(--midnight-tone-green) 52%, var(--panel-border)) !important; box-shadow: inset 3px 0 0 var(--midnight-tone-green) !important; }
[data-p2p-theme="dark"] :is(.routing-cell-unavailable, .zone-planner-week-table .zone-planner-cell.routing-cell-unavailable, .tech-workday-day-unavailable) { border-color: color-mix(in srgb, var(--midnight-tone-red) 52%, var(--panel-border)) !important; box-shadow: inset 3px 0 0 var(--midnight-tone-red) !important; }
[data-p2p-theme="dark"] :is(.routing-cell-today, .zone-planner-day-today, .zone-planner-week-table .zone-planner-cell.routing-cell-today, .tech-workday-day-today) { border-color: color-mix(in srgb, var(--midnight-heading-cyan) 58%, var(--panel-border)) !important; background: var(--midnight-surface-raised) !important; box-shadow: inset 3px 0 0 var(--midnight-heading-cyan) !important; }
[data-p2p-theme="dark"] :is(.routing-cell-selected, .tech-workday-day-selected, .tech-workday-column-heading.tech-workday-day-selected) { border-color: color-mix(in srgb, var(--midnight-heading-cyan) 66%, var(--panel-border-strong)) !important; background: var(--midnight-surface-raised) !important; box-shadow: inset 0 0 0 2px var(--midnight-heading-cyan) !important; }
[data-p2p-theme="dark"] :is(.routing-stop-preferred, .routing-stop-card.routing-window-missing) { box-shadow: inset 3px 0 0 currentColor; }
[data-p2p-theme="dark"] .tech-workday-sidebar,
[data-p2p-theme="dark"] .tech-workday-calendar-panel,
[data-p2p-theme="dark"] .tech-workday-map-panel { background: var(--midnight-surface) !important; }
[data-p2p-theme="dark"] .tech-workday-calendar-header,
[data-p2p-theme="dark"] .tech-workday-empty-workspace { border-color: color-mix(in srgb, var(--midnight-heading-cyan) 48%, var(--panel-border)) !important; background: var(--midnight-surface-raised) !important; box-shadow: inset 2px 0 0 var(--midnight-heading-cyan) !important; }

/* Accounting, import, company readiness, and Service Order desktop metadata. */
[data-p2p-theme="dark"] .accounting-ledger-type-pill,
[data-p2p-theme="dark"] .accounting-ledger-status {
  color: var(--midnight-tone-blue);
  border: 1px solid color-mix(in srgb, var(--midnight-tone-blue) 38%, var(--panel-border));
  background: var(--midnight-surface-subtle);
}
[data-p2p-theme="dark"] .accounting-ledger-status-finalized { color: var(--midnight-tone-green); border-color: color-mix(in srgb, var(--midnight-tone-green) 38%, var(--panel-border)); }
[data-p2p-theme="dark"] .accounting-ledger-status-pending,
[data-p2p-theme="dark"] .accounting-ledger-status-error { color: var(--midnight-tone-amber); border-color: color-mix(in srgb, var(--midnight-tone-amber) 38%, var(--panel-border)); }
[data-p2p-theme="dark"] :is(.accounting-ledger-status-void, .accounting-ledger-status-reversed) { color: var(--midnight-tone-red); border-color: color-mix(in srgb, var(--midnight-tone-red) 38%, var(--panel-border)); }
[data-p2p-theme="dark"] .accounting-ledger-status-exported { color: var(--midnight-tone-violet); border-color: color-mix(in srgb, var(--midnight-tone-violet) 38%, var(--panel-border)); }
[data-p2p-theme="dark"] :is(.import-preview-status-warnings, .import-preview-status-ready) { background: var(--midnight-surface-subtle); box-shadow: none; }
[data-p2p-theme="dark"] .vip-priority-badge { color: var(--midnight-tone-violet) !important; }
[data-p2p-theme="dark"] .service-order-accounting-attention { box-shadow: inset 3px 0 0 var(--midnight-tone-red), 0 16px 32px rgba(0, 0, 0, 0.18) !important; }

/* Routing Board shares Tech Workday's calm calendar hierarchy. Routing keeps
   its semantic state and drag affordances, but the grid itself should scan as
   one workweek instead of a collection of competing alerts. */
.routing-board-panel {
  background:
    linear-gradient(180deg, rgba(40, 231, 255, 0.06), transparent 32%),
    rgba(3, 12, 17, 0.76);
}

.routing-board-scroll {
  border-color: rgba(118, 238, 255, 0.16);
  background: rgba(5, 18, 25, 0.7);
  box-shadow: inset 0 0 0 1px rgba(118, 238, 255, 0.05);
}

.routing-tech-heading,
.routing-day-heading,
.routing-tech-card,
.routing-cell {
  border-color: rgba(118, 238, 255, 0.16);
  border-radius: 8px;
  box-shadow: none;
}

.routing-tech-heading,
.routing-day-heading,
.routing-tech-card {
  background: rgba(7, 24, 33, 0.96);
}

.routing-tech-card {
  min-height: 172px;
  padding: 12px;
}

.routing-cell {
  min-height: 172px;
  padding: 7px;
  background:
    linear-gradient(180deg, rgba(148, 163, 184, 0.05), transparent 42%),
    rgba(7, 20, 28, 0.7);
}

.routing-cell-available {
  border-color: rgba(84, 241, 166, 0.62);
  box-shadow: inset 3px 0 0 rgba(84, 241, 166, 0.68);
}

.routing-cell-unavailable {
  border-color: rgba(255, 92, 118, 0.68);
  box-shadow: inset 3px 0 0 rgba(255, 92, 118, 0.7);
}

.routing-cell-today {
  border-color: rgba(56, 189, 248, 0.82);
  background:
    linear-gradient(180deg, rgba(14, 165, 233, 0.12), transparent 48%),
    rgba(8, 30, 42, 0.84);
  box-shadow: inset 3px 0 0 rgba(56, 189, 248, 0.78);
}

.routing-cell-selected,
.routing-cell.routing-cell-selected.routing-cell-available,
.routing-cell.routing-cell-selected.routing-cell-unavailable {
  border-color: rgba(40, 231, 255, 0.9);
  background:
    linear-gradient(180deg, rgba(40, 231, 255, 0.14), rgba(40, 231, 255, 0.04)),
    rgba(8, 31, 42, 0.86);
  box-shadow: inset 0 0 0 2px rgba(40, 231, 255, 0.68);
}

.routing-cell-selected.routing-cell-available,
.routing-cell-selected.routing-cell-unavailable {
  box-shadow: inset 3px 0 0 currentColor, inset 0 0 0 2px rgba(40, 231, 255, 0.68);
}

.routing-cell-head {
  gap: 5px;
  margin-bottom: 5px;
}

.routing-day-total {
  font-size: 0.72rem;
  font-weight: 800;
}

.routing-status-chip {
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 850;
}

.routing-stop-list {
  gap: 4px;
}

.routing-stop-card {
  padding: 4px 5px;
  border-color: rgba(118, 238, 255, 0.16);
  border-radius: 6px;
  color: var(--ops-text);
  background: rgba(4, 14, 20, 0.58);
  box-shadow: none;
}

.routing-stop-preferred {
  border-color: rgba(251, 191, 36, 0.58);
  box-shadow: inset 3px 0 0 rgba(251, 191, 36, 0.76);
}

.routing-stop-card.routing-window-missing {
  border-color: rgba(255, 92, 118, 0.72);
  box-shadow: inset 3px 0 0 rgba(255, 92, 118, 0.78);
}

.routing-stop-main {
  font-size: 0.74rem;
  font-weight: 800;
}

.routing-stop-drag,
.routing-stop-number,
.routing-stop-repair,
.routing-stop-location,
.routing-empty-cell {
  color: var(--ops-muted);
}

.routing-stop-link {
  color: #dff8ff;
}

[data-p2p-theme="light"] .routing-board-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(237, 247, 251, 0.82)),
    var(--frost-surface) !important;
}

[data-p2p-theme="light"] .routing-board-scroll {
  border-color: rgba(67, 101, 119, 0.22) !important;
  background: rgba(246, 251, 253, 0.94) !important;
  box-shadow: inset 0 0 0 1px rgba(67, 101, 119, 0.06) !important;
}

[data-p2p-theme="light"] :is(.routing-tech-heading, .routing-day-heading, .routing-tech-card, .routing-cell) {
  color: var(--frost-text-primary) !important;
  border-color: rgba(67, 101, 119, 0.22) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(237, 247, 251, 0.8)),
    var(--frost-surface) !important;
  box-shadow: none !important;
}

[data-p2p-theme="light"] :is(.routing-tech-heading, .routing-day-heading, .routing-tech-card) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(216, 238, 246, 0.9)),
    var(--frost-surface-tint) !important;
}

[data-p2p-theme="light"] .routing-cell.routing-cell-available {
  border-color: rgba(36, 145, 91, 0.72) !important;
  box-shadow: inset 3px 0 0 rgba(36, 145, 91, 0.8) !important;
}

[data-p2p-theme="light"] .routing-cell.routing-cell-unavailable {
  border-color: rgba(190, 66, 85, 0.72) !important;
  box-shadow: inset 3px 0 0 rgba(190, 66, 85, 0.8) !important;
}

[data-p2p-theme="light"] .routing-cell.routing-cell-today {
  border-color: rgba(8, 151, 184, 0.74) !important;
  background:
    linear-gradient(180deg, rgba(190, 244, 253, 0.58), rgba(233, 248, 252, 0.84)),
    var(--frost-selected-row) !important;
  box-shadow: inset 3px 0 0 rgba(8, 151, 184, 0.78) !important;
}

[data-p2p-theme="light"] :is(.routing-cell-selected, .routing-cell.routing-cell-selected.routing-cell-available, .routing-cell.routing-cell-selected.routing-cell-unavailable) {
  border-color: rgba(8, 151, 184, 0.82) !important;
  background:
    linear-gradient(180deg, rgba(190, 244, 253, 0.7), rgba(226, 248, 252, 0.82)),
    var(--frost-selected-row) !important;
  box-shadow: inset 0 0 0 2px rgba(8, 151, 184, 0.68) !important;
}

[data-p2p-theme="light"] .routing-stop-card {
  color: var(--frost-text-primary);
  border-color: rgba(67, 101, 119, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(240, 248, 251, 0.78)),
    var(--frost-surface);
  box-shadow: none;
}

[data-p2p-theme="light"] :is(.routing-stop-drag, .routing-stop-number, .routing-stop-repair, .routing-stop-location, .routing-empty-cell) {
  color: var(--frost-text-muted) !important;
}

[data-p2p-theme="light"] .routing-stop-link {
  color: var(--frost-action-strong) !important;
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] .routing-board-panel {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(237, 247, 251, 0.82)),
      var(--frost-surface) !important;
  }

  [data-p2p-theme="auto"] .routing-board-scroll {
    border-color: rgba(67, 101, 119, 0.22) !important;
    background: rgba(246, 251, 253, 0.94) !important;
  }

  [data-p2p-theme="auto"] :is(.routing-tech-heading, .routing-day-heading, .routing-tech-card, .routing-cell) {
    color: var(--frost-text-primary) !important;
    border-color: rgba(67, 101, 119, 0.22) !important;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(237, 247, 251, 0.8)),
      var(--frost-surface) !important;
    box-shadow: none !important;
  }

  [data-p2p-theme="auto"] :is(.routing-tech-heading, .routing-day-heading, .routing-tech-card) {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(216, 238, 246, 0.9)),
      var(--frost-surface-tint) !important;
  }

  [data-p2p-theme="auto"] .routing-cell.routing-cell-available {
    border-color: rgba(36, 145, 91, 0.72) !important;
    box-shadow: inset 3px 0 0 rgba(36, 145, 91, 0.8) !important;
  }

  [data-p2p-theme="auto"] .routing-cell.routing-cell-unavailable {
    border-color: rgba(190, 66, 85, 0.72) !important;
    box-shadow: inset 3px 0 0 rgba(190, 66, 85, 0.8) !important;
  }

  [data-p2p-theme="auto"] .routing-cell.routing-cell-today {
    border-color: rgba(8, 151, 184, 0.74) !important;
    background:
      linear-gradient(180deg, rgba(190, 244, 253, 0.58), rgba(233, 248, 252, 0.84)),
      var(--frost-selected-row) !important;
    box-shadow: inset 3px 0 0 rgba(8, 151, 184, 0.78) !important;
  }

  [data-p2p-theme="auto"] :is(.routing-cell-selected, .routing-cell.routing-cell-selected.routing-cell-available, .routing-cell.routing-cell-selected.routing-cell-unavailable) {
    border-color: rgba(8, 151, 184, 0.82) !important;
    background:
      linear-gradient(180deg, rgba(190, 244, 253, 0.7), rgba(226, 248, 252, 0.82)),
      var(--frost-selected-row) !important;
    box-shadow: inset 0 0 0 2px rgba(8, 151, 184, 0.68) !important;
  }

  [data-p2p-theme="auto"] .routing-stop-card {
    color: var(--frost-text-primary);
    border-color: rgba(67, 101, 119, 0.2);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(240, 248, 251, 0.78)),
      var(--frost-surface);
    box-shadow: none;
  }

  [data-p2p-theme="auto"] :is(.routing-stop-drag, .routing-stop-number, .routing-stop-repair, .routing-stop-location, .routing-empty-cell) {
    color: var(--frost-text-muted) !important;
  }

  [data-p2p-theme="auto"] .routing-stop-link {
    color: var(--frost-action-strong) !important;
  }
}

[data-p2p-theme="light"] .contact-chip {
  color: var(--frost-text-secondary) !important;
  border-color: rgba(67, 101, 119, 0.28) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(232, 244, 248, 0.82)),
    #f5fbfd !important;
  font-weight: 800;
}

[data-p2p-theme="light"] .contact-chip-success {
  color: #075437 !important;
  border-color: rgba(36, 170, 105, 0.42) !important;
  background:
    linear-gradient(180deg, rgba(229, 255, 244, 0.98), rgba(186, 247, 218, 0.94)) !important;
}

[data-p2p-theme="light"] .contact-chip-warning {
  color: #6a4500 !important;
  border-color: rgba(199, 138, 0, 0.46) !important;
  background:
    linear-gradient(180deg, rgba(255, 249, 219, 0.98), rgba(255, 232, 154, 0.92)) !important;
}

[data-p2p-theme="light"] .contact-chip-danger {
  color: #7c1f2e !important;
  border-color: rgba(216, 59, 79, 0.44) !important;
  background:
    linear-gradient(180deg, rgba(255, 235, 239, 0.98), rgba(255, 196, 207, 0.9)) !important;
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] .contact-chip {
    color: var(--frost-text-secondary) !important;
    border-color: rgba(67, 101, 119, 0.28) !important;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(232, 244, 248, 0.82)),
      #f5fbfd !important;
    font-weight: 800;
  }

  [data-p2p-theme="auto"] .contact-chip-success {
    color: #075437 !important;
    border-color: rgba(36, 170, 105, 0.42) !important;
    background:
      linear-gradient(180deg, rgba(229, 255, 244, 0.98), rgba(186, 247, 218, 0.94)) !important;
  }

  [data-p2p-theme="auto"] .contact-chip-warning {
    color: #6a4500 !important;
    border-color: rgba(199, 138, 0, 0.46) !important;
    background:
      linear-gradient(180deg, rgba(255, 249, 219, 0.98), rgba(255, 232, 154, 0.92)) !important;
  }

  [data-p2p-theme="auto"] .contact-chip-danger {
    color: #7c1f2e !important;
    border-color: rgba(216, 59, 79, 0.44) !important;
    background:
      linear-gradient(180deg, rgba(255, 235, 239, 0.98), rgba(255, 196, 207, 0.9)) !important;
  }
}

[data-p2p-theme="light"] .accounting-ledger-type-pill {
  color: #18407a !important;
  border-color: rgba(37, 99, 235, 0.48) !important;
  background:
    linear-gradient(180deg, rgba(226, 237, 255, 0.98), rgba(191, 215, 255, 0.94)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

[data-p2p-theme="light"] .accounting-ledger-status-finalized {
  color: #06351f !important;
  background: #56dfa0 !important;
  border: 1px solid rgba(14, 128, 75, 0.28) !important;
}

[data-p2p-theme="light"] .accounting-ledger-status-void,
[data-p2p-theme="light"] .badge.bg-danger {
  color: #ffffff !important;
  background: #dc4a58 !important;
  border: 1px solid rgba(126, 24, 40, 0.28) !important;
}

[data-p2p-theme="light"] .accounting-ledger-status-pending,
[data-p2p-theme="light"] .accounting-ledger-status-error {
  color: #4d3500 !important;
  background: #f3c438 !important;
  border: 1px solid rgba(158, 110, 0, 0.34) !important;
}

[data-p2p-theme="light"] .accounting-ledger-status-exported {
  color: #35186c !important;
  background: #c9b0ff !important;
  border: 1px solid rgba(96, 58, 180, 0.32) !important;
}

[data-p2p-theme="light"] .accounting-ledger-status-draft {
  color: #334c59 !important;
  background: #d9e6ec !important;
  border: 1px solid rgba(86, 117, 132, 0.3) !important;
}

[data-p2p-theme="light"] .accounting-ledger-status-reversed {
  color: #ffffff !important;
  background: #a93548 !important;
  border: 1px solid rgba(126, 24, 40, 0.34) !important;
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] .accounting-ledger-type-pill {
    color: #18407a !important;
    border-color: rgba(37, 99, 235, 0.48) !important;
    background:
      linear-gradient(180deg, rgba(226, 237, 255, 0.98), rgba(191, 215, 255, 0.94)) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
  }

  [data-p2p-theme="auto"] .accounting-ledger-status-finalized {
    color: #06351f !important;
    background: #56dfa0 !important;
    border: 1px solid rgba(14, 128, 75, 0.28) !important;
  }

  [data-p2p-theme="auto"] .accounting-ledger-status-void,
  [data-p2p-theme="auto"] .badge.bg-danger {
    color: #ffffff !important;
    background: #dc4a58 !important;
    border: 1px solid rgba(126, 24, 40, 0.28) !important;
  }

  [data-p2p-theme="auto"] .accounting-ledger-status-pending,
  [data-p2p-theme="auto"] .accounting-ledger-status-error {
    color: #4d3500 !important;
    background: #f3c438 !important;
    border: 1px solid rgba(158, 110, 0, 0.34) !important;
  }

  [data-p2p-theme="auto"] .accounting-ledger-status-exported {
    color: #35186c !important;
    background: #c9b0ff !important;
    border: 1px solid rgba(96, 58, 180, 0.32) !important;
  }

  [data-p2p-theme="auto"] .accounting-ledger-status-draft {
    color: #334c59 !important;
    background: #d9e6ec !important;
    border: 1px solid rgba(86, 117, 132, 0.3) !important;
  }

  [data-p2p-theme="auto"] .accounting-ledger-status-reversed {
    color: #ffffff !important;
    background: #a93548 !important;
    border: 1px solid rgba(126, 24, 40, 0.34) !important;
  }
}

[data-p2p-theme="light"] #exceptions-pane a.border.rounded {
  color: var(--frost-text-primary) !important;
  border-color: rgba(67, 101, 119, 0.34) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(239, 247, 250, 0.78)),
    #f7fbfd !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 20px rgba(31, 58, 72, 0.08) !important;
}

[data-p2p-theme="light"] #exceptions-pane a.border.rounded.border-danger {
  border-color: rgba(216, 59, 79, 0.68) !important;
  background:
    linear-gradient(180deg, rgba(255, 250, 251, 0.92), rgba(255, 236, 240, 0.84)),
    #fff5f7 !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 0 0 1px rgba(216, 59, 79, 0.12),
    0 10px 22px rgba(126, 24, 40, 0.12) !important;
}

[data-p2p-theme="light"] #exceptions-pane a.border.rounded .text-secondary {
  color: var(--frost-text-secondary) !important;
}

[data-p2p-theme="light"] #exceptions-pane a.border.rounded .h3 {
  color: var(--frost-text-primary) !important;
}

[data-p2p-theme="light"] #exceptions-pane a.border.rounded.border-danger .text-danger,
[data-p2p-theme="light"] #exceptions-pane a.border.rounded.border-danger .h3 {
  color: #c72f45 !important;
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] #exceptions-pane a.border.rounded {
    color: var(--frost-text-primary) !important;
    border-color: rgba(67, 101, 119, 0.34) !important;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(239, 247, 250, 0.78)),
      #f7fbfd !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.9),
      0 8px 20px rgba(31, 58, 72, 0.08) !important;
  }

  [data-p2p-theme="auto"] #exceptions-pane a.border.rounded.border-danger {
    border-color: rgba(216, 59, 79, 0.68) !important;
    background:
      linear-gradient(180deg, rgba(255, 250, 251, 0.92), rgba(255, 236, 240, 0.84)),
      #fff5f7 !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.92),
      0 0 0 1px rgba(216, 59, 79, 0.12),
      0 10px 22px rgba(126, 24, 40, 0.12) !important;
  }

  [data-p2p-theme="auto"] #exceptions-pane a.border.rounded .text-secondary {
    color: var(--frost-text-secondary) !important;
  }

  [data-p2p-theme="auto"] #exceptions-pane a.border.rounded .h3 {
    color: var(--frost-text-primary) !important;
  }

  [data-p2p-theme="auto"] #exceptions-pane a.border.rounded.border-danger .text-danger,
  [data-p2p-theme="auto"] #exceptions-pane a.border.rounded.border-danger .h3 {
    color: #c72f45 !important;
  }
}

[data-p2p-theme="light"] .routing-day-heading > div:first-child {
  color: #f4fbff !important;
  text-shadow: none;
}

[data-p2p-theme="light"] .routing-day-heading .text-secondary {
  color: #b8d4df !important;
  font-weight: 800;
}

[data-p2p-theme="light"] .routing-day-heading.routing-day-today > div:first-child {
  color: #d7f9ff !important;
}

[data-p2p-theme="light"] .routing-day-heading.routing-day-today .text-secondary {
  color: #aeefff !important;
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] .routing-day-heading > div:first-child {
    color: #f4fbff !important;
    text-shadow: none;
  }

  [data-p2p-theme="auto"] .routing-day-heading .text-secondary {
    color: #b8d4df !important;
    font-weight: 800;
  }

  [data-p2p-theme="auto"] .routing-day-heading.routing-day-today > div:first-child {
    color: #d7f9ff !important;
  }

  [data-p2p-theme="auto"] .routing-day-heading.routing-day-today .text-secondary {
    color: #aeefff !important;
  }
}

[data-p2p-theme="light"] {
  --app-canvas: #ffffff;
  --ops-bg: #f1f7fa;
  --ops-bg-soft: #e9f2f6;
  --ops-panel: #fcfeff;
  --ops-panel-2: #f2f8fb;
  --ops-line: #adc4d0;
  --ops-text: #142b38;
  --ops-muted: #4d6876;
  --status-unscheduled: #b98b00;
  --status-routing: #256fdd;
  --status-capacity: #d92f45;
  --status-no-coverage: #c86f00;
  --status-vip: #8d55d7;
  --ops-glass: rgba(255, 255, 255, 0.82);
  --ops-glass-strong: rgba(255, 255, 255, 0.92);
  --ops-glass-line: rgba(18, 99, 122, 0.16);
  --ops-glass-shine: rgba(255, 255, 255, 0.68);
  --panel-background: rgba(253, 254, 255, 0.96);
  --panel-background-soft: rgba(242, 248, 251, 0.82);
  --panel-border: rgba(68, 103, 121, 0.26);
  --panel-border-strong: rgba(20, 105, 132, 0.38);
  --panel-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94), 0 16px 38px rgba(31, 58, 72, 0.12);
  --text-primary: var(--ops-text);
  --text-secondary: var(--ops-muted);
  --text-heading: #102938;
  --bs-body-bg: var(--app-canvas);
  --bs-body-color: var(--ops-text);
  --bs-border-color: var(--ops-line);
  --bs-secondary-color: var(--ops-muted);
  --bs-tertiary-bg: var(--ops-bg-soft);
  color-scheme: light;
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] {
    --app-canvas: #ffffff;
    --ops-bg: #f1f7fa;
    --ops-bg-soft: #e9f2f6;
    --ops-panel: #fcfeff;
    --ops-panel-2: #f2f8fb;
    --ops-line: #adc4d0;
    --ops-text: #142b38;
    --ops-muted: #4d6876;
    --status-unscheduled: #b98b00;
    --status-routing: #256fdd;
    --status-capacity: #d92f45;
    --status-no-coverage: #c86f00;
    --status-vip: #8d55d7;
    --ops-glass: rgba(255, 255, 255, 0.82);
    --ops-glass-strong: rgba(255, 255, 255, 0.92);
    --ops-glass-line: rgba(18, 99, 122, 0.16);
    --ops-glass-shine: rgba(255, 255, 255, 0.68);
    --panel-background: rgba(253, 254, 255, 0.96);
    --panel-background-soft: rgba(242, 248, 251, 0.82);
    --panel-border: rgba(68, 103, 121, 0.26);
    --panel-border-strong: rgba(20, 105, 132, 0.38);
    --panel-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94), 0 16px 38px rgba(31, 58, 72, 0.12);
    --text-primary: var(--ops-text);
    --text-secondary: var(--ops-muted);
    --text-heading: #102938;
    --bs-body-bg: var(--app-canvas);
    --bs-body-color: var(--ops-text);
    --bs-border-color: var(--ops-line);
    --bs-secondary-color: var(--ops-muted);
    --bs-tertiary-bg: var(--ops-bg-soft);
    color-scheme: light;
  }
}

.status-scheduled { color: var(--status-scheduled); }
.status-unscheduled { color: var(--status-unscheduled); }
.status-routing { color: var(--status-routing); }
.status-capacity { color: var(--status-capacity); }
.status-no-coverage { color: var(--status-no-coverage); }
.status-vip { color: var(--status-vip); }

.bg-status-scheduled { background-color: var(--status-scheduled); }
.bg-status-unscheduled { background-color: var(--status-unscheduled); }
.bg-status-routing { background-color: var(--status-routing); }
.bg-status-capacity { background-color: var(--status-capacity); }
.bg-status-no-coverage { background-color: var(--status-no-coverage); }
.bg-status-vip { background-color: var(--status-vip); }

.status-dot,
.map-marker-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: currentColor;
}

.map-marker-dot {
  width: 12px;
  height: 12px;
  box-shadow: none;
}

.map-marker-service-order {
  border-radius: 999px;
  background: currentColor;
  box-shadow: none;
}

.map-shape-zone {
  color: var(--map-zone);
  background: var(--map-zone-fill);
  border-color: var(--map-zone);
}

.map-pin-tech-home { color: var(--map-tech-home); }

.map-outline-tech-coverage {
  color: var(--map-tech-coverage);
  background: var(--map-tech-coverage-fill);
  border-color: var(--map-tech-coverage);
}

.panel-standard {
  border: 1px solid var(--panel-border);
  border-radius: var(--panel-radius);
  background: var(--panel-background);
  box-shadow: var(--panel-shadow);
}

.accounting-batch-bar {
  position: sticky;
  top: 0.75rem;
  z-index: 5;
  border-color: var(--panel-border-strong) !important;
  background: rgba(7, 18, 25, 0.94);
  box-shadow: var(--panel-shadow);
}

.accounting-batch-workspace {
  position: relative;
  top: auto;
  z-index: 20;
  padding: 14px 16px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 56%),
    rgba(7, 18, 25, 0.68);
}

.accounting-batch-form {
  position: relative;
  z-index: 20;
}

.accounting-batch-form + .table-responsive {
  z-index: 1;
}

.accounting-batch-workspace .row {
  align-items: end;
}

.accounting-batch-workspace .form-check {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.accounting-batch-workspace .form-label {
  margin-bottom: 0.38rem;
}

.accounting-selection-warning {
  border: 1px solid rgba(255, 107, 122, 0.72);
  border-left: 4px solid var(--ops-red);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 107, 122, 0.22), rgba(255, 107, 122, 0.08)),
    rgba(42, 10, 16, 0.9);
  color: #ffd6dc;
  font-weight: 750;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 0 1px rgba(255, 107, 122, 0.08);
  padding-left: 0.85rem;
  padding-right: 0.85rem;
}

.accounting-queue-filter {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr)) auto minmax(160px, auto);
  gap: 14px;
  align-items: end;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 60%),
    rgba(7, 18, 25, 0.62);
  border-color: var(--panel-border) !important;
}

.accounting-queue-updated {
  justify-self: end;
  white-space: nowrap;
  padding-bottom: 0.45rem;
  font-weight: 700;
}

.accounting-queue-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.accounting-work-queue,
.accounting-queue-main {
  background:
    radial-gradient(circle at 16% 10%, rgba(30, 191, 214, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 58%),
    rgba(7, 18, 25, 0.72);
  border-color: var(--panel-border) !important;
  box-shadow: var(--panel-shadow);
}

.accounting-work-queue {
  overflow: hidden;
}

.accounting-work-queue-header {
  display: grid;
  gap: 8px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(118, 238, 255, 0.12);
}

.accounting-work-queue-list {
  display: grid;
}

.accounting-work-queue-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 92px;
  padding: 14px 18px;
  color: var(--text-primary);
  text-decoration: none;
  border: 1px solid transparent;
  border-bottom-color: rgba(118, 238, 255, 0.1);
  transition: background-color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.accounting-work-queue-row:hover,
.accounting-work-queue-row:focus {
  color: var(--text-primary);
  background:
    linear-gradient(90deg, rgba(23, 207, 241, 0.18), rgba(23, 207, 241, 0.06)),
    rgba(7, 18, 25, 0.76);
  border-color: rgba(118, 238, 255, 0.22);
  box-shadow:
    inset 4px 0 0 var(--ops-cyan),
    inset 0 0 0 1px rgba(118, 238, 255, 0.12),
    0 0 24px rgba(35, 211, 237, 0.12);
}

.accounting-work-queue-row.active {
  position: relative;
  z-index: 1;
  margin: 8px;
  color: var(--text-primary);
  border-color: rgba(40, 231, 255, 0.96);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(23, 207, 241, 0.28), rgba(23, 207, 241, 0.1)),
    rgba(8, 39, 49, 0.9);
  box-shadow:
    inset 0 0 0 1px rgba(188, 251, 255, 0.16),
    0 0 0 1px rgba(40, 231, 255, 0.18),
    0 0 20px rgba(35, 211, 237, 0.2);
}

.accounting-work-queue-row strong,
.accounting-work-queue-row small {
  display: block;
}

.accounting-work-queue-row small {
  margin-top: 3px;
  color: var(--ops-cyan);
  font-weight: 800;
}

.accounting-work-queue-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.accounting-work-queue-title em {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 8px;
  border: 1px solid rgba(84, 241, 166, 0.36);
  border-radius: 999px;
  background: rgba(84, 241, 166, 0.1);
  color: var(--ops-green);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.accounting-work-queue-copy {
  min-width: 0;
}

.accounting-work-queue-copy small + small {
  color: rgba(230, 247, 251, 0.72);
  font-weight: 750;
}

.accounting-queue-avatar {
  width: 50px;
  height: 50px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 34%, rgba(7, 18, 25, 0.94) 0 8px, transparent 9px),
    radial-gradient(circle at 50% 88%, rgba(7, 18, 25, 0.94) 0 18px, transparent 19px),
    var(--ops-cyan);
  opacity: 0.92;
}

.accounting-queue-client-avatar {
  border-radius: 8px;
  background: var(--ops-green);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 6h28v36H10V6Z'/%3E%3Cpath d='M17 16h14M17 24h14M17 32h8'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 6h28v36H10V6Z'/%3E%3Cpath d='M17 16h14M17 24h14M17 32h8'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.accounting-queue-history-link {
  display: block;
  padding: 14px 18px;
  color: var(--ops-cyan);
  font-weight: 850;
  text-decoration: none;
  border-bottom: 1px solid rgba(118, 238, 255, 0.1);
}

.accounting-queue-note {
  margin: 14px;
  padding: 14px;
  color: rgba(230, 247, 251, 0.72);
  border-color: rgba(118, 238, 255, 0.14) !important;
  background: rgba(7, 18, 25, 0.48);
}

.accounting-queue-note p {
  margin: 0;
  line-height: 1.55;
}

.accounting-queue-main {
  padding: 22px;
}

.accounting-queue-main-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.accounting-open-folder {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.accounting-open-folder-avatar {
  width: 50px;
  height: 50px;
}

.accounting-open-folder-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.accounting-open-folder-title .badge {
  border: 1px solid rgba(87, 255, 87, 0.95);
  background: rgba(57, 255, 76, 0.22) !important;
  color: #73ff6b !important;
  font-size: 0.72rem;
  font-weight: 900;
  box-shadow: none;
  text-transform: uppercase;
}

.accounting-queue-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--ops-cyan);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.accounting-queue-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.accounting-queue-kpi {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 12px;
  align-items: center;
  min-height: 96px;
  padding: 16px 18px;
  border-color: rgba(118, 238, 255, 0.18) !important;
  background: rgba(7, 18, 25, 0.58);
}

.accounting-queue-kpi-copy,
.accounting-queue-kpi-copy span,
.accounting-queue-kpi strong {
  display: block;
}

.accounting-queue-kpi-copy span {
  color: rgba(230, 247, 251, 0.72);
  font-weight: 800;
}

.accounting-queue-kpi small {
  display: block;
  margin-top: 8px;
  color: rgba(230, 247, 251, 0.54);
  font-weight: 700;
  line-height: 1.2;
}

.accounting-queue-kpi strong {
  margin-top: 8px;
  color: var(--text-primary);
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1;
}

.accounting-queue-kpi-icon {
  position: relative;
  width: 40px;
  height: 40px;
  justify-self: end;
  color: currentColor;
}

.accounting-queue-kpi-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.accounting-queue-kpi-icon-clipboard {
  color: var(--ops-blue);
}

.accounting-queue-kpi-icon-dollar {
  color: var(--ops-green);
  border: 3px solid currentColor;
  border-radius: 999px;
}

.accounting-queue-kpi-icon-card {
  color: var(--ops-amber);
}

.accounting-queue-kpi-icon-clock {
  color: var(--ops-cyan);
}

.accounting-queue-kpi-icon-calculator {
  color: var(--ops-purple);
}

.accounting-queue-kpi-icon-invoice {
  color: var(--ops-blue);
}

.accounting-queue-kpi-icon-invoice-dollar {
  color: var(--ops-green);
}

.accounting-queue-kpi-icon-clipboard::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 8h14l2 5h5v29H10V13h5l2-5Z'/%3E%3Cpath d='M18 23h12M18 31h12M18 16h12'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 8h14l2 5h5v29H10V13h5l2-5Z'/%3E%3Cpath d='M18 23h12M18 31h12M18 16h12'/%3E%3C/g%3E%3C/svg%3E");
}

.accounting-queue-kpi-icon-dollar::before {
  content: "$";
  inset: 0;
  display: grid;
  place-items: center;
  color: currentColor;
  background: transparent;
  font-size: 1.45rem;
  font-weight: 950;
  line-height: 1;
  transform: translateY(-1px);
  -webkit-mask-image: none;
  mask-image: none;
}

.accounting-queue-kpi-icon-card::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='11' width='36' height='26' rx='3'/%3E%3Cpath d='M6 19h36M15 29h8M32 27a4 4 0 1 0 0 8 4 4 0 0 0 0-8Z'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='11' width='36' height='26' rx='3'/%3E%3Cpath d='M6 19h36M15 29h8M32 27a4 4 0 1 0 0 8 4 4 0 0 0 0-8Z'/%3E%3C/g%3E%3C/svg%3E");
}

.accounting-queue-kpi-icon-invoice::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 5h16l8 8v30H13V5Z'/%3E%3Cpath d='M29 5v10h8M19 24h10M19 31h12M19 17h4'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 5h16l8 8v30H13V5Z'/%3E%3Cpath d='M29 5v10h8M19 24h10M19 31h12M19 17h4'/%3E%3C/g%3E%3C/svg%3E");
}

.accounting-queue-kpi-icon-invoice-dollar::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 5h16l8 8v30H13V5Z'/%3E%3Cpath d='M29 5v10h8M24 19v16M29 21h-7a4 4 0 0 0 0 8h4a4 4 0 0 1 0 8h-7'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 5h16l8 8v30H13V5Z'/%3E%3Cpath d='M29 5v10h8M24 19v16M29 21h-7a4 4 0 0 0 0 8h4a4 4 0 0 1 0 8h-7'/%3E%3C/g%3E%3C/svg%3E");
}

.accounting-queue-kpi-icon-clock::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='24' cy='24' r='17'/%3E%3Cpath d='M24 13v12l8 5'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='24' cy='24' r='17'/%3E%3Cpath d='M24 13v12l8 5'/%3E%3C/g%3E%3C/svg%3E");
}

.accounting-queue-kpi-icon-calculator::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='10' y='5' width='28' height='38' rx='3'/%3E%3Cpath d='M16 13h16M17 23h.01M24 23h.01M31 23h.01M17 31h.01M24 31h.01M31 31h.01M17 38h.01M24 38h.01M31 38h.01'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='10' y='5' width='28' height='38' rx='3'/%3E%3Cpath d='M16 13h16M17 23h.01M24 23h.01M31 23h.01M17 31h.01M24 31h.01M31 31h.01M17 38h.01M24 38h.01M31 38h.01'/%3E%3C/g%3E%3C/svg%3E");
}

.accounting-summary-panel {
  margin-top: 14px;
  padding: 16px 18px;
  border-color: rgba(118, 238, 255, 0.14) !important;
  background: rgba(7, 18, 25, 0.48);
}

.accounting-summary-panel summary {
  cursor: pointer;
  color: var(--text-primary);
  font-size: 1.05rem;
  font-weight: 850;
}

.accounting-summary-panel summary span {
  margin-left: 8px;
  color: rgba(230, 247, 251, 0.58);
  font-size: 0.88rem;
  font-weight: 750;
}

.accounting-summary-panel summary::marker {
  color: var(--ops-cyan);
}

.accounting-summary-panel[open] summary {
  margin-bottom: 14px;
}

.accounting-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.accounting-summary-grid div {
  padding: 10px 12px;
  border: 1px solid rgba(118, 238, 255, 0.12);
  border-radius: 8px;
  background: rgba(7, 18, 25, 0.42);
}

.accounting-summary-grid dt {
  color: rgba(230, 247, 251, 0.58);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.accounting-summary-grid dd {
  margin: 4px 0 0;
  color: var(--text-primary);
  font-weight: 850;
}

.accounting-empty-queue {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 190px;
  padding: 28px;
  text-align: center;
  border-color: var(--semantic-success-border) !important;
  background: radial-gradient(circle at center, var(--semantic-success-surface-strong), transparent 58%), var(--semantic-success-surface);
}

.accounting-empty-queue strong {
  color: var(--semantic-success-text);
  font-size: 1.32rem;
  font-weight: 900;
}

.accounting-empty-queue strong::before {
  content: "✓ ";
}

.accounting-empty-queue span {
  color: var(--text-secondary);
  font-weight: 700;
}

@media (max-width: 1180px) {
  .accounting-queue-layout,
  .accounting-queue-filter {
    grid-template-columns: 1fr;
  }

  .accounting-queue-updated {
    justify-self: start;
  }

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

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

@media (max-width: 680px) {
  .accounting-queue-kpis {
    grid-template-columns: 1fr;
  }

  .accounting-queue-main-header {
    display: grid;
  }

  .accounting-summary-grid {
    grid-template-columns: 1fr;
  }
}

.accounting-kpi-card {
  min-height: 148px;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  grid-template-rows: auto auto 1px minmax(0, 1fr);
  gap: 6px 14px;
  padding: 18px 20px 16px;
}

.dispatch-workflow-card.accounting-kpi-card strong {
  font-size: clamp(1.92rem, 1.95vw, 2.32rem);
  word-break: break-word;
}

.dispatch-workflow-card.accounting-kpi-card .dispatch-card-label {
  padding-right: 18px;
  font-size: 0.98rem;
}

.dispatch-workflow-card.accounting-kpi-card .dispatch-card-divider,
.dispatch-workflow-card.accounting-kpi-card .dispatch-card-description {
  grid-column: 1 / -1;
}

.dispatch-workflow-card.accounting-kpi-card .dispatch-card-description {
  max-width: 95%;
  font-size: 0.9rem;
  line-height: 1.28;
}

.accounting-kpi-chevron {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: end;
  color: rgba(244, 251, 255, 0.78);
  font-size: 2rem;
}

.dispatch-workflow-card .accounting-kpi-icon {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 0;
}

.accounting-kpi-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.dispatch-workflow-card .accounting-kpi-icon-payroll {
  width: 48px;
  height: 34px;
  border: 4px solid currentColor;
  border-radius: 6px;
}

.accounting-kpi-icon-payroll::before {
  content: "$-$";
  inset: 0;
  display: grid;
  place-items: center;
  color: currentColor;
  background: transparent;
  font-size: 1.16rem;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
  -webkit-mask-image: none;
  mask-image: none;
}

.dispatch-workflow-card .accounting-kpi-icon-dollar {
  border: 4px solid currentColor;
  border-radius: 999px;
}

.accounting-kpi-icon-dollar::before {
  content: "$";
  inset: 0;
  display: grid;
  place-items: center;
  color: currentColor;
  background: transparent;
  font-size: 1.68rem;
  font-weight: 950;
  line-height: 1;
  transform: translateY(-1px);
  -webkit-mask-image: none;
  mask-image: none;
}

.accounting-kpi-icon-invoice::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 5h16l8 8v30H13V5Z'/%3E%3Cpath d='M29 5v10h8M19 24h10M19 31h12M19 17h4'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 5h16l8 8v30H13V5Z'/%3E%3Cpath d='M29 5v10h8M19 24h10M19 31h12M19 17h4'/%3E%3C/g%3E%3C/svg%3E");
}

.accounting-kpi-icon-invoice-dollar::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 5h16l8 8v30H13V5Z'/%3E%3Cpath d='M29 5v10h8M24 19v16M29 21h-7a4 4 0 0 0 0 8h4a4 4 0 0 1 0 8h-7'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 5h16l8 8v30H13V5Z'/%3E%3Cpath d='M29 5v10h8M24 19v16M29 21h-7a4 4 0 0 0 0 8h4a4 4 0 0 1 0 8h-7'/%3E%3C/g%3E%3C/svg%3E");
}

.accounting-kpi-icon-export::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 6h18l8 8v10M29 6v10h8M11 6v36h18'/%3E%3Cpath d='M25 33h16M35 27l6 6-6 6'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 6h18l8 8v10M29 6v10h8M11 6v36h18'/%3E%3Cpath d='M25 33h16M35 27l6 6-6 6'/%3E%3C/g%3E%3C/svg%3E");
}

.accounting-kpi-icon-alert::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M24 6 44 40H4L24 6Z'/%3E%3Cpath d='M24 18v10M24 35h.01'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M24 6 44 40H4L24 6Z'/%3E%3Cpath d='M24 18v10M24 35h.01'/%3E%3C/g%3E%3C/svg%3E");
}

.accounting-kpi-icon-invoice-clock::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 5h16l8 8v12M26 5v10h8M10 5v38h17M16 25h8M16 32h6'/%3E%3Ccircle cx='34' cy='34' r='9'/%3E%3Cpath d='M34 29v6l4 3'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 5h16l8 8v12M26 5v10h8M10 5v38h17M16 25h8M16 32h6'/%3E%3Ccircle cx='34' cy='34' r='9'/%3E%3Cpath d='M34 29v6l4 3'/%3E%3C/g%3E%3C/svg%3E");
}

.accounting-kpi-icon-history::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 8h14l2 5h5v29H10V13h5l2-5Z'/%3E%3Cpath d='m18 29 5 5 9-12M18 16h12'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 8h14l2 5h5v29H10V13h5l2-5Z'/%3E%3Cpath d='m18 29 5 5 9-12M18 16h12'/%3E%3C/g%3E%3C/svg%3E");
}

.accounting-last-export-card .dispatch-card-description {
  display: grid;
  gap: 2px;
}

.accounting-row-chevron {
  float: right;
  color: rgba(244, 251, 255, 0.62);
  font-size: 1.35rem;
  line-height: 1;
}

.import-workspace {
  max-width: 1480px;
  margin: 0 auto;
}

.import-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.import-results-title-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.7rem;
}

.import-results-title-line small {
  color: var(--ops-muted);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
}

.import-results-heading {
  min-width: 0;
}

.import-results-subtitle {
  max-width: 58rem;
  color: var(--ops-muted);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.4;
}

.import-title-file {
  color: var(--ops-muted);
  font-size: 0.72em;
  font-weight: 650;
}

.import-progress-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.8rem;
  margin-bottom: 1.25rem;
}

.import-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 0;
}

.import-steps span {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 51px;
  padding: 0.45rem 1.05rem;
  border: 1px solid rgba(118, 238, 255, 0.16);
  border-radius: 8px;
  background: rgba(7, 18, 25, 0.58);
  color: var(--ops-muted);
  font-size: 0.98rem;
  font-weight: 650;
}

.import-steps strong {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-size: 0.9rem;
}

.import-steps .active {
  border-color: rgba(40, 231, 255, 0.52);
  color: var(--ops-text);
  background: rgba(40, 231, 255, 0.11);
}

.import-steps .active strong {
  background: var(--ops-cyan);
  color: #031116;
}

.import-steps .done {
  color: var(--ops-green);
  border-color: rgba(84, 241, 166, 0.58);
  background: rgba(84, 241, 166, 0.08);
  box-shadow: inset 0 0 0 1px rgba(84, 241, 166, 0.12);
}

.import-steps .done::after {
  content: "✓";
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: rgba(84, 241, 166, 0.16);
  color: var(--ops-green);
  font-size: 0.9rem;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(84, 241, 166, 0.52);
}

.import-steps .done strong {
  border-color: rgba(84, 241, 166, 0.82);
  background: rgba(84, 241, 166, 0.12);
  color: var(--ops-green);
}

.import-progress-meter {
  --progress-alpha: 0.42;
  --progress-glow: 0.18;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 51px;
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(84, 241, 166, 0.5);
  border-radius: 8px;
  background: rgba(84, 241, 166, 0.05);
  box-shadow: inset 0 0 0 1px rgba(84, 241, 166, 0.08);
}

.import-progress-meter > div {
  width: clamp(188px, 21vw, 325px);
  height: 22px;
  padding: 3px;
  border: 1px solid rgba(84, 241, 166, 0.58);
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(84, 241, 166, 0.06), rgba(84, 241, 166, 0.015)),
    rgba(2, 9, 13, 0.92);
  overflow: hidden;
}

.import-progress-meter span {
  display: block;
  height: 100%;
  border-radius: 4px;
  opacity: var(--progress-alpha);
  background: linear-gradient(90deg, rgba(84, 241, 166, 0.48), rgba(84, 241, 166, 0.82) 58%, var(--ops-green));
  box-shadow: 0 0 16px rgba(84, 241, 166, var(--progress-glow));
}

.import-progress-meter strong {
  min-width: 42px;
  color: var(--ops-green);
  font-size: 0.95rem;
  text-align: right;
}

.import-progress-meter.progress-0 span { width: 0%; }
.import-progress-meter.progress-25 span { width: 25%; }
.import-progress-meter.progress-50 span { width: 50%; }
.import-progress-meter.progress-75 span { width: 75%; }
.import-progress-meter.progress-100 span { width: 100%; }

.import-progress-meter.progress-0 { --progress-alpha: 0.2; --progress-glow: 0.08; }
.import-progress-meter.progress-25 { --progress-alpha: 0.42; --progress-glow: 0.16; }
.import-progress-meter.progress-50 { --progress-alpha: 0.62; --progress-glow: 0.24; }
.import-progress-meter.progress-75 { --progress-alpha: 0.8; --progress-glow: 0.32; }
.import-progress-meter.progress-100 { --progress-alpha: 1; --progress-glow: 0.42; }

.import-panel,
.import-field-group {
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: var(--panel-background);
  box-shadow: var(--panel-shadow);
}

.import-panel {
  padding: 1rem;
}

.import-field-group {
  height: 100%;
  padding: 0.85rem;
  background: rgba(10, 25, 34, 0.68);
}

.import-field-group h2 {
  margin-bottom: 0.75rem;
  color: var(--ops-cyan);
}

.additional-item-mapping-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr));
  max-width: 44rem;
  gap: 0.65rem;
}

.additional-item-mapping-row {
  min-width: 0;
}

.additional-item-mapping-control {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}

.additional-item-mapping-control .import-select {
  width: 100%;
}

@media (max-width: 575.98px) {
  .additional-item-mapping-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.import-select {
  position: relative;
}

.import-native-select {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.import-select-button {
  width: 100%;
  min-height: 38px;
  padding: 0.42rem 2.25rem 0.42rem 0.75rem;
  border: 1px solid rgba(168, 221, 232, 0.28);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 48%),
    rgba(4, 12, 18, 0.88);
  color: var(--ops-text);
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.import-select-button::after {
  content: "";
  position: absolute;
  right: 0.78rem;
  top: 50%;
  width: 0.52rem;
  height: 0.52rem;
  border-right: 2px solid var(--ops-cyan);
  border-bottom: 2px solid var(--ops-cyan);
  transform: translateY(-68%) rotate(45deg);
  pointer-events: none;
}

.import-select-button:hover,
.import-select-button:focus,
.import-select.is-open .import-select-button {
  border-color: var(--ops-cyan);
  outline: none;
  box-shadow: 0 0 0 0.18rem rgba(40, 231, 255, 0.12), 0 0 18px rgba(40, 231, 255, 0.16);
}

.import-select-menu {
  position: absolute;
  z-index: 1250;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: none;
  max-height: 320px;
  overflow-y: auto;
  padding: 0.35rem;
  border: 1px solid rgba(40, 231, 255, 0.42);
  border-radius: 8px;
  background: #02090d;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.46), 0 0 0 1px rgba(40, 231, 255, 0.08);
}

.import-select.is-open .import-select-menu {
  display: grid;
  gap: 0.12rem;
}

.import-select-option {
  width: 100%;
  padding: 0.42rem 0.55rem;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ops-text);
  text-align: left;
}

.import-select-option:hover,
.import-select-option:focus {
  background: rgba(40, 231, 255, 0.18);
  color: #dffcff;
  outline: none;
}

.import-select-option.is-selected {
  background: rgba(40, 231, 255, 0.28);
  color: #ffffff;
  box-shadow: inset 3px 0 0 var(--ops-cyan);
}

.import-panel-footer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--panel-border);
}

.import-inline-field {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.import-inline-field .form-label {
  flex: 0 0 auto;
  margin-bottom: 0;
  white-space: nowrap;
}

.import-inline-field .form-control {
  min-width: 0;
}

.import-dropzone {
  position: relative;
  display: grid;
  gap: 0.45rem;
  place-items: center;
  min-height: 190px;
  padding: 1.25rem;
  border: 1px dashed rgba(118, 238, 255, 0.42);
  border-radius: 8px;
  background: rgba(7, 18, 25, 0.5);
  text-align: center;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.import-dropzone:hover,
.import-dropzone:focus-within,
.import-dropzone.is-dragging {
  border-color: rgba(40, 231, 255, 0.86);
  background: rgba(40, 231, 255, 0.075);
  box-shadow: inset 0 0 0 1px rgba(40, 231, 255, 0.2), 0 0 28px rgba(40, 231, 255, 0.1);
}

.import-dropzone.is-dragging {
  transform: translateY(-1px);
}

.import-dropzone-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(40, 231, 255, 0.58);
  border-radius: 999px;
  color: var(--ops-cyan);
}

.import-dropzone-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.import-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.import-file-picker {
  display: inline-flex;
  align-items: center;
  max-width: min(100%, 420px);
  border: 1px solid rgba(40, 231, 255, 0.58);
  border-radius: 7px;
  background: rgba(3, 13, 19, 0.86);
  color: var(--ops-text);
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(40, 231, 255, 0.08);
}

.import-file-button {
  flex: 0 0 auto;
  padding: 0.42rem 0.75rem;
  border-right: 1px solid rgba(40, 231, 255, 0.42);
  background: rgba(40, 231, 255, 0.13);
  color: var(--ops-cyan);
  font-weight: 700;
  transition: background var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

.import-file-name {
  min-width: 0;
  padding: 0.42rem 0.75rem;
  color: var(--ops-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-dropzone:hover .import-file-button,
.import-dropzone:focus-within .import-file-button,
.import-dropzone.is-dragging .import-file-button {
  background: rgba(40, 231, 255, 0.22);
  color: #9ff5ff;
  box-shadow: inset 0 0 0 1px rgba(40, 231, 255, 0.16);
}

.import-dropzone:focus-within .import-file-picker,
.import-dropzone.is-dragging .import-file-picker {
  border-color: rgba(40, 231, 255, 0.82);
  box-shadow: 0 0 0 0.16rem rgba(40, 231, 255, 0.14);
}

.import-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

.import-stat {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 1rem;
  min-height: 86px;
  padding: 1rem 1.1rem;
  border: 1px solid currentColor;
  border-radius: 8px;
  color: var(--ops-cyan);
  background: var(--import-stat-surface, linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 58%), rgba(5, 13, 19, 0.9));
  box-shadow: var(--import-stat-shadow, inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 18px 42px rgba(0, 0, 0, 0.24));
  overflow: hidden;
}

.import-stat::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background: radial-gradient(circle at 88% 18%, currentColor, transparent 36%);
  pointer-events: none;
}

.import-stat strong {
  position: relative;
  color: currentColor;
  font-size: 2.15rem;
  font-weight: 900;
  line-height: 1;
}

.import-stat-label {
  position: relative;
  color: var(--import-stat-label-color, #fff);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.15;
}

.import-stat-chevron {
  position: relative;
  color: currentColor;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.import-stat-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: currentColor;
  filter: none;
}

.import-stat-icon-created {
  border-radius: 7px;
  background: currentColor;
}

.import-stat-icon-created::before {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 10px;
  height: 10px;
  background: #061017;
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}

.import-stat-icon-created::after {
  content: "+";
  position: absolute;
  right: -7px;
  bottom: -4px;
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 3px solid #061017;
  border-radius: 999px;
  color: #061017;
  background: #4dff91;
  font-size: 20px;
  font-weight: 950;
  line-height: 1;
  text-shadow: none;
}

.import-stat-icon-shield,
.import-stat-icon-shield-alert {
  background: currentColor;
  clip-path: polygon(50% 0, 88% 14%, 84% 58%, 50% 100%, 16% 58%, 12% 14%);
}

.import-stat-icon-shield::after {
  content: "✓";
  color: #061017;
  font-size: 27px;
  font-weight: 950;
}

.import-stat-icon-shield-alert::after {
  content: "!";
  color: #061017;
  font-size: 25px;
  font-weight: 950;
}

.import-stat-icon-pin {
  border-radius: 50% 50% 50% 0;
  background: currentColor;
  transform: rotate(-45deg);
}

.import-stat-icon-pin::after {
  content: "";
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: #061017;
}

.import-stat-icon-warning {
  background: currentColor;
  clip-path: polygon(50% 0, 100% 92%, 0 92%);
}

.import-stat-icon-warning::after {
  content: "!";
  margin-top: 10px;
  color: #061017;
  font-size: 25px;
  font-weight: 950;
}

.import-stat-green {
  color: #4dff91;
  border-color: rgba(77, 255, 145, 0.82);
}

.import-stat-orange {
  color: #ffa22a;
  border-color: rgba(255, 162, 42, 0.86);
}

.import-stat-red {
  color: #ff5b5b;
  border-color: rgba(255, 91, 91, 0.9);
}

.import-results-summary {
  padding: 0.8rem;
}

.import-results-orders {
  padding: 1rem;
}

.import-results-orders > .h5 {
  margin-bottom: 0.85rem;
}

.import-results-table th,
.import-results-table td {
  vertical-align: top;
}

.import-results-table td {
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}

.import-results-table td:nth-child(3),
.import-results-table td:nth-child(4) {
  min-width: 18rem;
}

.import-results-table td:nth-child(6) {
  min-width: 16rem;
}

@media (max-width: 1399.98px) {
  .import-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .import-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .import-summary-grid {
    grid-template-columns: 1fr;
  }
}

.import-cleanup-list {
  display: grid;
  gap: 0.8rem;
}

.import-cleanup-list > div {
  padding: 0.75rem;
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 8px;
  background: rgba(251, 191, 36, 0.08);
}

.import-health-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 1rem;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.import-health-hero-checks {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 0.65rem;
}

.import-health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.65rem;
}

.import-health-kicker {
  margin-bottom: 0.3rem;
  color: var(--ops-green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.import-health-lede {
  margin-bottom: 0.45rem;
  color: var(--ops-text);
  font-size: 1.08rem;
  font-weight: 750;
}

.import-health-scoreboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 0.7rem;
}

.import-health-scoreboard > div {
  display: grid;
  align-content: center;
  gap: 0.2rem;
  min-height: 94px;
  padding: 0.85rem;
  border: 1px solid rgba(40, 231, 255, 0.5);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(40, 231, 255, 0.13), rgba(40, 231, 255, 0.045)),
    rgba(6, 16, 23, 0.82);
  box-shadow: inset 0 0 0 1px rgba(40, 231, 255, 0.08), 0 0 22px rgba(40, 231, 255, 0.08);
}

.import-health-scoreboard > div:nth-child(2) {
  border-color: rgba(84, 241, 166, 0.5);
  background:
    linear-gradient(180deg, rgba(84, 241, 166, 0.14), rgba(84, 241, 166, 0.045)),
    rgba(6, 16, 23, 0.82);
  box-shadow: inset 0 0 0 1px rgba(84, 241, 166, 0.08), 0 0 22px rgba(84, 241, 166, 0.08);
}

.import-health-scoreboard .needs-attention {
  border-color: rgba(251, 146, 60, 0.62);
  background:
    linear-gradient(180deg, rgba(251, 146, 60, 0.16), rgba(251, 146, 60, 0.05)),
    rgba(6, 16, 23, 0.82);
  box-shadow: inset 0 0 0 1px rgba(251, 146, 60, 0.1), 0 0 22px rgba(251, 146, 60, 0.08);
}

.import-health-scoreboard strong {
  color: var(--ops-cyan);
  font-size: 2rem;
  line-height: 1;
}

.import-health-scoreboard > div:nth-child(2) strong {
  color: var(--ops-green);
}

.import-health-scoreboard .needs-attention strong {
  color: #fb923c;
}

.import-health-scoreboard span {
  color: var(--ops-muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.import-card-heading {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}

.import-card-heading h2 {
  margin-bottom: 0;
}

.import-card-icon {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(84, 241, 166, 0.42);
  background: rgba(84, 241, 166, 0.12);
  color: var(--ops-green);
  font-weight: 900;
}

.import-card-icon-warning {
  border-color: rgba(251, 191, 36, 0.42);
  background: rgba(251, 191, 36, 0.14);
  color: #facc15;
}

.import-health-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.import-health-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 94px;
  padding: 0.75rem;
  border: 1px solid rgba(118, 238, 255, 0.16);
  border-radius: 8px;
  background: rgba(8, 20, 28, 0.52);
}

.import-health-score {
  display: grid;
  align-content: center;
  gap: 0.2rem;
  min-height: 94px;
  padding: 0.75rem;
  border: 1px solid rgba(40, 231, 255, 0.5);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(40, 231, 255, 0.13), rgba(40, 231, 255, 0.045)),
    rgba(6, 16, 23, 0.82);
  box-shadow: inset 0 0 0 1px rgba(40, 231, 255, 0.08), 0 0 22px rgba(40, 231, 255, 0.08);
}

.import-health-score strong {
  color: var(--ops-cyan);
  font-size: 2rem;
  line-height: 1;
}

.import-health-score span {
  color: var(--ops-muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.import-health-score-ready {
  border-color: rgba(84, 241, 166, 0.5);
  background:
    linear-gradient(180deg, rgba(84, 241, 166, 0.14), rgba(84, 241, 166, 0.045)),
    rgba(6, 16, 23, 0.82);
}

.import-health-score-ready strong {
  color: var(--ops-green);
}

.import-health-score.needs-attention {
  border-color: rgba(251, 146, 60, 0.62);
  background:
    linear-gradient(180deg, rgba(251, 146, 60, 0.16), rgba(251, 146, 60, 0.05)),
    rgba(6, 16, 23, 0.82);
}

.import-health-score.needs-attention strong {
  color: #fb923c;
}

.import-health-item-neutral {
  border-color: rgba(118, 238, 255, 0.22);
  background: rgba(8, 20, 28, 0.52);
}

.import-health-item-neutral span {
  color: var(--ops-cyan);
  background: rgba(40, 231, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(40, 231, 255, 0.26);
}

.import-health-item span {
  display: inline-grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 900;
}

.import-health-item > div {
  display: grid;
  gap: 0.18rem;
}

.import-health-item small {
  color: var(--ops-muted);
  font-size: 0.76rem;
  line-height: 1.3;
}

.import-health-item-good {
  border-color: rgba(84, 241, 166, 0.5);
  background:
    linear-gradient(180deg, rgba(84, 241, 166, 0.13), rgba(84, 241, 166, 0.04)),
    rgba(6, 16, 23, 0.82);
  box-shadow: inset 0 0 0 1px rgba(84, 241, 166, 0.08);
}

.import-health-item-good span {
  color: var(--ops-green);
  background: rgba(84, 241, 166, 0.16);
  box-shadow: inset 0 0 0 1px rgba(84, 241, 166, 0.42);
}

.import-health-item-warning {
  border-color: rgba(255, 77, 109, 0.62);
  background:
    linear-gradient(180deg, rgba(255, 77, 109, 0.14), rgba(255, 77, 109, 0.045)),
    rgba(6, 16, 23, 0.82);
  box-shadow: inset 0 0 0 1px rgba(255, 77, 109, 0.1);
}

.import-health-item-warning span {
  color: #ff4d6d;
  background: rgba(255, 77, 109, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 77, 109, 0.42);
}

.import-positive-state {
  padding: 0.85rem;
  border: 1px solid rgba(84, 241, 166, 0.26);
  border-radius: 8px;
  background: rgba(84, 241, 166, 0.07);
  color: var(--ops-green);
  font-weight: 700;
}

.import-readiness {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.9rem;
}

.import-readiness > div {
  display: grid;
  gap: 0.1rem;
  padding: 0.75rem;
  border: 1px solid rgba(118, 238, 255, 0.16);
  border-radius: 8px;
  background: rgba(8, 20, 28, 0.58);
}

.import-readiness strong {
  color: var(--ops-cyan);
  font-size: 1.6rem;
  line-height: 1;
}

.import-readiness span {
  color: var(--ops-muted);
  font-size: 0.86rem;
}

.import-review-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 1rem;
}

.import-review-actions-launch {
  padding: 0.85rem;
  border: 1px solid rgba(40, 231, 255, 0.18);
  border-radius: 8px;
  background: rgba(7, 18, 25, 0.62);
}

.import-review-actions-launch span {
  margin-right: auto;
  color: #ffffff;
}

.import-review-actions-launch .btn-primary {
  min-width: 210px;
  box-shadow: 0 0 22px rgba(40, 231, 255, 0.2);
}

.import-order-preview {
  overflow: hidden;
}

.import-order-preview .table-responsive {
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 0;
  background: #02090d;
  scrollbar-color: rgba(40, 231, 255, 0.78) rgba(3, 13, 19, 0.9);
  scrollbar-width: thin;
}

.import-order-preview .table-responsive::-webkit-scrollbar {
  height: 12px;
}

.import-order-preview .table-responsive::-webkit-scrollbar-track {
  border: 3px solid #02090d;
  border-radius: 999px;
  background: #02090d;
}

.import-order-preview .table-responsive::-webkit-scrollbar-thumb {
  border: 3px solid #02090d;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(40, 231, 255, 0.62), var(--ops-cyan));
}

.import-order-preview .table-responsive::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(90deg, rgba(40, 231, 255, 0.82), #8ef6ff);
}

.import-preview-table {
  font-size: 0.9rem;
  width: max-content;
  min-width: 100%;
  margin-bottom: 0.28rem !important;
}

.import-preview-table th,
.import-preview-table td {
  min-width: 150px;
  white-space: nowrap;
  vertical-align: top;
}

.import-preview-table th {
  text-align: center;
}

.import-preview-table th:first-child,
.import-preview-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 4;
  min-width: 185px;
  text-align: center;
  vertical-align: middle;
  background:
    linear-gradient(rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0.01)),
    #07151d;
  border-left: 1px solid rgba(40, 231, 255, 0.18);
  border-right: 1px solid rgba(40, 231, 255, 0.2);
  box-shadow: 1px 0 0 rgba(40, 231, 255, 0.1);
}

.import-preview-table thead th:first-child {
  z-index: 3;
  background: rgba(19, 45, 57, 0.98);
}

.import-preview-table th.import-preview-reference-column,
.import-preview-table td.import-preview-reference-column {
  min-width: 170px;
}

.import-preview-table th.import-preview-item-column,
.import-preview-table td.import-preview-item-column {
  min-width: 275px;
  white-space: normal;
}

.import-preview-table th.import-preview-repair-column,
.import-preview-table td.import-preview-repair-column {
  min-width: 100px;
  width: 100px;
}

.import-preview-table td:not(.import-preview-item-column) {
  white-space: normal;
}

.import-preview-items {
  display: grid;
  gap: 0.35rem;
  min-width: 240px;
  white-space: normal;
}

.import-preview-items span {
  color: var(--ops-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.import-preview-item-cell {
  display: grid;
  gap: 0.14rem;
  min-width: 210px;
  align-content: start;
}

.import-preview-item-cell strong {
  color: var(--ops-text);
  font-weight: 800;
}

.import-preview-item-cell span,
.import-preview-empty-item {
  color: var(--ops-muted);
  font-size: 0.82rem;
}

.import-preview-detail-cell {
  display: grid;
  gap: 0.14rem;
  min-width: 190px;
  align-content: start;
}

.import-preview-detail-cell strong {
  color: var(--ops-text);
  font-weight: 800;
}

.import-preview-detail-cell span {
  color: var(--ops-muted);
  font-size: 0.82rem;
}

.import-preview-customer-column .import-preview-detail-cell strong {
  font-weight: 850;
}

.import-preview-customer-column .import-preview-detail-cell span {
  color: var(--ops-muted);
  font-size: 0.78rem;
}

.import-preview-tech-column .import-preview-detail-cell strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  font-weight: 650;
  line-height: 1.35;
}

.import-preview-item-count {
  color: var(--ops-cyan);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

.import-preview-item {
  display: grid;
  gap: 0.08rem;
  padding-left: 0.55rem;
  border-left: 2px solid rgba(40, 231, 255, 0.5);
}

.import-preview-item strong,
.import-grouping-items strong {
  color: var(--ops-text);
  font-weight: 800;
}

.service-order-item-row.import-grouping-row {
  grid-template-columns: minmax(110px, auto) minmax(210px, 320px) minmax(280px, 560px);
  justify-content: start;
}

.import-grouping-items {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.import-grouping-items > div {
  display: grid;
  gap: 0.08rem;
}

.import-grouping-items span {
  color: var(--ops-muted);
  font-size: 0.78rem;
}

@media (max-width: 767.98px) {
  .service-order-item-row.import-grouping-row {
    grid-template-columns: minmax(96px, auto) minmax(0, 1fr);
  }

  .import-grouping-items {
    grid-column: 2;
  }
}

.import-preview-status-warnings {
  display: grid;
  gap: 0.2rem;
  color: var(--ops-muted);
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.32;
  text-align: center;
  white-space: normal;
}

.import-preview-status-ready {
  color: var(--ops-green);
  font-size: 0.8rem;
  font-weight: 800;
}

.import-preview-table td.import-preview-value-warning :is(.import-preview-detail-cell strong, .import-preview-detail-cell span, .import-preview-item-cell strong, .import-preview-item-cell span, .import-preview-empty-item) {
  color: #e3a347;
}

.import-mapping-row {
  cursor: pointer;
}

.import-mapping-row:hover,
.import-mapping-row:focus-visible {
  background: rgba(40, 231, 255, 0.08);
  outline: none;
}

.import-mapping-row.is-selected {
  background: rgba(40, 231, 255, 0.13);
  box-shadow: inset 3px 0 0 var(--ops-cyan);
}

.import-exit-modal[hidden] {
  display: none;
}

.import-exit-modal {
  position: fixed;
  inset: 0;
  z-index: 1800;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(6px);
}

.import-exit-dialog {
  width: min(100%, 520px);
  padding: 1.25rem;
  border: 1px solid rgba(40, 231, 255, 0.28);
  border-radius: 8px;
  background: #061017;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.import-exit-dialog h2 {
  margin-bottom: 0.75rem;
  color: var(--ops-text);
}

.import-exit-dialog p {
  margin-bottom: 0.65rem;
  color: var(--ops-muted);
}

.import-exit-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 1.2rem;
}

.import-review-modal-open {
  overflow: hidden;
}

.import-review-workspace-modal[hidden] {
  display: none;
}

.import-review-workspace-modal {
  position: fixed;
  inset: 0;
  z-index: 1900;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: var(--import-review-backdrop, rgba(0, 0, 0, 0.68));
  backdrop-filter: blur(7px);
}

.import-review-workspace-dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1680px, 96vw);
  height: min(980px, 92vh);
  border: 1px solid var(--import-review-dialog-border, rgba(40, 231, 255, 0.34));
  border-radius: 8px;
  background: var(--import-review-dialog-surface, #041016);
  box-shadow: var(--import-review-dialog-shadow, 0 28px 90px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06));
  overflow: hidden;
}

.import-review-workspace-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--import-review-header-border, rgba(40, 231, 255, 0.18));
  background: var(--import-review-header-surface,
    linear-gradient(135deg, rgba(40, 231, 255, 0.08), rgba(84, 241, 166, 0.035)),
    rgba(5, 16, 23, 0.96));
}

.import-review-workspace-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: flex-end;
}

.import-review-workspace-dialog iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--import-review-frame-surface, #061017);
}

@media (max-width: 720px) {
  .import-header {
    display: grid;
  }

  .import-header .btn,
  .import-header .d-flex {
    width: 100%;
  }

  .import-steps span {
    flex: 1 1 160px;
  }

  .import-health-hero {
    grid-template-columns: 1fr;
  }

  .import-health-hero-checks {
    grid-template-columns: 1fr;
  }

  .import-health-scoreboard,
  .import-readiness,
  .import-health-list {
    grid-template-columns: 1fr;
  }

  .import-review-workspace-modal {
    padding: 0.5rem;
  }

  .import-review-workspace-dialog {
    width: 100%;
    height: min(900px, 96vh);
  }

  .import-review-workspace-header {
    display: grid;
    padding: 0.85rem;
  }

  .import-review-workspace-actions {
    justify-content: flex-start;
  }
}

html {
  background: var(--app-canvas);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--app-canvas);
}

[data-p2p-theme="light"] {
  --import-stat-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(235, 246, 250, 0.82)), var(--frost-surface);
  --import-stat-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 8px 20px rgba(31, 58, 72, 0.09);
  --import-stat-label-color: var(--frost-text-primary);
  --import-review-backdrop: rgba(22, 47, 59, 0.42);
  --import-review-dialog-border: rgba(32, 137, 166, 0.34);
  --import-review-dialog-surface: var(--frost-surface);
  --import-review-dialog-shadow: 0 20px 58px rgba(21, 52, 67, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.96);
  --import-review-header-border: rgba(67, 101, 119, 0.2);
  --import-review-header-surface: linear-gradient(135deg, rgba(216, 247, 253, 0.9), rgba(241, 250, 252, 0.95)), var(--frost-surface);
  --import-review-frame-surface: #ffffff;
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] {
    --import-stat-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(235, 246, 250, 0.82)), var(--frost-surface);
    --import-stat-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 8px 20px rgba(31, 58, 72, 0.09);
    --import-stat-label-color: var(--frost-text-primary);
    --import-review-backdrop: rgba(22, 47, 59, 0.42);
    --import-review-dialog-border: rgba(32, 137, 166, 0.34);
    --import-review-dialog-surface: var(--frost-surface);
    --import-review-dialog-shadow: 0 20px 58px rgba(21, 52, 67, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.96);
    --import-review-header-border: rgba(67, 101, 119, 0.2);
    --import-review-header-surface: linear-gradient(135deg, rgba(216, 247, 253, 0.9), rgba(241, 250, 252, 0.95)), var(--frost-surface);
    --import-review-frame-surface: #ffffff;
  }
}

[data-p2p-theme="light"] :is(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6),
[data-p2p-theme="light"] :is(dd, p, li),
[data-p2p-theme="light"] :is(.command-header h1, .export-page-header h1, .kpi-management-body strong, .kpi-attention-card strong, .kpi-attention-card b),
[data-p2p-theme="light"] :is(.dispatch-exception-card strong, .dispatch-workflow-card strong, .company-admin-card h3),
[data-p2p-theme="light"] :is(.platform-dashboard .platform-company-card h3, .platform-dashboard .platform-attention-card h3),
[data-p2p-theme="light"] .table td,
[data-p2p-theme="light"] .table th,
[data-p2p-theme="light"] .dispatch-coverage-table,
[data-p2p-theme="light"] .export-preview-panel .table td {
  color: var(--ops-text);
}

[data-p2p-theme="light"] :is(.text-secondary, .form-text, .table > :not(caption) > * > .text-secondary),
[data-p2p-theme="light"] :is(.command-header p, .kpi-management-body span, .kpi-management-trend, .kpi-management-goal),
[data-p2p-theme="light"] :is(.dispatch-card-description, .kpi-attention-card small, .kpi-trend-note, .kpi-refresh-stamp),
[data-p2p-theme="light"] :is(.platform-dashboard .platform-company-card p, .platform-dashboard .platform-stat-card small) {
  color: var(--ops-muted) !important;
}

[data-p2p-theme="light"] :is(
  .panel-standard,
  form.border,
  .table-responsive,
  .modal-content,
  .media-card,
  .media-preview-item,
  .history-report-preview,
  aside > .border,
  section > .border,
  .col-12 > .border,
  .col-md-4 > .border,
  .preferences-panel,
  .dashboard-panel,
  .kpi-filter-panel,
  .kpi-status-panel,
  .kpi-outcome-panel,
  .kpi-attention-panel,
  .command-panel,
  .order-list-tools,
  .export-control-panel,
  .export-preview-panel,
  .export-side-panel,
  .platform-dashboard .platform-stat-card,
  .platform-dashboard .platform-company-card,
  .platform-dashboard .platform-attention-card,
  .platform-dashboard .platform-table-section,
  .company-admin-card
) {
  border-color: var(--panel-border) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.5) 48%, rgba(238, 246, 249, 0.72)),
    rgba(251, 253, 254, 0.94) !important;
  box-shadow: var(--panel-shadow) !important;
  backdrop-filter: blur(14px) saturate(1.08);
}

[data-p2p-theme="light"] :is(.kpi-management-card, .command-kpi) {
  color: var(--kpi-tone-color, var(--command-tone-color, var(--ops-cyan)));
  border-color: color-mix(in srgb, currentColor 34%, rgba(97, 126, 142, 0.24));
  background:
    radial-gradient(circle at 84% 18%, color-mix(in srgb, currentColor 14%, transparent), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.52) 54%),
    color-mix(in srgb, currentColor 7%, #fbfdfe) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 16px 38px rgba(30, 61, 76, 0.12),
    0 0 0 1px color-mix(in srgb, currentColor 8%, transparent) !important;
}

[data-p2p-theme="light"] .command-kpi-context {
  border-bottom-color: rgba(67, 101, 119, 0.22);
}

[data-p2p-theme="light"] .command-kpi-context h2 {
  color: var(--frost-action-strong);
}

[data-p2p-theme="light"] .command-kpi span:not(.command-kpi-icon),
[data-p2p-theme="light"] .dispatch-card-copy,
[data-p2p-theme="light"] .dispatch-card-label,
[data-p2p-theme="light"] .kpi-outcome-label,
[data-p2p-theme="light"] .kpi-outcome-bar strong,
[data-p2p-theme="light"] .kpi-status-label {
  color: var(--ops-text);
}

[data-p2p-theme="light"] :is(.kpi-management-card::after, .dispatch-card-divider) {
  background: color-mix(in srgb, currentColor 18%, rgba(42, 78, 94, 0.18));
}

[data-p2p-theme="light"] .kpi-outcome-track {
  border-color: rgba(86, 120, 136, 0.2);
  background: #d7e6ed;
  box-shadow: inset 0 1px 2px rgba(48, 79, 94, 0.16);
}

[data-p2p-theme="light"] .kpi-attention-card {
  color: var(--ops-text);
  background:
    radial-gradient(circle at 12% 18%, color-mix(in srgb, var(--kpi-attention-color, var(--ops-cyan)) 12%, transparent), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(246, 251, 253, 0.7)),
    rgba(251, 253, 254, 0.94);
}

[data-p2p-theme="light"] :is(.form-control, .form-select, .export-workspace .form-control, .export-workspace .form-select, .command-date-form .form-control) {
  color: var(--ops-text);
  color-scheme: light;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 249, 252, 0.86)),
    #ffffff;
  border-color: rgba(81, 118, 136, 0.34);
  box-shadow: inset 0 1px 1px rgba(37, 73, 90, 0.07);
}

[data-p2p-theme="light"] :is(.form-control:focus, .form-select:focus, .export-workspace .form-control:focus, .command-date-form .form-control:focus) {
  color: var(--ops-text);
  background-color: #ffffff;
  border-color: var(--ops-cyan);
  box-shadow: 0 0 0 0.2rem rgba(40, 199, 225, 0.18), 0 12px 26px rgba(24, 92, 112, 0.12);
}

[data-p2p-theme="light"] :is(.form-control::placeholder) {
  color: #77909b;
}

[data-p2p-theme="light"] :is(.form-control:disabled, .form-select:disabled) {
  color: #81949d;
  background-color: #e9f1f5;
}

[data-p2p-theme="light"] :is(.form-label, dt, .export-workspace .form-label, .client-billing-primary-note .form-label) {
  color: #31566a;
}

[data-p2p-theme="light"] :is(.form-select option, select option) {
  color: var(--ops-text);
  background-color: #ffffff;
}

[data-p2p-theme="light"] .table {
  --bs-table-bg: rgba(251, 253, 254, 0.62);
  --bs-table-color: var(--ops-text);
  --bs-table-border-color: rgba(73, 112, 132, 0.2);
  --bs-table-hover-bg: rgba(40, 199, 225, 0.12);
  --bs-table-hover-color: var(--ops-text);
}

[data-p2p-theme="light"] :is(.table-light, .table th, .dispatch-coverage-table thead th, .export-preview-panel .table th, .platform-dashboard .platform-company-table thead th) {
  --bs-table-bg: #e4f1f6;
  --bs-table-color: #244b5d;
  color: #244b5d;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), transparent 60%),
    #e4f1f6;
  border-color: rgba(73, 112, 132, 0.22);
}

[data-p2p-theme="light"] :is(.table td, .table th, .dispatch-coverage-table tbody td, .export-preview-panel .table td, .export-preview-panel .table th) {
  border-color: rgba(73, 112, 132, 0.18);
}

[data-p2p-theme="light"] :is(.dispatch-coverage-table-wrap, .export-preview-table-wrap, .platform-dashboard .platform-table-wrap) {
  border-color: var(--panel-border);
  background: rgba(251, 253, 254, 0.72);
}

[data-p2p-theme="light"] :is(.dispatch-coverage-table tbody tr:hover, .order-list-table tbody tr:hover) {
  background: rgba(40, 199, 225, 0.1);
}

[data-p2p-theme="light"] .bg-white {
  background-color: rgba(251, 253, 254, 0.94) !important;
}

[data-p2p-theme="light"] .navbar .platform-current-company {
  color: var(--frost-text-primary);
}

[data-p2p-theme="light"] :is(
  .dispatch-dashboard-panel,
  .dispatch-dashboard-exceptions,
  .dispatch-dashboard-map-panel,
  .tech-workday-sidebar,
  .tech-workday-calendar-panel,
  .import-panel,
  .import-field-group,
  .import-health-hero,
  .import-readiness,
  .import-order-preview,
  .import-review-actions,
  .import-review-actions-launch
) {
  border-color: var(--panel-border) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 251, 253, 0.72) 58%, rgba(235, 245, 249, 0.72)),
    rgba(251, 253, 254, 0.95) !important;
  box-shadow: var(--panel-shadow) !important;
}

[data-p2p-theme="light"] :is(
  .dispatch-dashboard-hero h1,
  .dispatch-dashboard-section-heading h2,
  .dispatch-dashboard-panel-header h2,
  .tech-workday-header h1,
  .tech-workday-calendar-header h2,
  .tech-workday-panel-heading h2,
  .tech-workday-summary h2,
  .import-field-group h2,
  .import-card-heading h2,
  .import-health-hero h2
) {
  color: var(--text-heading) !important;
  text-shadow: none;
}

[data-p2p-theme="light"] :is(
  .dispatch-dashboard-hero p,
  .dispatch-dashboard-panel-header p,
  .dispatch-dashboard-map-status,
  .tech-workday-panel-heading span,
  .tech-workday-tech-copy span,
  .tech-workday-tech-cell small,
  .tech-workday-summary-grid span,
  .tech-workday-day-count,
  .tech-workday-empty-cell,
  .tech-workday-empty-panel,
  .tech-workday-empty-workspace,
  .import-results-title-line small,
  .import-title-file,
  .import-file-name
) {
  color: var(--ops-muted) !important;
}

[data-p2p-theme="light"] :is(.dispatch-exception-card, .dispatch-workflow-card) {
  border-color: color-mix(in srgb, currentColor 42%, rgba(79, 111, 128, 0.22));
  background:
    radial-gradient(circle at 12% 18%, color-mix(in srgb, currentColor 13%, transparent), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(247, 251, 253, 0.66)),
    color-mix(in srgb, currentColor 6%, #fbfdfe) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 12px 30px rgba(31, 58, 72, 0.1) !important;
}

[data-p2p-theme="light"] :is(.dispatch-exception-card .dispatch-card-copy, .dispatch-card-copy, .dispatch-card-label) {
  color: var(--ops-text) !important;
}

[data-p2p-theme="light"] .dispatch-card-arrow {
  color: color-mix(in srgb, currentColor 70%, #173344);
}

[data-p2p-theme="light"] :is(.tech-workday-corner, .tech-workday-column-heading, .tech-workday-tech-cell) {
  color: var(--ops-text);
  background:
    linear-gradient(180deg, #edf7fb, #dbeaf1);
  border-color: rgba(51, 110, 132, 0.22);
}

[data-p2p-theme="light"] .tech-workday-calendar-header {
  border-color: rgba(40, 199, 225, 0.42);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(232, 246, 251, 0.72)),
    #edf7fb;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 0 0 1px rgba(40, 199, 225, 0.12),
    0 12px 28px rgba(31, 58, 72, 0.1);
}

[data-p2p-theme="light"] .tech-workday-selected-count span {
  color: #16677b;
}

[data-p2p-theme="light"] .tech-workday-day-cell {
  color: var(--ops-text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.52), transparent 46%),
    rgba(247, 251, 253, 0.86);
  border-color: rgba(51, 110, 132, 0.18);
  border-image: none;
}

[data-p2p-theme="light"] .tech-workday-day-cell:hover,
[data-p2p-theme="light"] .tech-workday-day-cell:focus {
  background:
    linear-gradient(180deg, rgba(40, 199, 225, 0.13), transparent 48%),
    rgba(238, 248, 252, 0.96);
}

[data-p2p-theme="light"] .tech-workday-day-today {
  background:
    linear-gradient(180deg, rgba(40, 199, 225, 0.16), transparent 54%),
    rgba(229, 245, 251, 0.96);
}

[data-p2p-theme="light"] .tech-workday-day-selected {
  box-shadow:
    inset 2px 0 0 rgba(40, 199, 225, 0.54),
    inset -2px 0 0 rgba(40, 199, 225, 0.54),
    inset 0 0 0 1px rgba(40, 199, 225, 0.18);
}

[data-p2p-theme="light"] :is(.tech-workday-tech-option, .tech-workday-summary-grid div, .tech-workday-stop-row, .import-dropzone) {
  color: var(--ops-text);
  border-color: rgba(70, 113, 132, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(240, 248, 251, 0.72)),
    rgba(251, 253, 254, 0.86);
}

[data-p2p-theme="light"] :is(.tech-workday-tech-option:hover, .tech-workday-tech-option:focus-within, .tech-workday-stop-row:hover, .tech-workday-stop-row:focus, .import-dropzone:hover, .import-dropzone:focus-within, .import-dropzone.is-dragging) {
  color: var(--ops-text);
  border-color: rgba(40, 199, 225, 0.48);
  background:
    linear-gradient(180deg, rgba(40, 199, 225, 0.12), rgba(240, 250, 253, 0.86)),
    rgba(251, 253, 254, 0.96);
  box-shadow: 0 0 0 1px rgba(40, 199, 225, 0.12), 0 12px 26px rgba(31, 58, 72, 0.1);
}

[data-p2p-theme="light"] :is(.tech-workday-stop-row strong, .tech-workday-so-number, .tech-workday-window-pill) {
  color: var(--ops-text);
}

[data-p2p-theme="light"] .tech-workday-window-pill {
  border-color: rgba(70, 113, 132, 0.22);
  background: rgba(231, 241, 247, 0.88);
}

[data-p2p-theme="light"] .import-steps span {
  color: #486474;
  border-color: rgba(70, 113, 132, 0.18);
  background: rgba(229, 239, 245, 0.72);
}

[data-p2p-theme="light"] .import-steps .active {
  color: var(--ops-text);
  border-color: rgba(40, 199, 225, 0.42);
  background: rgba(40, 199, 225, 0.14);
}

[data-p2p-theme="light"] :is(.import-select-button, .import-file-picker) {
  color: var(--ops-text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 249, 252, 0.86)),
    #ffffff;
  border-color: rgba(81, 118, 136, 0.34);
}

[data-p2p-theme="light"] .import-select-menu {
  border-color: rgba(40, 199, 225, 0.38);
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(31, 58, 72, 0.18), 0 0 0 1px rgba(40, 199, 225, 0.08);
}

[data-p2p-theme="light"] .import-select-option {
  color: var(--ops-text);
}

[data-p2p-theme="light"] .import-select-option:hover,
[data-p2p-theme="light"] .import-select-option:focus,
[data-p2p-theme="light"] .import-select-option.is-selected {
  color: #062532;
  background: rgba(40, 199, 225, 0.16);
}

[data-p2p-theme="light"] .import-file-button {
  color: #06313e;
  background: rgba(40, 199, 225, 0.18);
  border-color: rgba(40, 199, 225, 0.32);
}

[data-p2p-theme="light"] :is(.table-active, .table-active > *, .order-list-table tr.table-active > *, .order-list-table tr.selected > *) {
  --bs-table-bg: rgba(40, 199, 225, 0.16);
  --bs-table-color: var(--ops-text);
  color: var(--ops-text) !important;
  background: rgba(40, 199, 225, 0.16) !important;
}

[data-p2p-theme="light"] :is(.badge.text-bg-primary, .badge.bg-primary) {
  color: #041f2a !important;
  background-color: #5bcff0 !important;
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] :is(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6),
  [data-p2p-theme="auto"] :is(dd, p, li),
  [data-p2p-theme="auto"] :is(.command-header h1, .export-page-header h1, .kpi-management-body strong, .kpi-attention-card strong, .kpi-attention-card b),
  [data-p2p-theme="auto"] :is(.dispatch-exception-card strong, .dispatch-workflow-card strong, .company-admin-card h3),
  [data-p2p-theme="auto"] :is(.platform-dashboard .platform-company-card h3, .platform-dashboard .platform-attention-card h3),
  [data-p2p-theme="auto"] .table td,
  [data-p2p-theme="auto"] .table th,
  [data-p2p-theme="auto"] .dispatch-coverage-table,
  [data-p2p-theme="auto"] .export-preview-panel .table td {
    color: var(--ops-text);
  }

  [data-p2p-theme="auto"] :is(.text-secondary, .form-text, .table > :not(caption) > * > .text-secondary),
  [data-p2p-theme="auto"] :is(.command-header p, .kpi-management-body span, .kpi-management-trend, .kpi-management-goal),
  [data-p2p-theme="auto"] :is(.dispatch-card-description, .kpi-attention-card small, .kpi-trend-note, .kpi-refresh-stamp),
  [data-p2p-theme="auto"] :is(.platform-dashboard .platform-company-card p, .platform-dashboard .platform-stat-card small) {
    color: var(--ops-muted) !important;
  }

  [data-p2p-theme="auto"] :is(
    .panel-standard,
    form.border,
    .table-responsive,
    .modal-content,
    .media-card,
    .media-preview-item,
    .history-report-preview,
    aside > .border,
    section > .border,
    .col-12 > .border,
    .col-md-4 > .border,
    .preferences-panel,
    .dashboard-panel,
    .kpi-filter-panel,
    .kpi-status-panel,
    .kpi-outcome-panel,
    .kpi-attention-panel,
    .command-panel,
    .order-list-tools,
    .export-control-panel,
    .export-preview-panel,
    .export-side-panel,
    .platform-dashboard .platform-stat-card,
    .platform-dashboard .platform-company-card,
    .platform-dashboard .platform-attention-card,
    .platform-dashboard .platform-table-section,
    .company-admin-card
  ) {
    border-color: var(--panel-border) !important;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.5) 48%, rgba(238, 246, 249, 0.72)),
      rgba(251, 253, 254, 0.94) !important;
    box-shadow: var(--panel-shadow) !important;
    backdrop-filter: blur(14px) saturate(1.08);
  }

  [data-p2p-theme="auto"] :is(.kpi-management-card, .command-kpi) {
    color: var(--kpi-tone-color, var(--command-tone-color, var(--ops-cyan)));
    border-color: color-mix(in srgb, currentColor 34%, rgba(97, 126, 142, 0.24));
    background:
      radial-gradient(circle at 84% 18%, color-mix(in srgb, currentColor 14%, transparent), transparent 42%),
      linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.52) 54%),
      color-mix(in srgb, currentColor 7%, #fbfdfe) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.9),
      0 16px 38px rgba(30, 61, 76, 0.12),
      0 0 0 1px color-mix(in srgb, currentColor 8%, transparent) !important;
  }

  [data-p2p-theme="auto"] .command-kpi-context {
    border-bottom-color: rgba(67, 101, 119, 0.22);
  }

  [data-p2p-theme="auto"] .command-kpi-context h2 {
    color: var(--frost-action-strong);
  }

  [data-p2p-theme="auto"] .command-kpi span:not(.command-kpi-icon),
  [data-p2p-theme="auto"] .dispatch-card-copy,
  [data-p2p-theme="auto"] .dispatch-card-label,
  [data-p2p-theme="auto"] .kpi-outcome-label,
  [data-p2p-theme="auto"] .kpi-outcome-bar strong,
  [data-p2p-theme="auto"] .kpi-status-label {
    color: var(--ops-text);
  }

  [data-p2p-theme="auto"] :is(.kpi-management-card::after, .dispatch-card-divider) {
    background: color-mix(in srgb, currentColor 18%, rgba(42, 78, 94, 0.18));
  }

  [data-p2p-theme="auto"] .kpi-outcome-track {
    border-color: rgba(86, 120, 136, 0.2);
    background: #d7e6ed;
    box-shadow: inset 0 1px 2px rgba(48, 79, 94, 0.16);
  }

  [data-p2p-theme="auto"] .kpi-attention-card {
    color: var(--ops-text);
    background:
      radial-gradient(circle at 12% 18%, color-mix(in srgb, var(--kpi-attention-color, var(--ops-cyan)) 12%, transparent), transparent 42%),
      linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(246, 251, 253, 0.7)),
      rgba(251, 253, 254, 0.94);
  }

  [data-p2p-theme="auto"] :is(.form-control, .form-select, .export-workspace .form-control, .export-workspace .form-select, .command-date-form .form-control) {
    color: var(--ops-text);
    color-scheme: light;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 249, 252, 0.86)),
      #ffffff;
    border-color: rgba(81, 118, 136, 0.34);
    box-shadow: inset 0 1px 1px rgba(37, 73, 90, 0.07);
  }

  [data-p2p-theme="auto"] :is(.form-control:focus, .form-select:focus, .export-workspace .form-control:focus, .command-date-form .form-control:focus) {
    color: var(--ops-text);
    background-color: #ffffff;
    border-color: var(--ops-cyan);
    box-shadow: 0 0 0 0.2rem rgba(40, 199, 225, 0.18), 0 12px 26px rgba(24, 92, 112, 0.12);
  }

  [data-p2p-theme="auto"] :is(.form-control::placeholder) {
    color: #77909b;
  }

  [data-p2p-theme="auto"] :is(.form-control:disabled, .form-select:disabled) {
    color: #81949d;
    background-color: #e9f1f5;
  }

  [data-p2p-theme="auto"] :is(.form-label, dt, .export-workspace .form-label, .client-billing-primary-note .form-label) {
    color: #31566a;
  }

  [data-p2p-theme="auto"] :is(.form-select option, select option) {
    color: var(--ops-text);
    background-color: #ffffff;
  }

  [data-p2p-theme="auto"] .table {
    --bs-table-bg: rgba(251, 253, 254, 0.62);
    --bs-table-color: var(--ops-text);
    --bs-table-border-color: rgba(73, 112, 132, 0.2);
    --bs-table-hover-bg: rgba(40, 199, 225, 0.12);
    --bs-table-hover-color: var(--ops-text);
  }

  [data-p2p-theme="auto"] :is(.table-light, .table th, .dispatch-coverage-table thead th, .export-preview-panel .table th, .platform-dashboard .platform-company-table thead th) {
    --bs-table-bg: #e4f1f6;
    --bs-table-color: #244b5d;
    color: #244b5d;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.58), transparent 60%),
      #e4f1f6;
    border-color: rgba(73, 112, 132, 0.22);
  }

  [data-p2p-theme="auto"] :is(.table td, .table th, .dispatch-coverage-table tbody td, .export-preview-panel .table td, .export-preview-panel .table th) {
    border-color: rgba(73, 112, 132, 0.18);
  }

  [data-p2p-theme="auto"] :is(.dispatch-coverage-table-wrap, .export-preview-table-wrap, .platform-dashboard .platform-table-wrap) {
    border-color: var(--panel-border);
    background: rgba(251, 253, 254, 0.72);
  }

  [data-p2p-theme="auto"] :is(.dispatch-coverage-table tbody tr:hover, .order-list-table tbody tr:hover) {
    background: rgba(40, 199, 225, 0.1);
  }

  [data-p2p-theme="auto"] .bg-white {
    background-color: rgba(251, 253, 254, 0.94) !important;
  }

  [data-p2p-theme="auto"] .navbar .platform-current-company {
    color: var(--frost-text-primary);
  }

  [data-p2p-theme="auto"] :is(
    .dispatch-dashboard-panel,
    .dispatch-dashboard-exceptions,
    .dispatch-dashboard-map-panel,
    .tech-workday-sidebar,
    .tech-workday-calendar-panel,
    .import-panel,
    .import-field-group,
    .import-health-hero,
    .import-readiness,
    .import-order-preview,
    .import-review-actions,
    .import-review-actions-launch
  ) {
    border-color: var(--panel-border) !important;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 251, 253, 0.72) 58%, rgba(235, 245, 249, 0.72)),
      rgba(251, 253, 254, 0.95) !important;
    box-shadow: var(--panel-shadow) !important;
  }

  [data-p2p-theme="auto"] :is(
    .dispatch-dashboard-hero h1,
    .dispatch-dashboard-section-heading h2,
    .dispatch-dashboard-panel-header h2,
    .tech-workday-header h1,
    .tech-workday-calendar-header h2,
    .tech-workday-panel-heading h2,
    .tech-workday-summary h2,
    .import-field-group h2,
    .import-card-heading h2,
    .import-health-hero h2
  ) {
    color: var(--text-heading) !important;
    text-shadow: none;
  }

  [data-p2p-theme="auto"] :is(
    .dispatch-dashboard-hero p,
    .dispatch-dashboard-panel-header p,
    .dispatch-dashboard-map-status,
    .tech-workday-panel-heading span,
    .tech-workday-tech-copy span,
    .tech-workday-tech-cell small,
    .tech-workday-summary-grid span,
    .tech-workday-day-count,
    .tech-workday-empty-cell,
    .tech-workday-empty-panel,
    .tech-workday-empty-workspace,
    .import-results-title-line small,
    .import-title-file,
    .import-file-name
  ) {
    color: var(--ops-muted) !important;
  }

  [data-p2p-theme="auto"] :is(.dispatch-exception-card, .dispatch-workflow-card) {
    border-color: color-mix(in srgb, currentColor 42%, rgba(79, 111, 128, 0.22));
    background:
      radial-gradient(circle at 12% 18%, color-mix(in srgb, currentColor 13%, transparent), transparent 42%),
      linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(247, 251, 253, 0.66)),
      color-mix(in srgb, currentColor 6%, #fbfdfe) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.92),
      0 12px 30px rgba(31, 58, 72, 0.1) !important;
  }

  [data-p2p-theme="auto"] :is(.dispatch-exception-card .dispatch-card-copy, .dispatch-card-copy, .dispatch-card-label) {
    color: var(--ops-text) !important;
  }

  [data-p2p-theme="auto"] .dispatch-card-arrow {
    color: color-mix(in srgb, currentColor 70%, #173344);
  }

  [data-p2p-theme="auto"] :is(.tech-workday-corner, .tech-workday-column-heading, .tech-workday-tech-cell) {
    color: var(--ops-text);
    background:
      linear-gradient(180deg, #edf7fb, #dbeaf1);
    border-color: rgba(51, 110, 132, 0.22);
  }

  [data-p2p-theme="auto"] .tech-workday-calendar-header {
    border-color: rgba(40, 199, 225, 0.42);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(232, 246, 251, 0.72)),
      #edf7fb;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.9),
      0 0 0 1px rgba(40, 199, 225, 0.12),
      0 12px 28px rgba(31, 58, 72, 0.1);
  }

  [data-p2p-theme="auto"] .tech-workday-selected-count span {
    color: #16677b;
  }

  [data-p2p-theme="auto"] .tech-workday-day-cell {
    color: var(--ops-text);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.52), transparent 46%),
      rgba(247, 251, 253, 0.86);
    border-color: rgba(51, 110, 132, 0.18);
    border-image: none;
  }

  [data-p2p-theme="auto"] .tech-workday-day-cell:hover,
  [data-p2p-theme="auto"] .tech-workday-day-cell:focus {
    background:
      linear-gradient(180deg, rgba(40, 199, 225, 0.13), transparent 48%),
      rgba(238, 248, 252, 0.96);
  }

  [data-p2p-theme="auto"] .tech-workday-day-today {
    background:
      linear-gradient(180deg, rgba(40, 199, 225, 0.16), transparent 54%),
      rgba(229, 245, 251, 0.96);
  }

  [data-p2p-theme="auto"] .tech-workday-day-selected {
    box-shadow:
      inset 2px 0 0 rgba(40, 199, 225, 0.54),
      inset -2px 0 0 rgba(40, 199, 225, 0.54),
      inset 0 0 0 1px rgba(40, 199, 225, 0.18);
  }

  [data-p2p-theme="auto"] :is(.tech-workday-tech-option, .tech-workday-summary-grid div, .tech-workday-stop-row, .import-dropzone) {
    color: var(--ops-text);
    border-color: rgba(70, 113, 132, 0.22);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(240, 248, 251, 0.72)),
      rgba(251, 253, 254, 0.86);
  }

  [data-p2p-theme="auto"] :is(.tech-workday-tech-option:hover, .tech-workday-tech-option:focus-within, .tech-workday-stop-row:hover, .tech-workday-stop-row:focus, .import-dropzone:hover, .import-dropzone:focus-within, .import-dropzone.is-dragging) {
    color: var(--ops-text);
    border-color: rgba(40, 199, 225, 0.48);
    background:
      linear-gradient(180deg, rgba(40, 199, 225, 0.12), rgba(240, 250, 253, 0.86)),
      rgba(251, 253, 254, 0.96);
    box-shadow: 0 0 0 1px rgba(40, 199, 225, 0.12), 0 12px 26px rgba(31, 58, 72, 0.1);
  }

  [data-p2p-theme="auto"] :is(.tech-workday-stop-row strong, .tech-workday-so-number, .tech-workday-window-pill) {
    color: var(--ops-text);
  }

  [data-p2p-theme="auto"] .tech-workday-window-pill {
    border-color: rgba(70, 113, 132, 0.22);
    background: rgba(231, 241, 247, 0.88);
  }

  [data-p2p-theme="auto"] .import-steps span {
    color: #486474;
    border-color: rgba(70, 113, 132, 0.18);
    background: rgba(229, 239, 245, 0.72);
  }

  [data-p2p-theme="auto"] .import-steps .active {
    color: var(--ops-text);
    border-color: rgba(40, 199, 225, 0.42);
    background: rgba(40, 199, 225, 0.14);
  }

  [data-p2p-theme="auto"] :is(.import-select-button, .import-file-picker) {
    color: var(--ops-text);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 249, 252, 0.86)),
      #ffffff;
    border-color: rgba(81, 118, 136, 0.34);
  }

  [data-p2p-theme="auto"] .import-select-menu {
    border-color: rgba(40, 199, 225, 0.38);
    background: #ffffff;
    box-shadow: 0 18px 44px rgba(31, 58, 72, 0.18), 0 0 0 1px rgba(40, 199, 225, 0.08);
  }

  [data-p2p-theme="auto"] .import-select-option {
    color: var(--ops-text);
  }

  [data-p2p-theme="auto"] .import-select-option:hover,
  [data-p2p-theme="auto"] .import-select-option:focus,
  [data-p2p-theme="auto"] .import-select-option.is-selected {
    color: #062532;
    background: rgba(40, 199, 225, 0.16);
  }

  [data-p2p-theme="auto"] .import-file-button {
    color: #06313e;
    background: rgba(40, 199, 225, 0.18);
    border-color: rgba(40, 199, 225, 0.32);
  }

  [data-p2p-theme="auto"] :is(.table-active, .table-active > *, .order-list-table tr.table-active > *, .order-list-table tr.selected > *) {
    --bs-table-bg: rgba(40, 199, 225, 0.16);
    --bs-table-color: var(--ops-text);
    color: var(--ops-text) !important;
    background: rgba(40, 199, 225, 0.16) !important;
  }

  [data-p2p-theme="auto"] :is(.badge.text-bg-primary, .badge.bg-primary) {
    color: #041f2a !important;
    background-color: #5bcff0 !important;
  }
}

.preferences-shell {
  max-width: 760px;
  margin: 0 auto;
}

.preferences-heading {
  margin-bottom: 18px;
}

.preferences-panel {
  border: 1px solid var(--panel-border);
  border-radius: var(--panel-radius);
  background: var(--panel-background);
  box-shadow: var(--panel-shadow);
  padding: var(--panel-padding);
}

.preferences-panel legend {
  color: var(--text-heading);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.preferences-radio-list {
  display: grid;
  gap: 10px;
}

.preferences-radio-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: var(--panel-background-soft);
  color: var(--text-primary);
  padding: 10px 12px;
}

.preferences-radio-option span {
  display: grid;
  gap: 2px;
}

.preferences-radio-option small {
  color: var(--text-secondary);
  font-size: 0.86rem;
}

.preferences-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

[data-p2p-theme="dark"] .preferences-heading :is(h1, p),
[data-p2p-theme="dark"] .preferences-panel legend,
[data-p2p-theme="dark"] .preferences-radio-option strong {
  color: #edf9fc;
}

[data-p2p-theme="dark"] .preferences-panel {
  border-color: rgba(118, 238, 255, 0.46);
  background:
    linear-gradient(180deg, rgba(8, 21, 36, 0.9), rgba(5, 15, 28, 0.84)),
    rgba(7, 16, 28, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 0 0 1px rgba(40, 231, 255, 0.08),
    0 18px 42px rgba(0, 0, 0, 0.22);
}

[data-p2p-theme="dark"] .preferences-radio-option {
  border-color: rgba(118, 238, 255, 0.36);
  background:
    linear-gradient(180deg, rgba(8, 21, 30, 0.86), rgba(3, 13, 19, 0.82)),
    rgba(4, 12, 18, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

[data-p2p-theme="dark"] .preferences-radio-option:has(input:checked) {
  border-color: rgba(40, 231, 255, 0.78);
  background:
    linear-gradient(180deg, rgba(18, 47, 62, 0.78), rgba(5, 21, 30, 0.88)),
    rgba(4, 12, 18, 0.9);
  box-shadow:
    inset 3px 0 0 rgba(40, 231, 255, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

[data-p2p-theme="dark"] .preferences-radio-option small {
  color: #9eb8c3;
}

/* Midnight contrast restoration: stronger structure without changing Frost. */
[data-p2p-theme="dark"] {
  --panel-border: rgba(118, 238, 255, 0.42);
  --panel-border-strong: rgba(118, 238, 255, 0.62);
  --ops-line: #397084;
  --ops-muted: #9eb8c3;
  --bs-border-color: rgba(118, 238, 255, 0.42);
}

[data-p2p-theme="dark"] :is(
  .navbar,
  .app-domain-toggle,
  .shell-action-pill,
  .company-switcher-toggle,
  .btn-outline-primary,
  .btn-outline-secondary,
  .btn-outline-info,
  .dispatch-dashboard-tabs .btn,
  .nav-tabs .nav-link,
  #accountingTabs .nav-link
) {
  border-color: rgba(118, 238, 255, 0.52) !important;
}

[data-p2p-theme="dark"] .navbar {
  border-bottom-color: rgba(118, 238, 255, 0.56) !important;
  box-shadow:
    inset 0 -1px 0 rgba(118, 238, 255, 0.16),
    0 1px 0 rgba(40, 231, 255, 0.28),
    0 12px 26px rgba(0, 0, 0, 0.22) !important;
}

[data-p2p-theme="dark"] :is(
  .navbar .nav-link:hover,
  .navbar .nav-link:focus,
  .navbar .app-domain-toggle:hover,
  .navbar .app-domain-toggle:focus,
  .shell-action-pill:hover,
  .shell-action-pill:focus,
  .company-switcher-toggle:hover,
  .company-switcher-toggle:focus,
  .btn-outline-primary:hover,
  .btn-outline-primary:focus,
  .btn-outline-secondary:hover,
  .btn-outline-secondary:focus
) {
  border-color: rgba(40, 231, 255, 0.84) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 0.14rem rgba(40, 231, 255, 0.16) !important;
}

[data-p2p-theme="dark"] :is(
  .navbar .nav-link.active,
  .navbar .app-domain-toggle.active,
  .shell-action-pill.active,
  .dispatch-dashboard-tabs .btn.active,
  .nav-tabs .nav-link.active,
  #accountingTabs .nav-link.active,
  .btn-check:checked + .btn-outline-secondary
) {
  border-color: rgba(40, 231, 255, 0.92) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -2px 0 rgba(40, 231, 255, 0.78),
    0 0 22px rgba(40, 231, 255, 0.18) !important;
}

[data-p2p-theme="dark"] :is(.app-domain-menu, .company-switcher-menu, .dropdown-menu) {
  border-color: rgba(118, 238, 255, 0.52) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 42px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(40, 231, 255, 0.12) !important;
}

[data-p2p-theme="dark"] :is(
  .panel-standard,
  form.border,
  .table-responsive,
  .modal-content,
  .media-card,
  .media-preview-item,
  .history-report-preview,
  .login-panel,
  .preferences-panel,
  .dashboard-panel,
  .kpi-filter-panel,
  .kpi-status-panel,
  .kpi-outcome-panel,
  .kpi-attention-panel,
  .command-panel,
  .order-list-tools,
  .export-control-panel,
  .export-preview-panel,
  .export-side-panel,
  .platform-dashboard .platform-hero,
  .platform-dashboard .platform-brand-panel,
  .platform-dashboard .platform-stat-card,
  .platform-dashboard .platform-section,
  .platform-dashboard .platform-side-panel,
  .platform-dashboard .platform-company-card,
  .platform-dashboard .platform-attention-card,
  .platform-dashboard .platform-empty-state,
  .platform-dashboard .platform-future-card,
  .platform-dashboard .platform-table-wrap,
  .company-admin-card,
  .company-admin-context,
  .company-picker-section,
  .company-picker-row,
  .platform-company-form,
  .platform-company-active-field,
  .platform-membership-page .platform-section
) {
  border-color: rgba(118, 238, 255, 0.42) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.075),
    inset 0 -1px 0 rgba(40, 231, 255, 0.12),
    0 0 0 1px rgba(40, 231, 255, 0.035),
    0 16px 38px rgba(0, 0, 0, 0.22) !important;
}

[data-p2p-theme="dark"] :is(
  .platform-dashboard .platform-hero,
  .platform-dashboard .platform-section,
  .platform-dashboard .platform-side-panel,
  .preferences-panel
) {
  border-color: rgba(118, 238, 255, 0.56) !important;
}

[data-p2p-theme="dark"] :is(.border, .rounded, section > .border, aside > .border, .col-12 > .border, .col-md-4 > .border) {
  border-color: rgba(118, 238, 255, 0.42) !important;
}

[data-p2p-theme="dark"] :is(
  .form-control,
  .form-select,
  .export-workspace .form-control,
  .export-workspace .form-select,
  .command-date-form .form-control
) {
  border-color: rgba(118, 238, 255, 0.52);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 48%),
    rgba(4, 12, 18, 0.9);
}

[data-p2p-theme="dark"] :is(
  .form-control:focus,
  .form-select:focus,
  .export-workspace .form-control:focus,
  .export-workspace .form-select:focus,
  .command-date-form .form-control:focus
) {
  border-color: rgba(40, 231, 255, 0.82);
  box-shadow:
    0 0 0 0.18rem rgba(40, 231, 255, 0.13),
    0 0 18px rgba(40, 231, 255, 0.16);
}

[data-p2p-theme="dark"] :is(.table, .order-list-table, .dispatch-coverage-table, .import-preview-table) {
  --bs-table-border-color: rgba(118, 238, 255, 0.28);
  --bs-table-color: var(--ops-text);
}

[data-p2p-theme="dark"] :is(
  .table thead th,
  .table-light,
  .order-list-table thead th,
  .dispatch-coverage-table thead th,
  .import-preview-table thead th,
  .export-preview-panel .table th,
  .platform-dashboard .platform-company-table thead th
) {
  color: #e0f4f8 !important;
  border-color: rgba(118, 238, 255, 0.48) !important;
  background:
    linear-gradient(180deg, rgba(9, 27, 44, 0.98), rgba(4, 13, 25, 0.96)),
    rgba(3, 10, 21, 0.95) !important;
  box-shadow: inset 0 -1px 0 rgba(40, 231, 255, 0.22);
}

[data-p2p-theme="dark"] :is(
  .table td,
  .table th,
  .order-list-table tbody td,
  .dispatch-coverage-table tbody td,
  .import-preview-table tbody td,
  .export-preview-panel .table td,
  .export-preview-panel .table th,
  .platform-dashboard .platform-company-table td,
  .platform-dashboard .platform-company-table th
) {
  border-color: rgba(118, 238, 255, 0.28) !important;
}

[data-p2p-theme="dark"] :is(.alert, .command-alert) {
  border-color: rgba(118, 238, 255, 0.48) !important;
  box-shadow:
    inset 4px 0 0 rgba(40, 231, 255, 0.72),
    0 14px 32px rgba(0, 0, 0, 0.2) !important;
}

main {
  flex: 1 0 auto;
  width: 100%;
  max-width: none;
}

a {
  color: #67e8f9;
}

a:hover {
  color: #a5f3fc;
}

h1,
h2,
h3,
h4,
h5,
h6,
.fw-semibold,
strong {
  color: var(--ops-text);
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 1100;
  overflow: visible;
  background: linear-gradient(180deg, rgba(9, 21, 29, 0.88), rgba(5, 13, 18, 0.82)) !important;
  border-color: rgba(118, 238, 255, 0.22) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 1px 0 rgba(40, 231, 255, 0.22),
    0 18px 50px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px) saturate(1.28);
}

.navbar .dropdown-menu {
  z-index: 1101;
}

.app-navbar-collapse {
  flex: 1 1 auto;
  min-width: 0;
}

.global-service-order-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0.75rem 0 0;
}

.navbar-utility-actions {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
  gap: 0.5rem;
}

.global-service-order-create {
  flex: 0 0 auto;
  white-space: nowrap;
}

.global-service-order-search {
  position: relative;
  display: flex;
  flex: 0 1 260px;
  gap: 0.35rem;
  min-width: 210px;
  margin: 0;
}

.global-service-order-search .form-control {
  min-width: 0;
  padding-left: 2rem;
  border-color: rgba(118, 238, 255, 0.38);
  background: rgba(5, 13, 18, 0.42);
  color: var(--ops-text);
}

.global-service-order-search .form-control::placeholder {
  color: var(--ops-muted);
  opacity: 1;
}

.global-service-order-search .form-control:focus {
  border-color: rgba(40, 231, 255, 0.84);
  box-shadow: 0 0 0 0.14rem rgba(40, 231, 255, 0.16);
}

.global-service-order-search-icon {
  position: absolute;
  top: 50%;
  left: 0.58rem;
  z-index: 2;
  width: 0.95rem;
  height: 0.95rem;
  color: var(--ops-muted);
  pointer-events: none;
  transform: translateY(-50%);
}

.navbar .app-utility-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.brand-wordmark {
  width: clamp(138px, 15vw, 188px);
  height: 30px;
  background: none;
  filter: drop-shadow(0 0 7px rgba(40, 231, 255, 0.28));
}

.brand-wordmark:hover,
.brand-wordmark:focus {
  filter: drop-shadow(0 0 10px rgba(40, 231, 255, 0.5));
}

.brand-wordmark-platform {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  width: clamp(250px, 21vw, 350px);
  height: 46px;
  padding: 0 0.35rem;
  background: none;
}

.brand-wordmark-platform img {
  flex: 0 1 120px;
  display: block;
  width: 120px;
  height: 42px;
  object-fit: contain;
}

.brand-wordmark-platform img.tenant-brand-logo {
  flex-basis: 176px;
  width: 176px;
  height: 44px;
  padding: 0.16rem 0.3rem;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 4px;
  background: #9aa1a6;
  object-fit: contain;
}

.workspace-brand-identity {
  display: grid;
  min-width: 0;
  line-height: 1.15;
}

.workspace-brand-company {
  overflow: hidden;
  color: var(--text-primary, #f8fafc);
  font-size: 0.86rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-brand-product {
  display: flex;
  align-items: center;
  gap: 0.28rem;
  margin-top: 0.16rem;
  color: var(--text-secondary, #9fb7c3);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.product-beta-badge {
  flex: 0 0 auto;
  padding: 0.14rem 0.34rem;
  border: 1px solid rgba(40, 231, 255, 0.48);
  border-radius: 999px;
  color: #bff7ff;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.app-footer {
  display: grid;
  gap: 2px;
  flex-shrink: 0;
  padding: 0 1rem 1rem;
  color: rgba(137, 168, 179, 0.78);
  font-size: 0.76rem;
  text-align: right;
}

#aboutPath2PointModal {
  z-index: 1200;
}

body:has(#aboutPath2PointModal.show) .modal-backdrop {
  z-index: 1190;
}

#aboutPath2PointModal.show {
  display: flex !important;
  align-items: flex-start;
  overflow-y: auto;
  padding: 5rem 0 1rem;
}

.about-path2point-modal-dialog {
  display: flex;
  width: calc(100% - 2rem);
  max-width: 520px;
  max-height: calc(100dvh - 6rem);
  margin: 0 auto;
}

.about-path2point-modal {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  max-height: calc(100dvh - 6rem);
}

.about-path2point-modal .modal-header {
  flex: 0 0 auto;
  position: relative;
  display: block;
  padding-right: 3rem;
  border-bottom-color: rgba(40, 231, 255, 0.18);
}

.about-path2point-modal .modal-body {
  min-height: 0;
  overflow-y: auto;
}

.about-path2point-modal .btn-close {
  position: absolute;
  top: 1.25rem;
  right: 1rem;
}

.about-path2point-logo {
  display: block;
  width: min(280px, 100%);
  height: 56px;
  margin: 0 auto 14px;
  object-fit: contain;
  object-position: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.94);
}

.about-path2point-kicker {
  color: var(--ops-cyan);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.about-path2point-tagline {
  color: var(--ops-text);
  font-size: 1.02rem;
  font-weight: 700;
}

.about-path2point-details {
  display: grid;
  gap: 10px;
  margin: 0 0 1rem;
  padding: 12px;
  border: 1px solid rgba(40, 231, 255, 0.14);
  border-radius: 8px;
  background: rgba(5, 13, 18, 0.32);
}

.about-path2point-details div {
  display: grid;
  grid-template-columns: minmax(112px, 0.42fr) 1fr;
  gap: 12px;
}

.about-path2point-details dt {
  color: var(--ops-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.about-path2point-details dd {
  margin: 0;
  color: var(--ops-text);
}

.about-path2point-note {
  color: var(--ops-muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.about-path2point-whats-new {
  margin: 0 0 1rem;
  padding: 12px;
  border: 1px solid rgba(40, 231, 255, 0.14);
  border-radius: 8px;
  background: rgba(5, 13, 18, 0.24);
}

.about-path2point-beta-notice {
  margin: 0 0 1rem;
  padding: 12px;
  border: 1px solid rgba(250, 204, 21, 0.3);
  border-radius: 8px;
  background: rgba(250, 204, 21, 0.08);
}

.about-path2point-beta-notice h3 {
  margin-bottom: 0.35rem;
  color: #fde68a;
}

.about-path2point-beta-notice p {
  color: var(--ops-muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.about-path2point-whats-new ul,
.product-info-card ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--ops-muted);
}

.about-path2point-whats-new li,
.product-info-card li {
  margin-bottom: 2px;
}

.product-info-page {
  display: flex;
  justify-content: center;
  padding-block: clamp(1rem, 3vw, 2.5rem);
}

.product-info-panel {
  width: min(100%, 680px);
  padding: 24px;
  border: 1px solid rgba(40, 231, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), transparent 38%),
    linear-gradient(135deg, rgba(17, 43, 56, 0.82), rgba(7, 18, 25, 0.72));
  box-shadow:
    inset 0 1px 0 var(--ops-glass-shine),
    0 18px 48px rgba(0, 0, 0, 0.24);
}

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

.product-info-card {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 14px;
  border: 1px solid rgba(40, 231, 255, 0.14);
  border-radius: 8px;
  color: var(--ops-muted);
  background: rgba(5, 13, 18, 0.32);
}

.product-info-card h2 {
  margin: 0;
  color: var(--ops-text);
}

.product-info-summary,
.product-info-card-description {
  color: var(--ops-muted);
  line-height: 1.5;
}

.product-info-card-description { margin: 0; }

.product-info-evaluation-status {
  display: grid;
  gap: 0.15rem;
  margin-top: 0.35rem;
  padding: 0.7rem 0.8rem;
  border-left: 2px solid var(--ops-amber);
  border-radius: 0 6px 6px 0;
  background: rgba(250, 204, 21, 0.08);
}

.product-info-evaluation-status span {
  color: var(--ops-muted);
  font-size: 0.78rem;
}

.product-info-evaluation-status strong { color: var(--ops-text); }

.product-info-resource-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.product-info-resource-list li {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border-left: 2px solid rgba(40, 231, 255, 0.48);
  border-radius: 0 6px 6px 0;
  background: rgba(8, 31, 42, 0.38);
}

.product-info-resource-list strong { color: var(--ops-text); }
.product-info-resource-list span { color: var(--ops-muted); font-size: 0.82rem; line-height: 1.4; }

.product-info-resource-link {
  display: grid;
  gap: 0.15rem;
  color: inherit;
  text-decoration: none;
}

.product-info-resource-link:hover strong,
.product-info-resource-link:focus strong {
  color: var(--ops-cyan);
  text-decoration: underline;
}

.product-info-platform-operations {
  margin-top: 1.5rem;
}

.product-info-platform-operations > h2 {
  margin-bottom: 0.35rem;
}

.product-info-platform-operations > .product-info-card-grid {
  margin-top: 1rem;
}

.product-info-platform-operations .product-info-card {
  scroll-margin-top: 1rem;
}
.product-info-support-email {
  color: var(--ops-cyan);
  font-weight: 800;
  text-decoration: none;
}
.product-info-support-email:hover,
.product-info-support-email:focus { color: #d9fbff; text-decoration: underline; }

.dashboard-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.dashboard-card-grid-wide {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.dashboard-metric,
.dashboard-panel {
  border: 1px solid var(--ops-glass-line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 42%),
    linear-gradient(135deg, rgba(16, 41, 54, 0.86), rgba(7, 18, 25, 0.76));
  box-shadow:
    inset 0 1px 0 var(--ops-glass-shine),
    inset 0 -1px 0 rgba(40, 231, 255, 0.09),
    0 18px 48px rgba(0, 0, 0, 0.24),
    0 0 28px rgba(40, 231, 255, 0.05);
  backdrop-filter: blur(16px) saturate(1.22);
}

.dashboard-metric {
  display: grid;
  gap: 4px;
  min-height: 104px;
  padding: 14px;
  color: var(--ops-text);
  text-decoration: none;
}

.dashboard-metric:hover,
.dashboard-metric:focus {
  color: var(--ops-text);
  border-color: rgba(40, 231, 255, 0.46);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 0 28px rgba(40, 231, 255, 0.12);
}

.dashboard-metric-label,
.dashboard-metric-detail {
  color: var(--ops-muted);
  font-size: 0.88rem;
}

.dashboard-metric-value {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1;
}

.dashboard-panel {
  padding: 16px;
}

.technician-profile-form,
.client-profile-form,
.office-user-profile-form,
.service-order-form {
  display: grid;
  gap: 4.5rem;
}

.profile-form-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  column-gap: 1rem;
  align-items: start;
}

.profile-form-page > :not(.profile-sticky-actions) {
  grid-column: 1;
}

.profile-sticky-actions {
  grid-column: 2;
  grid-row: 1;
  position: sticky;
  top: calc(var(--profile-actions-top, 0px) + 0.5rem);
  z-index: 1080;
  display: flex;
  width: max-content;
  max-width: 100%;
  gap: 0.5rem;
  margin: 0 0 1rem auto;
  padding: 0.4rem;
  border: 1px solid var(--ops-glass-line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--ops-cyan) 7%, rgba(7, 18, 25, 0.96));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px);
}

.tech-profile-access-grant-controls {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(9rem, 1fr);
  align-items: start;
  gap: 0.75rem;
}

.tech-profile-access-grant-controls :is(.form-select, .btn) {
  min-height: 38px;
}

.tech-profile-access-grant-controls .import-select-button,
.tech-profile-access-grant-controls > .btn {
  height: 40px;
  min-height: 40px;
}

.tech-profile-access-grant-controls .btn {
  align-self: start;
}

.tech-profile-access-grant-help {
  margin-top: 0.35rem;
}

[data-p2p-theme="light"] .profile-sticky-actions {
  border-color: rgba(67, 101, 119, 0.24);
  background: color-mix(in srgb, var(--ops-cyan) 5%, rgba(255, 255, 255, 0.96));
  box-shadow: 0 8px 20px rgba(31, 58, 72, 0.12);
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] .profile-sticky-actions {
    border-color: rgba(67, 101, 119, 0.24);
    background: color-mix(in srgb, var(--ops-cyan) 5%, rgba(255, 255, 255, 0.96));
    box-shadow: 0 8px 20px rgba(31, 58, 72, 0.12);
  }
}

@media (max-width: 575.98px) {
  .profile-sticky-actions {
    top: calc(var(--profile-actions-top, 0px) + 0.35rem);
  }

  .tech-profile-access-grant-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .tech-profile-access-grant-controls .btn {
    width: 100%;
  }
}

@media (max-width: 991.98px) {
  .profile-form-page {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-form-page > :not(.profile-sticky-actions),
  .profile-sticky-actions {
    grid-column: 1;
  }

  .profile-sticky-actions {
    grid-row: auto;
  }
}

.technician-profile-section > :last-child {
  margin-bottom: 0;
}

.technician-profile-section,
.client-profile-section,
.service-order-profile-section {
  position: relative;
  z-index: 0;
}

/* A login-enabled technician cannot be created without a destination for the
   account-setup link. Make this save-blocking validation unmissable. */
.technician-login-email-alert {
  margin: 0;
  border: 2px solid var(--ops-red);
  border-left-width: 6px;
  background: rgba(255, 107, 122, 0.18);
  color: #fff2f4;
  font-weight: 650;
}

.technician-login-email-alert strong,
.technician-login-email-errors .errorlist {
  color: var(--ops-red);
}

.technician-login-email-field.is-invalid {
  border-color: var(--ops-red) !important;
  box-shadow: 0 0 0 0.18rem rgba(255, 107, 122, 0.18), 0 0 18px rgba(255, 107, 122, 0.16);
}

/* Translucent panels create stacking contexts; keep a focused select above the next form card. */
.technician-profile-section:focus-within,
.client-profile-section:focus-within,
.service-order-profile-section:focus-within {
  z-index: 40;
}

.client-profile-section > :last-child {
  margin-bottom: 0;
}

.office-user-profile-section > :last-child {
  margin-bottom: 0;
}

.service-order-profile-section > :last-child {
  margin-bottom: 0;
}

/* Keep the shared enhanced selector menus above the read-only workspace below. */
.technician-availability-selector-panel {
  position: relative;
  z-index: 30;
  overflow: visible;
}

.technician-date-block-action .form-check-input {
  width: 1em;
  height: 1em;
  font-size: 1.5rem;
}

.technician-date-block-action .form-check-label {
  font-size: 1.5rem;
}

.technician-date-block-action .btn-sm {
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 1.3125rem;
}

.technician-availability-queue-row {
  cursor: pointer;
}

.technician-availability-queue-row:focus {
  outline: 2px solid var(--ops-cyan);
  outline-offset: -2px;
}

.technician-availability-queue-row.table-active > * {
  background: rgba(40, 231, 255, 0.16) !important;
  color: var(--ops-text) !important;
  box-shadow: inset 0 1px 0 rgba(40, 231, 255, 0.32), inset 0 -1px 0 rgba(40, 231, 255, 0.32);
}

.technician-availability-queue-row.table-active > :first-child {
  box-shadow: inset 4px 0 0 var(--ops-cyan), inset 0 1px 0 rgba(40, 231, 255, 0.32), inset 0 -1px 0 rgba(40, 231, 255, 0.32);
}

[data-p2p-theme="light"] .technician-availability-queue-row.table-active > * {
  border-left: 0 !important;
  border-right: 0 !important;
  box-shadow: none !important;
}

.kpi-filter-panel {
  position: relative;
  z-index: 30;
  padding: 18px 20px 14px;
  overflow: visible;
}

.kpi-filter-form {
  display: grid;
  grid-template-columns: minmax(180px, 0.85fr) minmax(190px, 0.95fr) minmax(200px, 0.85fr) minmax(150px, 0.7fr) minmax(150px, 0.7fr) minmax(230px, auto);
  gap: 14px 16px;
  align-items: end;
}

.kpi-filter-field {
  position: relative;
  z-index: 31;
  min-width: 0;
}

.kpi-filter-actions {
  display: flex;
  gap: 10px;
  min-width: 0;
}

.kpi-filter-actions .btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.kpi-filter-help {
  grid-column: 1 / -1;
}

.kpi-management-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.kpi-management-card {
  position: relative;
  min-height: 186px;
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 14px;
  align-content: stretch;
  padding: 22px 22px 18px;
  border: 1px solid color-mix(in srgb, var(--kpi-tone-color, var(--ops-cyan)) 48%, transparent);
  border-radius: var(--panel-radius);
  color: var(--ops-text);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--kpi-tone-color, var(--ops-cyan)) 10%, transparent), transparent 58%),
    linear-gradient(90deg, color-mix(in srgb, var(--kpi-tone-color, var(--ops-cyan)) 8%, transparent), transparent 42%),
    rgba(7, 18, 25, 0.82);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--kpi-tone-color, var(--ops-cyan)) 28%, transparent),
    inset 0 -1px 0 rgba(255, 255, 255, 0.03),
    var(--panel-shadow);
  overflow: hidden;
}

.kpi-management-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--kpi-tone-color, var(--ops-cyan)) 15%, transparent);
}

.kpi-management-card::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 42px;
  height: 1px;
  background: color-mix(in srgb, var(--kpi-tone-color, var(--ops-cyan)) 22%, transparent);
  opacity: 0.72;
  pointer-events: none;
}

.kpi-management-topline,
.kpi-management-mark,
.kpi-management-body,
.kpi-management-trend,
.kpi-management-goal,
.kpi-status-label,
.kpi-status-legend,
.kpi-status-legend span,
.kpi-attention-card,
.kpi-trend-note {
  display: flex;
  align-items: center;
}

.kpi-management-mark {
  align-items: flex-start;
  justify-content: center;
  padding-top: 15px;
}

.kpi-management-content {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 8px;
}

.kpi-management-topline {
  gap: 10px;
  min-height: 22px;
}

.kpi-management-label {
  color: currentColor;
  font-size: 0.86rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.kpi-management-icon {
  width: 50px;
  height: 50px;
  border-width: 2px;
  opacity: 0.92;
  filter: none;
}

.kpi-management-body {
  display: grid;
  gap: 5px;
  align-items: start;
}

.kpi-management-body strong {
  color: #f4fbff;
  font-size: 2.65rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.kpi-management-body span,
.kpi-management-goal {
  color: rgba(230, 247, 251, 0.74);
  font-size: 0.92rem;
  font-weight: 650;
}

.kpi-management-body span {
  font-size: 0.98rem;
  line-height: 1.18;
}

.kpi-management-card-pending .kpi-management-body strong {
  font-size: 2.05rem;
  letter-spacing: 0;
  white-space: normal;
}

.kpi-management-trend {
  min-height: 25px;
  justify-content: flex-start;
  color: rgba(230, 247, 251, 0.7);
  font-size: 0.84rem;
  font-weight: 800;
}

.kpi-management-goal {
  margin-top: auto;
  align-self: end;
  min-height: 32px;
  padding-top: 10px;
  border-top: 1px solid rgba(118, 238, 255, 0.1);
  font-size: 0.86rem;
}

.kpi-management-panels {
  display: grid;
  grid-template-columns: minmax(480px, 1.25fr) minmax(360px, 0.85fr) minmax(330px, 0.7fr);
  gap: 16px;
  align-items: stretch;
}

.kpi-status-panel,
.kpi-outcome-panel,
.kpi-attention-panel {
  min-width: 0;
}

.kpi-tone-cyan { --kpi-tone-color: var(--ops-cyan); color: var(--ops-cyan); }
.kpi-tone-green { --kpi-tone-color: var(--status-scheduled); color: var(--status-scheduled); }
.kpi-tone-blue { --kpi-tone-color: var(--status-routing); color: var(--status-routing); }
.kpi-tone-violet { --kpi-tone-color: var(--status-vip); color: var(--status-vip); }

.kpi-trend-good { color: var(--status-scheduled); }
.kpi-trend-bad { color: var(--status-capacity); }
.kpi-trend-muted { color: rgba(137, 168, 179, 0.88); }

.kpi-status-label {
  gap: 8px;
  color: var(--ops-text);
  font-weight: 760;
  text-decoration: none;
}

.kpi-status-label:hover,
.kpi-status-label:focus {
  color: var(--action-hover);
}

.kpi-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: currentColor;
}

.kpi-status-code-new .kpi-status-dot { color: #2d8cff; background: #2d8cff; }
.kpi-status-code-assigned .kpi-status-dot { color: #22d0ee; background: #22d0ee; }
.kpi-status-code-unscheduled .kpi-status-dot { color: #facc15; background: #facc15; }
.kpi-status-code-scheduled .kpi-status-dot { color: #22c55e; background: #22c55e; }
.kpi-status-code-routed .kpi-status-dot { color: #8b5cf6; background: #8b5cf6; }
.kpi-status-code-pending_report .kpi-status-dot { color: #f97316; background: #f97316; }
.kpi-status-code-qa_review .kpi-status-dot { color: #6366f1; background: #6366f1; }
.kpi-status-code-complete .kpi-status-dot { color: #64748b; background: #64748b; }

.kpi-status-good .kpi-status-dot,
.kpi-status-good i { color: var(--status-scheduled); background: var(--status-scheduled); }
.kpi-status-attention .kpi-status-dot,
.kpi-status-attention i { color: var(--status-unscheduled); background: var(--status-unscheduled); }
.kpi-status-critical .kpi-status-dot,
.kpi-status-critical i { color: var(--status-capacity); background: var(--status-capacity); }
.kpi-status-empty .kpi-status-dot,
.kpi-status-empty i { color: #64748b; background: #64748b; }

.kpi-status-critical td:nth-child(3),
.kpi-status-critical td:nth-child(4) {
  color: var(--status-capacity);
}

.kpi-status-attention td:nth-child(3),
.kpi-status-attention td:nth-child(4) {
  color: var(--status-unscheduled);
}

.kpi-status-good td:nth-child(3) {
  color: var(--status-scheduled);
}

.kpi-status-row td:nth-child(3),
.kpi-status-row td:nth-child(4) {
  font-weight: 800;
}

.kpi-status-oldest {
  color: inherit;
  font-weight: 900;
}

.kpi-row-trend {
  font-weight: 800;
  white-space: nowrap;
}

.kpi-status-legend {
  flex-wrap: wrap;
  gap: 12px 18px;
  color: var(--ops-muted);
  font-size: 0.84rem;
  font-weight: 650;
}

.kpi-status-legend span {
  gap: 7px;
}

.kpi-status-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.kpi-outcome-bars {
  display: grid;
  gap: 13px;
}

.kpi-outcome-bar {
  display: grid;
  grid-template-columns: minmax(116px, 0.72fr) minmax(180px, 1.9fr) minmax(86px, auto);
  align-items: center;
  gap: 12px;
  color: var(--ops-text);
  text-decoration: none;
}

.kpi-outcome-bar:hover,
.kpi-outcome-bar:focus {
  color: var(--ops-text);
}

.kpi-outcome-label {
  color: rgba(230, 247, 251, 0.86);
  font-weight: 760;
}

.kpi-outcome-track {
  height: 17px;
  border: 1px solid rgba(118, 238, 255, 0.16);
  border-radius: 4px;
  background: rgba(5, 13, 18, 0.72);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.44);
  overflow: hidden;
}

.kpi-outcome-track span {
  display: block;
  height: 100%;
  border-radius: 3px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 46%),
    var(--kpi-outcome-color, var(--ops-cyan));
}

.kpi-outcome-bar strong {
  text-align: right;
  white-space: nowrap;
}

.kpi-outcome-first_complete { --kpi-outcome-color: var(--status-scheduled); }
.kpi-outcome-two_plus_complete { --kpi-outcome-color: var(--status-routing); }
.kpi-outcome-parts_needed { --kpi-outcome-color: var(--status-unscheduled); }
.kpi-outcome-inspection { --kpi-outcome-color: var(--ops-cyan); }
.kpi-outcome-not_home { --kpi-outcome-color: var(--status-no-coverage); }
.kpi-outcome-partial_complete { --kpi-outcome-color: var(--status-no-coverage); }
.kpi-outcome-more_time_needed { --kpi-outcome-color: var(--ops-amber); }
.kpi-outcome-unable_to_repair { --kpi-outcome-color: var(--status-vip); }

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

.kpi-attention-card {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  grid-template-rows: auto 1px auto;
  align-items: center;
  gap: 5px 14px;
  min-height: 104px;
  padding: 15px 18px 13px;
  border: 1px solid color-mix(in srgb, var(--kpi-attention-color, var(--ops-cyan)) 50%, transparent);
  border-radius: 8px;
  color: var(--ops-text);
  background:
    radial-gradient(circle at 12% 18%, color-mix(in srgb, var(--kpi-attention-color, var(--ops-cyan)) 16%, transparent), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 58%),
    rgba(7, 16, 22, 0.62);
  text-decoration: none;
}

.kpi-attention-card.kpi-status-critical {
  --kpi-attention-color: var(--status-capacity);
}

.kpi-attention-card.kpi-status-attention {
  --kpi-attention-color: var(--status-unscheduled);
}

.kpi-attention-card.kpi-status-good {
  --kpi-attention-color: var(--status-scheduled);
}

.kpi-attention-card.kpi-status-orange {
  --kpi-attention-color: var(--status-no-coverage);
}

.kpi-attention-card.kpi-status-empty {
  --kpi-attention-color: #64748b;
}

.kpi-attention-card:hover,
.kpi-attention-card:focus {
  color: var(--ops-text);
  border-color: var(--kpi-attention-color, var(--ops-cyan));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px color-mix(in srgb, var(--kpi-attention-color, var(--ops-cyan)) 26%, transparent);
}

.kpi-attention-card .kpi-attention-icon.dispatch-workflow-icon {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: start;
  width: 40px;
  height: 40px;
  color: var(--kpi-attention-color, var(--ops-cyan));
  opacity: 0.96;
}

.kpi-attention-card::after {
  content: "";
  grid-column: 1 / -1;
  grid-row: 2;
  height: 1px;
  margin-top: 3px;
  background: color-mix(in srgb, var(--kpi-attention-color, var(--ops-cyan)) 24%, transparent);
}

.kpi-attention-card > span:not(.kpi-attention-icon) {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  gap: 4px;
  min-width: 0;
}

.kpi-attention-card strong {
  color: #f4fbff;
  font-size: 1rem;
  line-height: 1.18;
}

.kpi-attention-card small {
  grid-column: 1 / -1;
  grid-row: 3;
  color: var(--ops-muted);
  font-weight: 650;
}

.kpi-attention-card b {
  grid-column: 3;
  grid-row: 1;
  color: #f4fbff;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.kpi-trend-note {
  justify-content: space-between;
  gap: 14px;
  color: var(--ops-muted);
  font-size: 0.9rem;
}

.kpi-refresh-stamp {
  flex: 0 0 auto;
  white-space: nowrap;
}

.dispatch-zone-map {
  min-height: 705px;
  border: 1px solid rgba(40, 231, 255, 0.24);
  border-radius: 8px;
  overflow: hidden;
  background: #081117;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 28px rgba(40, 231, 255, 0.07);
}

.zone-planner-create-page {
  max-width: 1040px;
}

.zone-planner-create-wide {
  max-width: 1540px;
}

.zone-planner-manage-wide {
  max-width: 1440px;
  width: 100%;
}

.zone-planner-management-row {
  max-width: 1440px;
  margin-inline: auto;
}

.zone-planner-map-overview .dispatch-zone-map {
  min-height: 500px;
}

#zone-form { scroll-margin-top: 18vh; }
#zone-normal-schedule { scroll-margin-top: max(90px, calc(50vh - 210px)); }
#zone-calendar-availability { scroll-margin-top: max(90px, calc(50vh - 305px)); }

.zone-selected-context {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 20px;
  padding: 9px 0 11px;
  border-bottom: 1px solid var(--surface-border);
  color: var(--text-primary);
  font-size: .9rem;
  line-height: 1.35;
}

.zone-selected-context-name {
  font-size: 1.08rem;
  font-weight: 750;
}

.zone-selected-context-label {
  color: var(--text-secondary);
  font-weight: 650;
  margin-right: 3px;
}

.zone-selected-context-status {
  font-weight: 750;
}

.zone-selected-context-status.capacity-status-full { color: var(--ops-red); }
.zone-selected-context-status.capacity-status-available { color: var(--ops-green); }

.zone-boundary-key {
  display: inline-block;
  width: 20px;
  height: 0;
  border-top: 6px solid;
}

.zone-boundary-saved { border-color: #fbbf24; }
.zone-boundary-draft { border-color: #f472b6; border-top-style: dashed; }

.zone-schedule-history-scroll { max-height: 22.5rem; overflow-y: auto; }
.zone-schedule-history-scroll tbody tr { height: 4rem; }
.zone-schedule-history-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--panel-background);
}

.zone-planner-intake .client-portal-intake-step:focus { outline: none; }
.zone-planner-intake .client-portal-intake-step:focus-visible > .client-portal-step-content,
.zone-planner-intake .client-portal-intake-step.zone-action-target > .client-portal-step-content {
  border-color: var(--action-primary);
  box-shadow: inset 0 0 0 3px var(--action-primary), var(--surface-shadow);
}

.zone-planner-layout {
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr);
  align-items: start;
  gap: 22px;
}

.zone-planner-workspace {
  min-width: 0;
}

.zone-planner-rail {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 82px;
}

.zone-planner-rail-title {
  padding: 5px 12px 7px;
  color: var(--text-secondary);
  font-size: .8rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.zone-planner-rail a {
  display: block;
  padding: 10px 12px;
  border-left: 3px solid transparent;
  border-radius: 5px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 650;
}

.zone-planner-rail a:hover,
.zone-planner-rail a:focus-visible {
  color: var(--text-primary);
  background: var(--surface-secondary);
}

.zone-planner-rail a:focus-visible {
  outline: 2px solid var(--action-primary);
  outline-offset: 2px;
}

.zone-planner-rail a[aria-current="page"] {
  color: var(--text-primary);
  background: var(--surface-secondary);
  border-left-color: var(--action-primary);
}

.zone-planner-intake .dispatch-zone-map {
  min-height: 440px;
}

.zone-planner-create-wide .dispatch-zone-map {
  min-height: 540px;
}

.zone-planner-intake .client-portal-step-content .dispatch-map-layer-controls label {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  white-space: nowrap;
}

.zone-zip-legend { gap: 8px; }
.zone-zip-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid var(--surface-border);
  border-radius: 6px;
  white-space: nowrap;
  font-size: .8rem;
}
.zone-zip-only { background: #22d3ee; }
.zone-tech-only { background: #a855f7; }
.zone-zip-overlap { background: #4ade80; }
.zone-zip-manual { background: transparent; border: 2px solid #f97316; }

.zone-normal-weekdays > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.zone-normal-weekdays label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--surface-border);
  border-radius: 7px;
  color: var(--text-primary);
  background: var(--surface-secondary);
  white-space: nowrap;
}

.zone-normal-weekdays label.is-unavailable {
  opacity: .55;
  cursor: not-allowed;
}

.zone-planner-intake .client-portal-step-content {
  min-width: 0;
}

.zone-planner-intake::before {
  display: none;
}

.zone-planner-intake .client-portal-intake-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 40px;
  bottom: 0;
  left: 19px;
  width: 2px;
  background: var(--surface-border);
}

.zone-planner-intake-manage [aria-labelledby="zone-schedule-title"]::after {
  content: "";
  position: absolute;
  top: 40px;
  bottom: 0;
  left: 19px;
  width: 2px;
  background: var(--surface-border);
}

@media (max-width: 991px) {
  .zone-planner-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .zone-planner-rail {
    position: static;
  }
}

@media (max-width: 767px) {
  .zone-planner-intake .client-portal-intake-step:not(:last-child)::after {
    top: 30px;
    left: 14px;
  }

  .zone-planner-intake-manage [aria-labelledby="zone-schedule-title"]::after {
    top: 30px;
    left: 14px;
  }

  .zone-planner-intake .dispatch-zone-map {
    min-height: 360px;
  }
}

.dispatch-zone-map.leaflet-container,
.dispatch-zone-map.leaflet-grab,
.dispatch-zone-map.leaflet-touch-drag,
.dispatch-zone-map.leaflet-touch-zoom,
.dispatch-zone-map .leaflet-container,
.dispatch-zone-map .leaflet-grab,
.dispatch-zone-map .leaflet-interactive,
.dispatch-zone-map .leaflet-pane,
.dispatch-zone-map .leaflet-tile,
.dispatch-zone-map .leaflet-marker-icon,
.dispatch-zone-map .leaflet-control,
.dispatch-zone-map .leaflet-control a {
  cursor: default !important;
}

.dispatch-zone-map.leaflet-dragging,
.dispatch-zone-map.leaflet-dragging.leaflet-grab,
.dispatch-zone-map.leaflet-grabbing,
.dispatch-zone-map .leaflet-dragging,
.dispatch-zone-map .leaflet-dragging .leaflet-grab,
.dispatch-zone-map .leaflet-dragging .leaflet-interactive,
.dispatch-zone-map .leaflet-dragging .leaflet-pane,
.dispatch-zone-map .leaflet-dragging .leaflet-tile,
.dispatch-zone-map .leaflet-dragging .leaflet-marker-icon {
  cursor: grabbing !important;
}

.dispatch-zone-map.dispatch-map-drawing,
.dispatch-zone-map.dispatch-map-drawing.leaflet-container,
.dispatch-zone-map.dispatch-map-drawing.leaflet-grab,
.dispatch-zone-map.dispatch-map-drawing .leaflet-container,
.dispatch-zone-map.dispatch-map-drawing .leaflet-interactive,
.dispatch-zone-map.dispatch-map-drawing .leaflet-pane,
.dispatch-zone-map.dispatch-map-drawing .leaflet-tile,
.dispatch-zone-map.dispatch-map-drawing .leaflet-marker-icon {
  cursor: crosshair !important;
}

.dispatch-zone-map.dispatch-map-drawing .leaflet-interactive,
.dispatch-zone-map.dispatch-map-drawing .leaflet-marker-icon,
.dispatch-zone-map.dispatch-map-drawing .leaflet-marker-shadow,
.dispatch-zone-map.dispatch-map-drawing .leaflet-popup {
  pointer-events: none;
}

.dispatch-map-layer-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.dispatch-map-layer-controls label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid rgba(118, 238, 255, 0.24);
  border-radius: 999px;
  color: var(--ops-muted);
  background: rgba(7, 16, 22, 0.56);
  font-size: 0.84rem;
}

.dispatch-map-layer-controls label[data-layer-key="zones"] {
  border-color: rgba(40, 231, 255, 0.58);
}

.dispatch-map-layer-controls label[data-layer-key="scheduled"] {
  border-color: rgba(84, 241, 166, 0.58);
}

.dispatch-map-layer-controls label[data-layer-key="unscheduled"] {
  border-color: rgba(251, 191, 36, 0.62);
}

.dispatch-map-layer-controls label[data-layer-key="techHomes"] {
  border-color: rgba(96, 165, 250, 0.62);
}

.dispatch-map-layer-controls label[data-layer-key="noCoverage"] {
  border-color: color-mix(in srgb, var(--map-status-no-coverage) 66%, transparent);
}

.dispatch-map-layer-controls label[data-layer-key="noAvailability"] {
  border-color: color-mix(in srgb, var(--map-status-capacity) 66%, transparent);
}

.dispatch-layer-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
  box-shadow: none;
}

.dispatch-layer-zones {
  color: var(--map-zone);
  background: var(--map-zone-fill);
  border: 1px solid var(--map-zone);
}

.dispatch-layer-scheduled {
  color: var(--map-status-scheduled);
  background: var(--map-status-scheduled);
}

.dispatch-layer-unscheduled {
  color: var(--map-status-unscheduled);
  background: var(--map-status-unscheduled);
}

.dispatch-layer-tech-homes {
  color: var(--map-tech-home);
  background: var(--map-tech-home);
}

.dispatch-layer-no-coverage {
  color: var(--map-status-no-coverage);
  background: var(--map-status-no-coverage);
}

.dispatch-layer-no-availability {
  color: var(--map-status-capacity);
  background: var(--map-status-capacity);
}

.dispatch-map-tech-select {
  width: auto;
  min-width: 220px;
  max-width: 320px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.dispatch-map-panel .leaflet-container {
  color: var(--ops-text);
  font: inherit;
}

/* Preserve readable CARTO fallback tiles when no optional MapTiler key is configured. */
.leaflet-tile-readable-dark {
  filter: brightness(1.42) contrast(1.08) saturate(0.86);
}

/* Dark raster layers may expose fractional-pixel gaps at desktop browser
   zoom/DPR boundaries. Match only their underlying map surface to MapTiler's
   dark navy; standard/OpenStreetMap layers retain their light background. */
.leaflet-container:has(.leaflet-tile-seamless-raster) {
  background-color: #142B3B;
}

.dispatch-map-panel .leaflet-tile-overview-dark {
  filter: brightness(1.02) contrast(1.04) saturate(1.08);
}

.dispatch-map-panel .leaflet-control-zoom a,
.dispatch-map-panel .leaflet-control-layers,
.dispatch-map-panel .leaflet-control-attribution {
  color: rgba(230, 247, 251, 0.78) !important;
  background: rgba(5, 13, 18, 0.82) !important;
  border-color: rgba(118, 238, 255, 0.22) !important;
  backdrop-filter: blur(10px);
}

.dispatch-map-panel .leaflet-control-attribution {
  margin: 0 8px 8px 0;
  padding: 4px 7px;
  border: 1px solid rgba(118, 238, 255, 0.18) !important;
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  font-size: 0.72rem;
  line-height: 1.2;
}

.dispatch-map-panel .leaflet-control-layers {
  padding: 6px 8px;
  border: 1px solid rgba(118, 238, 255, 0.24);
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.dispatch-map-panel .leaflet-control-layers label {
  margin: 0;
  color: var(--ops-text);
  font-size: 0.78rem;
}

.dispatch-map-panel .leaflet-control-layers label + label {
  margin-top: 4px;
}

.dispatch-map-panel .leaflet-control-zoom a:hover,
.dispatch-map-panel .leaflet-control-zoom a:focus {
  color: #031014;
  background: var(--ops-cyan);
}

.dispatch-map-panel .leaflet-control-attribution a {
  color: #9beafe;
}

.dispatch-zones-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.table-responsive.dispatch-zones-list-scroll {
  overflow-x: auto;
  overflow-y: auto;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--action-primary) var(--surface-secondary);
}

.zone-planner-management-column {
  display: flex;
}

#zones-card {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.dispatch-zones-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--panel-background);
}

.leaflet-container .leaflet-popup-content-wrapper,
.leaflet-container .leaflet-popup-tip {
  color: var(--ops-text);
  background: rgba(10, 25, 34, 0.96);
  border: 1px solid rgba(118, 238, 255, 0.25);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3);
}

.leaflet-container .leaflet-popup-content,
.leaflet-container .leaflet-popup-close-button {
  color: var(--ops-text);
}

.leaflet-container .leaflet-popup-content a {
  color: var(--ops-cyan);
}

.leaflet-container .leaflet-popup-close-button:hover,
.leaflet-container .leaflet-popup-close-button:focus {
  color: #ffffff;
}

tr[data-zone-row] {
  cursor: pointer;
}

tr[data-zone-row].dispatch-zone-hovered:not(.dispatch-zone-context-selected) > * {
  background: color-mix(in srgb, var(--ops-cyan) 8%, transparent) !important;
}

.dispatch-zone-context-selected > * {
  background: color-mix(in srgb, var(--ops-cyan) 12%, transparent) !important;
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--ops-cyan) 38%, transparent), inset 0 -1px 0 color-mix(in srgb, var(--ops-cyan) 38%, transparent);
}

.dispatch-zone-context-selected > :first-child {
  box-shadow: inset 4px 0 0 var(--ops-cyan), inset 0 1px 0 color-mix(in srgb, var(--ops-cyan) 38%, transparent), inset 0 -1px 0 color-mix(in srgb, var(--ops-cyan) 38%, transparent);
}

[data-p2p-theme="dark"] .dispatch-zones-scroll tr.dispatch-zone-selected > * {
  color: var(--ops-text) !important;
  background: rgba(40, 231, 255, 0.16) !important;
  box-shadow: inset 0 1px 0 rgba(40, 231, 255, 0.32), inset 0 -1px 0 rgba(40, 231, 255, 0.32);
}

[data-p2p-theme="dark"] .dispatch-zones-scroll tr.dispatch-zone-selected > :first-child {
  box-shadow: inset 4px 0 0 var(--ops-cyan), inset 0 1px 0 rgba(40, 231, 255, 0.32), inset 0 -1px 0 rgba(40, 231, 255, 0.32);
}

@media (prefers-color-scheme: dark) {
  [data-p2p-theme="auto"] .dispatch-zones-scroll tr.dispatch-zone-selected > * {
    color: var(--ops-text) !important;
    background: rgba(40, 231, 255, 0.16) !important;
    box-shadow: inset 0 1px 0 rgba(40, 231, 255, 0.32), inset 0 -1px 0 rgba(40, 231, 255, 0.32);
  }

  [data-p2p-theme="auto"] .dispatch-zones-scroll tr.dispatch-zone-selected > :first-child {
    box-shadow: inset 4px 0 0 var(--ops-cyan), inset 0 1px 0 rgba(40, 231, 255, 0.32), inset 0 -1px 0 rgba(40, 231, 255, 0.32);
  }
}

.dispatch-edit-summary {
  padding: 12px;
  border: 1px solid rgba(40, 231, 255, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(40, 231, 255, 0.12), rgba(7, 16, 22, 0.64)),
    rgba(7, 16, 22, 0.62);
}

.dispatch-edit-summary-title {
  color: var(--ops-cyan);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.dispatch-edit-summary-name {
  margin-top: 2px;
  color: var(--ops-text);
  font-size: 1.05rem;
  font-weight: 800;
}

.dispatch-edit-summary-grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 5px 12px;
  margin-top: 10px;
  font-size: 0.9rem;
}

.dispatch-edit-summary-grid dt {
  color: var(--ops-muted);
  font-weight: 700;
}

.dispatch-edit-summary-grid dd {
  margin: 0;
}

.dispatch-capacity-lines {
  display: grid;
  gap: 2px;
  color: var(--ops-muted);
}

.dispatch-capacity-lines strong {
  color: var(--ops-text);
}

.dashboard-tone-primary {
  border-color: rgba(40, 231, 255, 0.38);
}

.dashboard-tone-success {
  border-color: rgba(84, 241, 166, 0.34);
}

.dashboard-tone-warning {
  border-color: rgba(251, 191, 36, 0.42);
}

.dashboard-tone-danger {
  border-color: rgba(255, 107, 122, 0.42);
}

.dashboard-aging-stack,
.dashboard-status-list,
.dashboard-order-list {
  display: grid;
  gap: 10px;
}

.dashboard-aging-row,
.dashboard-status-row,
.dashboard-order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(40, 231, 255, 0.14);
  border-radius: 8px;
  background: rgba(7, 16, 22, 0.55);
}

.dashboard-order-row {
  color: var(--ops-text);
  text-decoration: none;
}

.dashboard-order-row:hover,
.dashboard-order-row:focus {
  color: var(--ops-text);
  border-color: rgba(40, 231, 255, 0.44);
  background: rgba(19, 41, 54, 0.85);
}

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

.workflow-direction {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border: 1px solid rgba(40, 231, 255, 0.28);
  border-radius: 999px;
  color: var(--ops-muted);
  background:
    linear-gradient(90deg, rgba(40, 231, 255, 0.12), rgba(84, 241, 166, 0.1)),
    rgba(7, 16, 22, 0.52);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.workflow-direction strong {
  color: var(--ops-cyan);
  font-size: 0.72rem;
}

.workflow-direction strong::before,
.workflow-direction strong::after {
  content: ">";
  margin: 0 4px;
}

.workflow-tile {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 250px;
  padding: 14px;
  border: 1px solid rgba(118, 238, 255, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 38%),
    linear-gradient(180deg, rgba(19, 47, 61, 0.84), rgba(7, 16, 22, 0.64));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(40, 231, 255, 0.08),
    0 18px 46px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(14px) saturate(1.16);
}

.workflow-tile:not(:last-child)::after {
  content: ">";
  position: absolute;
  top: 18px;
  right: -12px;
  z-index: 2;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(40, 231, 255, 0.35);
  border-radius: 999px;
  color: var(--ops-cyan);
  background: var(--ops-bg-soft);
  display: grid;
  place-items: center;
  font-weight: 900;
  line-height: 1;
}

.workflow-tile-complete {
  border-color: rgba(84, 241, 166, 0.42);
}

.workflow-tile-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: var(--ops-text);
  text-decoration: none;
}

.workflow-tile-total:hover,
.workflow-tile-total:focus {
  color: var(--ops-text);
}

.workflow-tile-label {
  color: var(--ops-muted);
  font-size: 0.9rem;
  font-weight: 750;
  text-transform: uppercase;
}

.workflow-tile-total strong {
  font-size: 2.2rem;
  line-height: 1;
}

.workflow-tile-alert {
  display: flex;
  justify-content: space-between;
  padding: 6px 8px;
  border: 1px solid rgba(255, 107, 122, 0.62);
  border-radius: 8px;
  color: #ffd9de;
  background: rgba(93, 16, 28, 0.32);
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
}

.workflow-age-grid,
.schedule-summary-grid,
.dashboard-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.workflow-age-pill,
.schedule-summary-grid a,
.dashboard-mini-grid a,
.dashboard-mini-grid > span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 7px;
  border: 1px solid rgba(40, 231, 255, 0.14);
  border-radius: 8px;
  color: var(--ops-text);
  background: rgba(7, 16, 22, 0.52);
  text-decoration: none;
}

.workflow-age-pill span,
.schedule-summary-grid span,
.dashboard-mini-grid a span,
.dashboard-mini-grid > span {
  color: var(--ops-muted);
  font-size: 0.78rem;
}

.workflow-age-pill strong,
.schedule-summary-grid strong,
.dashboard-mini-grid a strong,
.dashboard-mini-grid > span strong {
  font-size: 1rem;
}

.workflow-kpi-list {
  display: grid;
  gap: 7px;
  margin-top: auto;
}

.workflow-kpi-list div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--ops-muted);
  font-size: 0.82rem;
}

.workflow-kpi-list strong {
  text-align: right;
  font-size: 0.82rem;
}

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

.dispatch-dashboard-heading {
  display: grid;
  grid-template-columns: minmax(180px, auto) 1fr;
  align-items: start;
  gap: 16px;
  margin-bottom: 14px;
}

.dispatch-dashboard-exceptions {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.dashboard-exception {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 107, 122, 0.28);
  border-radius: 8px;
  color: var(--ops-text);
  background: rgba(93, 16, 28, 0.18);
  text-decoration: none;
}

.schedule-summary-grid a:hover,
.schedule-summary-grid a:focus,
.dashboard-exception:hover,
.dashboard-exception:focus,
.workflow-age-pill:hover,
.workflow-age-pill:focus,
.dashboard-mini-grid a:hover,
.dashboard-mini-grid a:focus {
  color: var(--ops-text);
  border-color: rgba(40, 231, 255, 0.44);
}

.dispatch-dashboard-page {
  display: grid;
  gap: 16px;
  padding: 10px 18px 4px;
}

.dispatch-dashboard-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.dispatch-dashboard-hero h1 {
  margin: 0 0 4px;
  color: var(--text-heading);
  font-size: clamp(1.72rem, 2.25vw, 2.22rem);
  font-weight: 850;
  line-height: 1.08;
  letter-spacing: 0;
}

.dispatch-dashboard-hero p,
.dispatch-dashboard-panel-header p {
  margin: 0;
  color: rgba(230, 247, 251, 0.74);
  line-height: 1.35;
}

.dispatch-dashboard-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dispatch-dashboard-tabs a,
.dispatch-dashboard-tabs span {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border: 1px solid rgba(40, 231, 255, 0.72);
  border-radius: 6px;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(40, 231, 255, 0.14), rgba(5, 13, 18, 0.76));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 20px rgba(40, 231, 255, 0.18);
  font-weight: 850;
  text-decoration: none;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.dispatch-dashboard-tabs a:hover,
.dispatch-dashboard-tabs a:focus {
  color: #ffffff;
  border-color: rgba(159, 248, 255, 0.98);
  background:
    linear-gradient(180deg, rgba(60, 239, 255, 0.42), rgba(8, 42, 55, 0.92));
  box-shadow: 0 0 28px rgba(40, 231, 255, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.dispatch-dashboard-tabs .active {
  color: #021014;
  border-color: rgba(183, 251, 255, 1);
  background: linear-gradient(180deg, #d2feff, #39efff 48%, #00c8e8);
  box-shadow: 0 0 32px rgba(40, 231, 255, 0.64), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.dispatch-dashboard-tabs .disabled {
  opacity: 0.52;
}

/* Dispatch assignment selector reuses the established Dispatch tab surface and active state. */
.self-scheduling-tech-selector {
  display: grid;
  gap: 8px;
}

.self-scheduling-tech-card {
  display: block;
  padding: 12px 14px;
  border: 1px solid rgba(40, 231, 255, 0.72);
  border-radius: 6px;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(40, 231, 255, 0.14), rgba(5, 13, 18, 0.76));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 20px rgba(40, 231, 255, 0.18);
  text-decoration: none;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.self-scheduling-tech-card:hover,
.self-scheduling-tech-card:focus {
  color: #ffffff;
  border-color: rgba(159, 248, 255, 0.98);
  background: linear-gradient(180deg, rgba(60, 239, 255, 0.42), rgba(8, 42, 55, 0.92));
  box-shadow: 0 0 28px rgba(40, 231, 255, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  text-decoration: none;
  transform: translateY(-1px);
}

.self-scheduling-tech-card.active {
  color: #021014;
  border-color: rgba(183, 251, 255, 1);
  background: linear-gradient(180deg, #d2feff, #39efff 48%, #00c8e8);
  box-shadow: 0 0 32px rgba(40, 231, 255, 0.64), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.self-scheduling-tech-card.active strong {
  color: #021014;
}

.self-scheduling-tech-card-summary {
  margin-top: 3px;
  color: rgba(230, 247, 251, 0.74);
  font-size: 0.8125rem;
}

.self-scheduling-tech-card.active .self-scheduling-tech-card-summary {
  color: rgba(2, 16, 20, 0.74);
}

.self-scheduling-tech-card-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
  padding: 0.1rem 0.42rem;
  border: 1px solid rgba(183, 251, 255, 0.7);
  border-radius: 999px;
  color: #021014;
  background: #d2feff;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.2;
}

.self-scheduling-tech-card.active .self-scheduling-tech-card-count {
  border-color: rgba(2, 16, 20, 0.28);
  background: rgba(255, 255, 255, 0.76);
}

.dispatch-dashboard-panel {
  padding: var(--panel-padding);
  border: 1px solid var(--panel-border);
  border-radius: var(--panel-radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 52%),
    rgba(7, 18, 25, 0.78);
  box-shadow: var(--panel-shadow);
}

.dispatch-dashboard-section-heading,
.dispatch-dashboard-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.dispatch-dashboard-section-heading {
  margin-bottom: 12px;
}

.dispatch-dashboard-section-heading span {
  display: block;
  margin-bottom: 4px;
  color: #9cecff;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.dispatch-dashboard-section-heading h2,
.dispatch-dashboard-panel-header h2 {
  margin: 0;
  color: #f4fbff;
  font-size: 1.16rem;
  font-weight: 850;
  line-height: 1.16;
}

.dispatch-dashboard-workflow-heading {
  display: block;
  margin-bottom: 18px;
}

.dispatch-exception-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 0;
}

.dispatch-exception-card,
.dispatch-workflow-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  color: var(--ops-text);
  text-decoration: none;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

.dispatch-exception-card {
  min-height: 78px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid currentColor;
  border-radius: 8px;
  background:
    linear-gradient(90deg, color-mix(in srgb, currentColor 16%, transparent), rgba(7, 18, 25, 0.76)),
    rgba(7, 18, 25, 0.82);
}

.dispatch-workflow-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 14px;
}

.dispatch-workflow-card {
  min-height: 132px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  grid-template-rows: auto auto 1px auto;
  gap: 4px 12px;
  align-items: center;
  padding: 14px 18px 12px;
  border: 1px solid color-mix(in srgb, currentColor 55%, transparent);
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 18%, color-mix(in srgb, currentColor 18%, transparent), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 58%),
    rgba(7, 18, 25, 0.82);
}

.dispatch-exception-card:hover,
.dispatch-exception-card:focus,
.dispatch-workflow-card:hover,
.dispatch-workflow-card:focus {
  color: currentColor;
  transform: translateY(-2px);
  border-color: currentColor;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 18px 42px rgba(0, 0, 0, 0.34),
    0 0 0 1px color-mix(in srgb, currentColor 32%, transparent),
    0 0 30px color-mix(in srgb, currentColor 30%, transparent);
}

.dispatch-exception-card:focus-visible,
.dispatch-workflow-card:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}


.dispatch-exception-svg-icon {
  width: 42px;
  height: 42px;
  color: currentColor;
  flex: none;
}

.dispatch-exception-svg-people {
  width: 46px;
  height: 42px;
}

.dispatch-card-copy,
.dispatch-card-label {
  color: #f4fbff;
  font-weight: 820;
  line-height: 1.16;
}

.dispatch-card-copy {
  font-size: 1rem;
  text-transform: none;
}

.dispatch-card-label {
  color: rgba(244, 251, 255, 0.9);
  font-size: 0.86rem;
}

.dispatch-workflow-card .dispatch-card-label {
  align-self: end;
  grid-column: 2;
  grid-row: 1;
  font-size: 0.98rem;
}

.dispatch-exception-card strong {
  color: #fff;
  font-size: 1.9rem;
  font-weight: 850;
  line-height: 1;
}

.dispatch-workflow-card strong {
  align-self: start;
  grid-column: 2;
  grid-row: 2;
  color: currentColor;
  font-size: 2.08rem;
  font-weight: 900;
  line-height: 0.95;
}

.dispatch-card-divider {
  grid-column: 1 / -1;
  grid-row: 3;
  height: 1px;
  margin-top: 4px;
  background: color-mix(in srgb, currentColor 22%, transparent);
}

.dispatch-card-description {
  grid-column: 1 / -1;
  grid-row: 4;
  align-self: start;
  color: rgba(230, 247, 251, 0.72);
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.18;
}

.dispatch-card-arrow {
  color: rgba(244, 251, 255, 0.72);
  font-size: 2.15rem;
  line-height: 1;
}

.dispatch-card-icon,
.dispatch-workflow-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  color: currentColor;
}

.dispatch-card-icon {
  width: 42px;
  height: 42px;
  border: 3px solid currentColor;
  border-radius: 999px;
}

.dispatch-workflow-icon {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: start;
  width: 44px;
  height: 44px;
  opacity: 0.95;
  border: 3px solid currentColor;
  border-radius: 6px;
}


.dispatch-workflow-icon {
  border: 0;
  border-radius: 0;
}


.dispatch-workflow-icon.dispatch-icon-clock {
  border: 3px solid currentColor;
  border-radius: 999px;
}

.dispatch-workflow-icon.dispatch-icon-clock::before {
  content: "";
  width: 16px;
  height: 16px;
  background: transparent;
  border-left: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: translate(4px, -2px);
}

.dispatch-workflow-icon.dispatch-icon-alert {
  border: 3px solid currentColor;
  border-radius: 999px;
}

.dispatch-workflow-icon.dispatch-icon-alert::before {
  content: "!";
  width: auto;
  height: auto;
  font-size: 1.55rem;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-1px);
}

.dispatch-card-icon.dispatch-icon-people {
  border: 0;
}

.dispatch-card-icon.dispatch-icon-alert::before { content: "!"; font-size: 1.6rem; font-weight: 950; line-height: 1; transform: translateY(-1px); }
.dispatch-card-icon.dispatch-icon-clock { border-radius: 999px; }
.dispatch-card-icon.dispatch-icon-clock::before { content: ""; width: 16px; height: 16px; border-left: 3px solid currentColor; border-bottom: 3px solid currentColor; transform: translate(4px, -2px); }

.dispatch-icon-people::before,
.dispatch-icon-inbox::before,
.dispatch-icon-checklist::before,
.dispatch-icon-calendar::before,
.dispatch-icon-route::before,
.dispatch-icon-route-check::before,
.dispatch-icon-truck::before {
  content: "";
  width: 100%;
  height: 100%;
  background: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.dispatch-card-icon.dispatch-icon-people::before {
  width: 42px;
  height: 42px;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='M18 20a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm16 0a7 7 0 1 0 0-14 7 7 0 0 0 0 14ZM4 42c0-8 6.3-15 14-15s14 7 14 15H4Zm24-2c-.4-4.9-2.5-9.2-5.8-12.2A13 13 0 0 1 34 24c6.7 0 12 6 12 13v3H28Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='M18 20a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm16 0a7 7 0 1 0 0-14 7 7 0 0 0 0 14ZM4 42c0-8 6.3-15 14-15s14 7 14 15H4Zm24-2c-.4-4.9-2.5-9.2-5.8-12.2A13 13 0 0 1 34 24c6.7 0 12 6 12 13v3H28Z'/%3E%3C/svg%3E");
}

.dispatch-icon-inbox::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round' d='M8 19 15 7h18l7 12v20H8V19Zm0 0h10l2 6h8l2-6h10'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round' d='M8 19 15 7h18l7 12v20H8V19Zm0 0h10l2 6h8l2-6h10'/%3E%3C/svg%3E");
}

.dispatch-icon-checklist::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round' d='M17 8h14l2 5h5v29H10V13h5l2-5Zm1 15 3 3 6-7m-9 16 3 3 6-7m5-9h4m-4 12h4'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round' d='M17 8h14l2 5h5v29H10V13h5l2-5Zm1 15 3 3 6-7m-9 16 3 3 6-7m5-9h4m-4 12h4'/%3E%3C/svg%3E");
}

.dispatch-icon-calendar::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='7' y='10' width='34' height='31' rx='3'/%3E%3Cpath d='M16 6v8M32 6v8M7 20h34'/%3E%3C/g%3E%3Cg fill='black'%3E%3Ccircle cx='17' cy='28' r='2'/%3E%3Ccircle cx='24' cy='28' r='2'/%3E%3Ccircle cx='31' cy='28' r='2'/%3E%3Ccircle cx='17' cy='35' r='2'/%3E%3Ccircle cx='24' cy='35' r='2'/%3E%3Ccircle cx='31' cy='35' r='2'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='7' y='10' width='34' height='31' rx='3'/%3E%3Cpath d='M16 6v8M32 6v8M7 20h34'/%3E%3C/g%3E%3Cg fill='black'%3E%3Ccircle cx='17' cy='28' r='2'/%3E%3Ccircle cx='24' cy='28' r='2'/%3E%3Ccircle cx='31' cy='28' r='2'/%3E%3Ccircle cx='17' cy='35' r='2'/%3E%3Ccircle cx='24' cy='35' r='2'/%3E%3Ccircle cx='31' cy='35' r='2'/%3E%3C/g%3E%3C/svg%3E");
}

.dispatch-icon-route::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='35' r='5'/%3E%3Ccircle cx='24' cy='24' r='5'/%3E%3Ccircle cx='38' cy='10' r='5'/%3E%3Cpath d='m13 32 7-5m8-7 7-7M14 36h10l7 6 8-7'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='35' r='5'/%3E%3Ccircle cx='24' cy='24' r='5'/%3E%3Ccircle cx='38' cy='10' r='5'/%3E%3Cpath d='m13 32 7-5m8-7 7-7M14 36h10l7 6 8-7'/%3E%3C/g%3E%3C/svg%3E");
}

.dispatch-icon-route-check::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='27' r='5'/%3E%3Ccircle cx='25' cy='18' r='5'/%3E%3Cpath d='m13 25 8-5M12 31h11l7 7 8-6'/%3E%3Cpath d='m31 13 4 4 8-9'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='27' r='5'/%3E%3Ccircle cx='25' cy='18' r='5'/%3E%3Cpath d='m13 25 8-5M12 31h11l7 7 8-6'/%3E%3Cpath d='m31 13 4 4 8-9'/%3E%3C/g%3E%3C/svg%3E");
}

.dispatch-icon-truck::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13h25v21H5V13Zm25 8h7l6 7v6H30V21Z'/%3E%3Ccircle cx='15' cy='37' r='4'/%3E%3Ccircle cx='35' cy='37' r='4'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13h25v21H5V13Zm25 8h7l6 7v6H30V21Z'/%3E%3Ccircle cx='15' cy='37' r='4'/%3E%3Ccircle cx='35' cy='37' r='4'/%3E%3C/g%3E%3C/svg%3E");
}




/* Exception cards intentionally match the Command Center-style reference row. */
.dispatch-exception-card.dispatch-card-tone-orange { color: var(--status-no-coverage); }
.dispatch-exception-card.dispatch-card-tone-red { color: var(--status-capacity); }
.dispatch-exception-card.dispatch-card-tone-violet { color: var(--status-vip); }

.dispatch-exception-card .dispatch-card-copy {
  color: #f4fbff !important;
  font-size: 1rem;
  font-weight: 850;
  text-transform: none !important;
}

.dispatch-exception-card .dispatch-card-icon {
  width: 42px;
  height: 42px;
  color: currentColor;
  background: transparent;
  -webkit-mask-image: none;
  mask-image: none;
}

.dispatch-exception-card .dispatch-card-icon::before,
.dispatch-exception-card .dispatch-card-icon::after {
  -webkit-mask-image: none;
  mask-image: none;
}

.dispatch-exception-card .dispatch-icon-alert {
  border: 3px solid currentColor;
  border-radius: 999px;
}

.dispatch-exception-card .dispatch-icon-alert::before {
  content: "!";
  width: auto;
  height: auto;
  color: currentColor;
  background: transparent;
  font-size: 1.7rem;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-1px);
}

.dispatch-exception-card .dispatch-icon-clock {
  border: 3px solid currentColor;
  border-radius: 999px;
}

.dispatch-exception-card .dispatch-icon-clock::before {
  content: "";
  width: 15px;
  height: 15px;
  background: transparent;
  border-left: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: translate(4px, -2px);
}

.dispatch-exception-card .dispatch-icon-people {
  border: 0;
  border-radius: 0;
}

.dispatch-exception-card .dispatch-icon-people::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: -12px 2px 0 -1px currentColor, 12px 2px 0 -1px currentColor;
  transform: translateY(-9px);
}

.dispatch-exception-card .dispatch-icon-people::after {
  content: "";
  position: absolute;
  width: 28px;
  height: 14px;
  border-radius: 16px 16px 5px 5px;
  background: currentColor;
  box-shadow: -11px 4px 0 -4px currentColor, 11px 4px 0 -4px currentColor;
  transform: translateY(9px);
}

.dispatch-card-tone-green { color: var(--status-scheduled); }
.dispatch-card-tone-amber,
.dispatch-card-tone-yellow { color: var(--status-unscheduled); }
.dispatch-card-tone-blue,
.dispatch-card-tone-primary { color: var(--status-routing); }
.dispatch-card-tone-red,
.dispatch-card-tone-danger { color: var(--status-capacity); }
.dispatch-card-tone-orange { color: var(--status-no-coverage); }
.dispatch-card-tone-violet,
.dispatch-card-tone-warning { color: var(--status-vip); }
.dispatch-card-tone-cyan,
.dispatch-card-tone-success { color: var(--map-zone); }

.dispatch-dashboard-map-panel {
  display: grid;
  gap: 14px;
}

.dispatch-dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(360px, 1fr);
  align-items: stretch;
  gap: 16px;
}

.dispatch-dashboard-action {
  min-width: 148px;
  font-weight: 800;
}

.dispatch-dashboard-map-controls {
  margin-bottom: 0;
}

.dispatch-zip-lookup-form {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 5px;
}

.dispatch-zip-lookup-form input {
  width: 104px;
}

.dispatch-zip-lookup-result {
  margin-top: -8px;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.dispatch-zip-lookup-result.is-alert {
  color: var(--status-capacity);
  font-weight: 750;
}

.dispatch-dashboard-map {
  min-height: 750px;
}

.dispatch-dashboard-map-status {
  color: rgba(230, 247, 251, 0.68);
  font-size: 0.84rem;
}

.dispatch-dashboard-map-status.is-alert {
  color: #ff4050;
  font-weight: 850;
}

.dispatch-coverage-table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 568px;
  border: 1px solid rgba(118, 238, 255, 0.12);
  border-radius: 8px;
  background: rgba(5, 13, 18, 0.34);
}

.dispatch-coverage-table {
  color: var(--ops-text);
}

.dispatch-coverage-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(118, 238, 255, 0.18);
  color: #c6f7ff;
  background: rgba(19, 41, 54, 0.62);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dispatch-coverage-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(118, 238, 255, 0.1);
  vertical-align: middle;
}

.dispatch-coverage-table tbody tr:last-child td {
  border-bottom: 0;
}

.dispatch-coverage-table tbody tr:hover {
  background: rgba(40, 231, 255, 0.035);
}

.dispatch-coverage-table tbody tr[data-tech-coverage-row] {
  cursor: pointer;
  transition: background-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.dispatch-coverage-table tbody tr[data-tech-coverage-row].dispatch-tech-load-success {
  background: rgba(34, 197, 94, 0.075);
  box-shadow: inset 3px 0 0 #22c55e;
}

.dispatch-coverage-table tbody tr[data-tech-coverage-row].dispatch-tech-load-warning {
  background: rgba(250, 204, 21, 0.08);
  box-shadow: inset 3px 0 0 #facc15;
}

.dispatch-coverage-table tbody tr[data-tech-coverage-row].dispatch-tech-load-danger {
  background: rgba(239, 68, 68, 0.08);
  box-shadow: inset 3px 0 0 #ef4444;
}

.dispatch-coverage-table tbody tr[data-tech-coverage-row]:hover {
  background: rgba(40, 231, 255, 0.075);
  box-shadow:
    inset 3px 0 0 var(--map-tech-coverage),
    0 0 22px rgba(181, 96, 255, 0.22),
    0 0 18px rgba(40, 231, 255, 0.16);
}

.dispatch-coverage-table tbody tr[data-tech-coverage-row].dispatch-tech-load-success:hover {
  background: rgba(34, 197, 94, 0.12);
  box-shadow:
    inset 3px 0 0 #22c55e,
    0 0 22px rgba(34, 197, 94, 0.18);
}

.dispatch-coverage-table tbody tr[data-tech-coverage-row].dispatch-tech-load-warning:hover {
  background: rgba(250, 204, 21, 0.13);
  box-shadow:
    inset 3px 0 0 #facc15,
    0 0 22px rgba(250, 204, 21, 0.18);
}

.dispatch-coverage-table tbody tr[data-tech-coverage-row].dispatch-tech-load-danger:hover {
  background: rgba(239, 68, 68, 0.13);
  box-shadow:
    inset 3px 0 0 #ef4444,
    0 0 22px rgba(239, 68, 68, 0.18);
}

.dispatch-coverage-table tbody tr[data-tech-coverage-row]:focus,
.dispatch-coverage-table tbody tr[data-tech-coverage-row]:focus-visible {
  outline: 0;
  background: rgba(40, 231, 255, 0.075);
  box-shadow:
    inset 3px 0 0 var(--focus-ring),
    0 0 0 1px rgba(40, 231, 255, 0.22),
    0 0 22px rgba(40, 231, 255, 0.18);
}

.dispatch-coverage-table tbody tr[data-tech-coverage-row].selected {
  background: rgba(40, 231, 255, 0.1);
  box-shadow:
    inset 3px 0 0 var(--map-tech-coverage),
    0 0 24px rgba(181, 96, 255, 0.2);
}

.dispatch-tech-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dispatch-tech-cell strong,
.dispatch-capacity-number {
  color: var(--frost-dark-text, #f4fbff);
  font-weight: 850;
}

.dispatch-tech-home-icon {
  position: relative;
  width: 25px;
  height: 21px;
  flex: 0 0 auto;
  color: var(--map-tech-home);
}

.dispatch-tech-home-icon::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 8px;
  width: 19px;
  height: 13px;
  background: currentColor;
  border-radius: 2px;
}

.dispatch-tech-home-icon::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 1px;
  width: 21px;
  height: 21px;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-bottom: 11px solid currentColor;
}

.dispatch-zip-badge,
.dispatch-availability-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1;
}

.dispatch-zip-badge {
  color: #031014;
  background: var(--map-zone);
}

.dispatch-availability-badge.active {
  color: #031014;
  background: var(--status-scheduled);
}

.dispatch-availability-badge.inactive {
  color: #fff;
  background: rgba(148, 163, 184, 0.36);
}

.dispatch-availability-badge.overnight {
  margin-left: 6px;
  color: #031014;
  background: var(--status-routing);
}

.dispatch-edit-button {
  min-width: 58px;
  font-weight: 850;
}

.schedule-warning {
  border-color: rgba(255, 107, 122, 0.55) !important;
  background: rgba(93, 16, 28, 0.24) !important;
}

.dashboard-rank-card {
  display: grid;
  gap: 12px;
  padding: 13px;
  border: 1px solid rgba(40, 231, 255, 0.18);
  border-radius: 8px;
  color: var(--ops-text);
  background: rgba(7, 16, 22, 0.52);
  text-decoration: none;
}

.dashboard-rank-card:hover {
  color: var(--ops-text);
  border-color: rgba(40, 231, 255, 0.44);
  background: rgba(19, 41, 54, 0.78);
}

.dispatch-schedule-stack {
  display: grid;
  gap: 12px;
}

.dispatch-schedule-group-header {
  position: relative;
  border-color: rgba(103, 232, 249, 0.46);
  background:
    linear-gradient(90deg, rgba(40, 231, 255, 0.14), rgba(84, 241, 166, 0.04) 46%, rgba(7, 18, 25, 0.74)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 55%);
  box-shadow:
    inset 4px 0 0 rgba(40, 231, 255, 0.82),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 24px rgba(40, 231, 255, 0.08);
}

.dispatch-schedule-group-header h2 {
  color: #e8fbff;
  letter-spacing: 0;
}

.dispatch-schedule-group-header {
  border-color: rgba(40, 231, 255, 0.42);
  background:
    linear-gradient(90deg, rgba(40, 231, 255, 0.16), rgba(7, 18, 25, 0.76)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 56%);
}

.dispatch-proposed-jump-panel {
  cursor: pointer;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

.dispatch-proposed-jump-panel:hover,
.dispatch-proposed-jump-panel:focus,
.dispatch-proposed-jump-panel:focus-visible {
  border-color: rgba(40, 231, 255, 0.72);
  background:
    linear-gradient(90deg, rgba(40, 231, 255, 0.18), rgba(84, 241, 166, 0.06) 48%, rgba(7, 18, 25, 0.74)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 56%);
  box-shadow:
    inset 4px 0 0 rgba(40, 231, 255, 0.92),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 24px rgba(40, 231, 255, 0.14);
  outline: 0;
}

.dispatch-schedule-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(624px, 672px);
  grid-template-rows: auto 1fr;
  gap: 10px;
  align-items: stretch;
  padding: 10px 12px;
}

.dispatch-schedule-row-error {
  border-color: rgba(255, 107, 122, 0.58);
  background:
    linear-gradient(180deg, rgba(255, 107, 122, 0.1), transparent 42%),
    linear-gradient(135deg, rgba(38, 18, 28, 0.9), rgba(7, 18, 25, 0.78));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 0 24px rgba(255, 107, 122, 0.14);
}

.dispatch-schedule-order {
  grid-column: 1;
  grid-row: 1;
  max-width: 220px;
  min-width: 0;
}

.dispatch-schedule-order-number {
  display: inline-flex;
  color: #f4fbff;
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1.05;
}

.dispatch-schedule-customer {
  margin-top: 2px;
  color: #f4fbff;
  font-size: 1rem;
  font-weight: 800;
}

.dispatch-schedule-address {
  margin-top: 4px;
  line-height: 1.22;
}

.dispatch-schedule-status {
  color: #f4fbff;
  font-weight: 900;
}

.dispatch-repair-pill {
  display: inline-flex;
  width: fit-content;
  padding: 3px 7px;
  border: 1px solid rgba(251, 191, 36, 0.42);
  border-radius: 999px;
  color: #ffe7a3;
  background: rgba(80, 57, 10, 0.34);
  font-size: 0.76rem;
  font-weight: 800;
}

.dispatch-unschedule-pill {
  max-width: 100%;
  line-height: 1.2;
}

.dispatch-schedule-fields {
  grid-column: 1;
  grid-row: 1 / span 2;
  display: grid;
  grid-template-columns: 220px repeat(5, minmax(92px, 1fr));
  gap: 8px 10px;
  align-content: start;
}

.dispatch-schedule-fields::before {
  content: "";
  grid-row: 1 / span 2;
}

.dispatch-schedule-row .form-label {
  margin-bottom: 3px;
  font-size: 0.78rem;
}

.dispatch-schedule-row textarea.form-control {
  min-height: 58px;
}

.dispatch-schedule-notes {
  grid-column: 2 / span 3;
}

.dispatch-schedule-actions {
  grid-column: 5 / span 2;
  align-self: end;
}

.dispatch-schedule-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.dispatch-schedule-controls .btn {
  white-space: nowrap;
}

.dispatch-schedule-suggestions {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: stretch;
  min-width: 0;
}

.dispatch-suggestion-box {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 8px;
  border: 1px solid rgba(40, 231, 255, 0.18);
  border-radius: 8px;
  background: rgba(7, 16, 22, 0.36);
}

.dispatch-suggestion-box-empty {
  border-color: color-mix(in srgb, var(--status-capacity) 62%, transparent);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--status-capacity) 18%, transparent), rgba(7, 16, 22, 0.36)),
    rgba(7, 16, 22, 0.36);
  box-shadow: inset 4px 0 0 var(--status-capacity), 0 0 16px color-mix(in srgb, var(--status-capacity) 14%, transparent);
}

.dispatch-suggestion-box-empty .text-secondary {
  color: color-mix(in srgb, var(--status-capacity) 72%, var(--text-primary)) !important;
  font-weight: 750;
}

.dispatch-suggestion-list {
  display: grid;
  gap: 5px;
  flex: 1 1 auto;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}

.dispatch-suggestion-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 52px;
  padding: 6px 9px 6px 12px;
  border: 1px solid rgba(118, 238, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(24, 58, 72, 0.42), rgba(7, 18, 25, 0.34)),
    rgba(11, 23, 32, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.dispatch-suggestion-card-success { --capacity-status-color: var(--status-scheduled); }
.dispatch-suggestion-card-warning { --capacity-status-color: var(--status-unscheduled); }
.dispatch-suggestion-card-danger { --capacity-status-color: var(--status-capacity); }

.dispatch-suggestion-card-success,
.dispatch-suggestion-card-warning,
.dispatch-suggestion-card-danger {
  border-left: 5px solid var(--capacity-status-color);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 0 14px color-mix(in srgb, var(--capacity-status-color) 14%, transparent);
}

.dispatch-suggestion-card-travel-tech {
  border-left-color: #f59e0b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 0 14px color-mix(in srgb, #f59e0b 14%, transparent);
}

.dispatch-suggestion-main {
  display: grid;
  grid-template-columns: minmax(190px, 235px) 86px 70px minmax(90px, 110px) 64px minmax(132px, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.dispatch-suggestion-identity {
  min-width: 0;
}

.dispatch-suggestion-tech {
  color: #f4fbff;
  font-size: 0.94rem;
  font-weight: 900;
  line-height: 1.12;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dispatch-suggestion-meta {
  margin-top: 2px;
  color: rgba(230, 247, 251, 0.72);
  font-size: 0.78rem;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dispatch-suggestion-capacity-row {
  display: contents;
}

.dispatch-suggestion-metric {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.dispatch-suggestion-nearby-stop {
  align-self: center;
  justify-self: center;
  color: var(--nearby-stop-color);
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.dispatch-suggestion-nearby-stop-close {
  --nearby-stop-color: var(--status-scheduled);
}

.dispatch-suggestion-nearby-stop-extended {
  --nearby-stop-color: color-mix(in srgb, var(--status-unscheduled) 68%, var(--text-secondary));
}

.dispatch-suggestion-label {
  color: rgba(230, 247, 251, 0.58);
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1;
}

.dispatch-suggestion-value {
  color: #f4fbff;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.1;
}

.dispatch-suggestion-capacity-row-legacy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 13px;
  margin-top: 8px;
  color: rgba(230, 247, 251, 0.86);
  font-size: 0.82rem;
}

.capacity-status-badge,
.dispatch-capacity-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  min-height: 25px;
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1;
}

.capacity-status-success,
.dispatch-capacity-badge-success { --capacity-status-color: var(--status-scheduled); }
.capacity-status-warning,
.dispatch-capacity-badge-warning { --capacity-status-color: var(--status-unscheduled); }
.capacity-status-danger,
.dispatch-capacity-badge-danger { --capacity-status-color: var(--status-capacity); }

.capacity-status-badge,
.dispatch-capacity-badge {
  color: color-mix(in srgb, var(--capacity-status-color) 82%, var(--text-primary));
  border: 1px solid color-mix(in srgb, var(--capacity-status-color) 54%, transparent);
  background: color-mix(in srgb, var(--capacity-status-color) 18%, var(--panel-background));
  box-shadow: 0 0 14px color-mix(in srgb, var(--capacity-status-color) 12%, transparent);
}

.capacity-status-text-success,
.dispatch-load-text-success { color: var(--status-scheduled); }
.capacity-status-text-warning,
.dispatch-load-text-warning { color: var(--status-unscheduled); }
.capacity-status-text-danger,
.dispatch-load-text-danger { color: var(--status-capacity); }

.dispatch-suggestion-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 6px;
  flex: 0 0 auto;
}

.dispatch-suggestion-actions .btn {
  min-width: 74px;
  padding-inline: 10px;
}

.dispatch-suggestion-actions .btn-primary {
  color: #031014;
  font-weight: 900;
  box-shadow: 0 0 18px rgba(40, 231, 255, 0.16);
}

/* Scheduling is a single-order work queue: queue context remains visible beside one scheduling desk. */
.scheduling-workspace {
  --scheduling-selected-surface: color-mix(in srgb, var(--action-primary) 16%, var(--panel-background));
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  column-gap: 80px;
  row-gap: 16px;
  padding-right: 80px;
  align-items: start;
}

.scheduling-queue-panel {
  position: sticky;
  top: var(--scheduling-queue-sticky-top, 12px);
  display: flex;
  flex-direction: column;
  height: var(--scheduling-queue-available-height, calc(100dvh - 24px));
  max-height: var(--scheduling-queue-available-height, calc(100dvh - 24px));
  min-height: 0;
  overflow: hidden;
}

.scheduling-queue-panel > :not(.scheduling-queue-list) {
  flex: 0 0 auto;
}

.scheduling-queue-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.scheduling-queue-tabs a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--panel-border);
  border-radius: var(--control-pill-radius);
  color: var(--text-secondary);
  text-decoration: none;
}

.scheduling-queue-tabs a:hover,
.scheduling-queue-tabs a:focus,
.scheduling-queue-tabs a.active {
  border-color: var(--action-primary);
  color: var(--text-primary);
  background: color-mix(in srgb, var(--action-primary) 14%, var(--panel-background));
}

.scheduling-queue-tabs span {
  min-width: 1.5rem;
  padding: 1px 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-secondary) 16%, transparent);
  font-size: 0.75rem;
  font-weight: 800;
  text-align: center;
}

.scheduling-queue-list {
  position: relative;
  display: grid;
  flex: 1 1 0;
  gap: 6px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 3px;
}

.scheduling-queue-list::after {
  content: "";
  position: absolute;
  top: var(--scheduling-queue-tail-top, 100%);
  left: 0;
  width: 1px;
  height: var(--scheduling-queue-tail-height, 0px);
  pointer-events: none;
}

.scheduling-queue-row {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--panel-border);
  border-radius: 7px;
  color: var(--text-primary);
  background: color-mix(in srgb, var(--panel-background) 88%, transparent);
  text-decoration: none;
}

.scheduling-queue-row:hover,
.scheduling-queue-row:focus {
  border-color: var(--action-primary);
  color: var(--text-primary);
  outline: var(--focus-ring);
  outline-offset: 1px;
}

.scheduling-queue-row.active {
  border-color: var(--action-primary);
  border-left: 4px solid var(--action-primary);
  border-right: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  background: var(--scheduling-selected-surface);
}

.scheduling-selection-bridge {
  position: absolute;
  z-index: 2;
  --scheduling-bridge-top-radius: 0px;
  --scheduling-bridge-bottom-radius: 0px;
  --scheduling-bridge-curve-width: 0px;
  --scheduling-bridge-inner-fill: var(--scheduling-selected-surface);
  --scheduling-bridge-inner-border: color-mix(in srgb, var(--action-primary) 48%, var(--surface-border));
  border-top: 1px solid color-mix(in srgb, var(--action-primary) 65%, var(--surface-border));
  border-bottom: 1px solid color-mix(in srgb, var(--action-primary) 65%, var(--surface-border));
  background: var(--scheduling-selected-surface);
  pointer-events: none;
}

.scheduling-selection-bridge::before,
.scheduling-selection-bridge::after {
  content: "";
  position: absolute;
  right: 0;
}

.scheduling-selection-bridge::before {
  bottom: calc(100% - 1px);
  width: var(--scheduling-bridge-curve-width);
  height: var(--scheduling-bridge-top-radius);
  background: radial-gradient(ellipse var(--scheduling-bridge-curve-width) var(--scheduling-bridge-top-radius) at 0 0,
    transparent calc(var(--scheduling-bridge-curve-width) - 1px),
    var(--scheduling-bridge-inner-border) var(--scheduling-bridge-curve-width),
    var(--scheduling-bridge-inner-fill) calc(var(--scheduling-bridge-curve-width) + 1px));
}

.scheduling-selection-bridge::after {
  top: calc(100% - 1px);
  width: var(--scheduling-bridge-curve-width);
  height: var(--scheduling-bridge-bottom-radius);
  background: radial-gradient(ellipse var(--scheduling-bridge-curve-width) var(--scheduling-bridge-bottom-radius) at 0 100%,
    transparent calc(var(--scheduling-bridge-curve-width) - 1px),
    var(--scheduling-bridge-inner-border) var(--scheduling-bridge-curve-width),
    var(--scheduling-bridge-inner-fill) calc(var(--scheduling-bridge-curve-width) + 1px));
}

.scheduling-selection-bridge.scheduling-bridge-top-outward::before {
  background: radial-gradient(ellipse var(--scheduling-bridge-curve-width) var(--scheduling-bridge-top-radius) at 0 100%,
    var(--scheduling-bridge-inner-fill) calc(var(--scheduling-bridge-curve-width) - 1px),
    var(--scheduling-bridge-inner-border) var(--scheduling-bridge-curve-width),
    transparent calc(var(--scheduling-bridge-curve-width) + 1px));
}

.scheduling-selection-bridge.scheduling-bridge-bottom-outward::after {
  background: radial-gradient(ellipse var(--scheduling-bridge-curve-width) var(--scheduling-bridge-bottom-radius) at 0 0,
    var(--scheduling-bridge-inner-fill) calc(var(--scheduling-bridge-curve-width) - 1px),
    var(--scheduling-bridge-inner-border) var(--scheduling-bridge-curve-width),
    transparent calc(var(--scheduling-bridge-curve-width) + 1px));
}

.scheduling-selection-bridge.scheduling-bridge-top-flat::before,
.scheduling-selection-bridge.scheduling-bridge-bottom-flat::after { display: none; }

.scheduling-selection-bridge[hidden] { display: none; }

.scheduling-queue-row-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.scheduling-queue-repair-time {
  color: var(--text-heading);
  font-weight: 850;
}

.scheduling-queue-customer {
  font-weight: 750;
}

.scheduling-queue-pill {
  width: fit-content;
  margin-top: 2px;
  font-size: 0.7rem;
}

.scheduling-detail-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.scheduling-detail-context,
.scheduling-notes-grid,
.scheduling-manual-proposal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.scheduling-detail-context section {
  padding: 12px;
  border: 1px solid var(--panel-border);
  border-radius: 7px;
  background: color-mix(in srgb, var(--panel-background) 80%, transparent);
}

.scheduling-detail-context h3 {
  margin-bottom: 10px;
}

.scheduling-repair-time-value {
  color: var(--text-heading);
  font-weight: 850;
}

.scheduling-customer-preference .form-label,
.scheduling-customer-preference .form-select {
  color: var(--semantic-warning-text);
  font-weight: 850;
}

.scheduling-customer-preference .form-select {
  border-color: var(--semantic-warning-border);
}

.scheduling-notes-grid textarea.form-control {
  min-height: 82px;
}

.scheduling-manual-proposal {
  padding-top: 12px;
  border-top: 1px solid var(--panel-border);
}

.scheduling-manual-proposal summary {
  color: var(--text-primary);
  cursor: pointer;
  font-weight: 700;
}

.scheduling-detail-empty {
  display: grid;
  min-height: 360px;
  align-content: center;
}

.dispatch-unschedule-notice {
  display: inline-flex;
  margin-top: 4px;
  padding: 3px 8px;
  border: 1px solid rgba(251, 191, 36, 0.58);
  border-radius: 999px;
  color: #ffd76b;
  background: rgba(80, 57, 10, 0.42);
  font-weight: 800;
}

.routing-summary-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.routing-summary-inline span {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid rgba(40, 231, 255, 0.18);
  border-radius: 999px;
  background: rgba(7, 16, 22, 0.38);
}

.routing-week-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.routing-week-label {
  min-width: 170px;
  text-align: center;
  color: var(--ops-text);
  font-weight: 800;
}

.routing-board-panel {
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 30%),
    linear-gradient(135deg, rgba(106, 119, 128, 0.16), rgba(4, 12, 17, 0.5)),
    rgba(13, 29, 38, 0.9);
}

.routing-global-save-form {
  margin: 0;
}

.routing-global-save-button.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-color: rgba(40, 231, 255, 0.85);
  color: #001017;
  background: linear-gradient(180deg, #9ff8ff, #22d3ee);
  box-shadow: 0 0 18px rgba(40, 231, 255, 0.34);
}

.routing-global-save-button.btn:disabled {
  opacity: 0.78;
  color: #0d2330;
  background: linear-gradient(180deg, rgba(159, 248, 255, 0.72), rgba(34, 211, 238, 0.62));
  box-shadow: none;
}

.routing-global-save-button.btn.routing-global-save-active {
  border-color: rgba(159, 248, 255, 0.95);
  color: #001017;
  background: linear-gradient(180deg, #b8fbff, #28e7ff 55%, #16b8d8);
  box-shadow: 0 0 22px rgba(40, 231, 255, 0.48);
}

.routing-global-save-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  min-height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  color: #061017;
  background: #fbbf24;
  font-size: 0.72rem;
  font-weight: 950;
}

.routing-board-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  color: var(--ops-muted);
  font-size: 0.82rem;
}

.routing-board-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.routing-legend-dot,
.routing-pref-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.routing-legend-pref,
.routing-pref-dot {
  background: #fbbf24;
  box-shadow: 0 0 9px rgba(251, 191, 36, 0.76);
}

.routing-legend-routed {
  background: #54f1a6;
}

.routing-legend-needs {
  border: 2px solid #fbbf24;
}

.routing-legend-unsaved {
  background: #ff6b7a;
}

.routing-board-scroll {
  max-height: 620px;
  overflow: auto;
  padding-bottom: 6px;
  border: 1px solid rgba(118, 238, 255, 0.24);
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(148, 163, 174, 0.1), transparent 18%),
    rgba(6, 16, 22, 0.58);
  box-shadow: inset 0 0 0 1px rgba(5, 13, 18, 0.7);
}

.routing-board-grid {
  display: grid;
  grid-template-columns: 170px repeat(7, minmax(185px, 1fr));
  gap: 6px;
  min-width: 1465px;
}

.routing-board-grid.routing-selected-col-0 { grid-template-columns: 170px minmax(300px, 2fr) repeat(6, minmax(150px, 1fr)); }
.routing-board-grid.routing-selected-col-1 { grid-template-columns: 170px minmax(150px, 1fr) minmax(300px, 2fr) repeat(5, minmax(150px, 1fr)); }
.routing-board-grid.routing-selected-col-2 { grid-template-columns: 170px repeat(2, minmax(150px, 1fr)) minmax(300px, 2fr) repeat(4, minmax(150px, 1fr)); }
.routing-board-grid.routing-selected-col-3 { grid-template-columns: 170px repeat(3, minmax(150px, 1fr)) minmax(300px, 2fr) repeat(3, minmax(150px, 1fr)); }
.routing-board-grid.routing-selected-col-4 { grid-template-columns: 170px repeat(4, minmax(150px, 1fr)) minmax(300px, 2fr) repeat(2, minmax(150px, 1fr)); }
.routing-board-grid.routing-selected-col-5 { grid-template-columns: 170px repeat(5, minmax(150px, 1fr)) minmax(300px, 2fr) minmax(150px, 1fr); }
.routing-board-grid.routing-selected-col-6 { grid-template-columns: 170px repeat(6, minmax(150px, 1fr)) minmax(300px, 2fr); }

.routing-board-header {
  position: sticky;
  top: 0;
  z-index: 3;
  margin-bottom: 8px;
  padding-bottom: 6px;
  background:
    linear-gradient(180deg, rgba(44, 68, 78, 0.98), rgba(14, 31, 40, 0.98));
}

.routing-tech-heading,
.routing-day-heading,
.routing-tech-card,
.routing-cell {
  border: 1px solid rgba(118, 238, 255, 0.32);
  border-radius: 8px;
  background: rgba(16, 36, 46, 0.82);
}

.routing-tech-heading,
.routing-day-heading {
  padding: 9px;
  color: var(--ops-text);
  font-weight: 900;
  box-shadow:
    inset 0 -1px 0 rgba(118, 238, 255, 0.18),
    0 1px 0 rgba(0, 0, 0, 0.36);
}


.routing-day-heading.routing-day-today {
  border-color: rgba(56, 189, 248, 0.92);
  background:
    linear-gradient(180deg, rgba(125, 211, 252, 0.34), rgba(14, 165, 233, 0.14) 58%),
    rgba(8, 47, 73, 0.96);
  box-shadow:
    inset 0 0 0 1px rgba(186, 230, 253, 0.24),
    0 0 22px rgba(14, 165, 233, 0.34);
}

.routing-day-heading.routing-day-today .text-secondary {
  color: #bae6fd !important;
}

.routing-tech-row {
  margin-bottom: 8px;
}

.routing-tech-card {
  position: sticky;
  left: 0;
  z-index: 2;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px;
  background:
    linear-gradient(180deg, rgba(148, 163, 174, 0.18), transparent 58%),
    rgba(17, 36, 46, 0.98);
  box-shadow:
    inset -1px 0 0 rgba(118, 238, 255, 0.2),
    0 0 0 1px rgba(5, 13, 18, 0.26);
}

.routing-cell {
  min-height: 132px;
  padding: 7px;
  background:
    linear-gradient(180deg, rgba(148, 163, 174, 0.12), transparent 54%),
    rgba(12, 30, 39, 0.8);
  box-shadow:
    inset 1px 0 0 rgba(255, 255, 255, 0.045),
    inset 0 0 0 1px rgba(5, 13, 18, 0.2);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.routing-cell-selected {
  border-color: rgba(40, 231, 255, 0.96);
  background:
    linear-gradient(180deg, rgba(40, 231, 255, 0.2), rgba(40, 231, 255, 0.08) 54%, rgba(40, 231, 255, 0.04)),
    rgba(7, 42, 54, 0.94);
  box-shadow:
    inset 0 0 0 3px rgba(40, 231, 255, 0.9),
    inset 0 0 24px rgba(40, 231, 255, 0.2),
    0 0 0 1px rgba(40, 231, 255, 0.48),
    0 0 26px rgba(40, 231, 255, 0.38);
}

.routing-cell.routing-cell-selected.routing-cell-available {
  border-color: #54f1a6;
  background:
    linear-gradient(180deg, rgba(84, 241, 166, 0.28), rgba(84, 241, 166, 0.12) 54%, rgba(84, 241, 166, 0.06)),
    rgba(8, 48, 35, 0.96);
  box-shadow:
    inset 0 0 0 3px rgba(84, 241, 166, 0.96),
    inset 0 0 24px rgba(84, 241, 166, 0.24),
    0 0 0 1px rgba(84, 241, 166, 0.54),
    0 0 28px rgba(84, 241, 166, 0.42);
}

.routing-cell.routing-cell-selected.routing-cell-unavailable {
  border-color: #ff5c76;
  background:
    linear-gradient(180deg, rgba(255, 92, 118, 0.26), rgba(255, 92, 118, 0.11) 54%, rgba(255, 92, 118, 0.06)),
    rgba(54, 16, 25, 0.96);
  box-shadow:
    inset 0 0 0 3px rgba(255, 92, 118, 0.96),
    inset 0 0 24px rgba(255, 92, 118, 0.24),
    0 0 0 1px rgba(255, 92, 118, 0.54),
    0 0 28px rgba(255, 92, 118, 0.42);
}

.routing-cell-today {
  border-color: rgba(56, 189, 248, 0.84);
  background:
    linear-gradient(180deg, rgba(14, 165, 233, 0.16), transparent 52%),
    rgba(8, 36, 56, 0.86);
  box-shadow:
    inset 0 0 0 1px rgba(125, 211, 252, 0.16),
    0 0 16px rgba(14, 165, 233, 0.18);
}

.routing-cell-unsaved {
  border-color: rgba(251, 191, 36, 0.58);
  background:
    linear-gradient(180deg, rgba(251, 191, 36, 0.08), transparent 48%),
    rgba(7, 16, 22, 0.42);
}

.routing-cell-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
}

.routing-day-total {
  margin-left: auto;
  color: var(--ops-muted);
  font-size: 0.78rem;
  font-weight: 850;
  white-space: nowrap;
}

.routing-status-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 2px 7px;
  border: 1px solid rgba(118, 238, 255, 0.2);
  border-radius: 7px;
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1.2;
}

.routing-capacity-chip {
  padding-inline: 6px;
}

.routing-capacity-chip.semantic-pill-success {
  color: #00130b;
  border-color: rgba(84, 241, 166, 0.7);
  background: #54f1a6;
}

.routing-capacity-chip.semantic-pill-warning {
  color: #ffd76b;
  border-color: rgba(251, 191, 36, 0.62);
  background: rgba(80, 57, 10, 0.72);
}

.routing-capacity-chip.semantic-pill-danger {
  color: #ffb4bd;
  border-color: rgba(255, 107, 122, 0.68);
  background: rgba(93, 16, 28, 0.72);
}

.routing-status-success {
  color: #00130b;
  border-color: rgba(84, 241, 166, 0.7);
  background: #54f1a6;
}

.routing-status-routing {
  color: color-mix(in srgb, var(--status-routing) 82%, #ffffff);
  border-color: color-mix(in srgb, var(--status-routing) 68%, transparent);
  background: color-mix(in srgb, var(--status-routing) 22%, transparent);
}

.routing-status-warning {
  color: #ffd76b;
  border-color: rgba(251, 191, 36, 0.62);
  background: rgba(80, 57, 10, 0.42);
}

.routing-status-danger {
  color: #ffb4bd;
  border-color: rgba(255, 107, 122, 0.68);
  background: rgba(93, 16, 28, 0.36);
}

.routing-unsaved-badge {
  display: none;
  padding: 2px 7px;
  border-radius: 999px;
  color: #ffd76b;
  background: rgba(80, 57, 10, 0.54);
  font-size: 0.74rem;
  font-weight: 900;
}

.routing-cell-unsaved .routing-unsaved-badge {
  display: inline-flex;
}

.routing-stop-list {
  display: grid;
  gap: 5px;
  min-height: 58px;
}

.routing-stop-card {
  display: grid;
  gap: 0;
  padding: 4px 6px;
  border: 1px solid rgba(0, 0, 0, 0.72);
  border-radius: 6px;
  color: #061017;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(190, 198, 204, 0.92)),
    #d0d5d9;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 1px 0 rgba(0, 0, 0, 0.42);
  cursor: grab;
}

.routing-stop-card:active,
.routing-stop-dragging {
  cursor: grabbing;
}

.routing-stop-dragging {
  opacity: 0.58;
}

.routing-stop-preferred {
  border-color: rgba(251, 191, 36, 0.72);
  box-shadow: inset 3px 0 0 rgba(251, 191, 36, 0.92), 0 1px 0 rgba(0, 0, 0, 0.42);
}

.routing-stop-card.routing-window-missing {
  border-color: rgba(255, 66, 92, 0.95);
  box-shadow: inset 4px 0 0 rgba(255, 66, 92, 0.98), 0 0 0 1px rgba(255, 66, 92, 0.28), 0 0 16px rgba(255, 66, 92, 0.22);
}

.routing-stop-main,
.routing-stop-meta,
.routing-selected-stop {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.routing-stop-main {
  font-size: 0.76rem;
  font-weight: 950;
  line-height: 1.12;
  white-space: nowrap;
}

.routing-stop-meta {
  font-size: 0.72rem;
}

.routing-stop-drag {
  color: rgba(6, 16, 23, 0.54);
  font-weight: 950;
  letter-spacing: -2px;
  cursor: grab;
}

.routing-stop-link {
  color: #061017;
  text-decoration: none;
  white-space: nowrap;
}

.routing-stop-link:hover,
.routing-stop-link:focus {
  color: #005566;
  text-decoration: underline;
}

.routing-stop-repair {
  color: #0f3440;
  font-weight: 850;
  white-space: nowrap;
}

.routing-stop-location {
  color: #475569;
  font-size: 0.7rem;
  font-weight: 850;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.routing-window-select {
  width: 88px;
  min-height: 26px;
  padding: 2px 24px 2px 7px;
  border-color: rgba(6, 16, 23, 0.28);
  color: #061017;
  background-color: rgba(255, 255, 255, 0.82);
  font-size: 0.72rem;
  font-weight: 850;
}

.routing-pref-text {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 2px 6px;
  border: 1px solid var(--semantic-warning-border);
  border-radius: 999px;
  color: var(--semantic-warning-text);
  background: var(--semantic-warning-surface);
  font-weight: 900;
  text-shadow: none;
  white-space: nowrap;
}

.routing-structured-pref {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 2px 6px;
  border: 1px solid rgba(168, 85, 247, 0.68);
  border-radius: 999px;
  color: #ead8ff;
  background: rgba(112, 48, 173, 0.32);
  font-weight: 900;
  white-space: nowrap;
}

.routing-plan-detail {
  color: #9ec8d1;
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.routing-stop-number,
.routing-empty-cell {
  color: #1f2933;
  font-size: 0.76rem;
  font-weight: 950;
}

.routing-empty-cell {
  color: rgba(137, 168, 179, 0.42);
  font-size: 0.78rem;
  padding: 4px 2px;
}

.routing-cell-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.routing-cell-actions-hidden {
  display: none;
}

.routing-cell-actions-empty {
  display: none;
}

.tech-workday-workspace {
  display: grid;
  gap: 14px;
}

.tech-workday-header,
.tech-workday-calendar-header,
.tech-workday-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tech-workday-header h1,
.tech-workday-calendar-header h2,
.tech-workday-panel-heading h2,
.tech-workday-summary h2 {
  margin: 0;
  color: var(--ops-text);
  font-weight: 950;
  letter-spacing: 0;
}

.tech-workday-header h1 {
  font-size: 1.75rem;
}

.tech-workday-calendar-header h2,
.tech-workday-panel-heading h2 {
  font-size: 1rem;
}

.tech-workday-calendar-header h2 {
  color: #f8fafc;
  font-weight: 950;
  white-space: nowrap;
}

.tech-workday-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  column-gap: 50px;
  row-gap: 10px;
}

.tech-workday-export-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.tech-workday-week-controls {
  justify-content: flex-end;
}

.tech-workday-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.tech-workday-main-column {
  display: grid;
  min-width: 0;
  gap: 14px;
}

.tech-workday-sidebar,
.tech-workday-calendar-panel,
.tech-workday-map-panel {
  overflow: hidden;
  border-color: rgba(118, 238, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(40, 231, 255, 0.08), transparent 34%),
    rgba(3, 12, 17, 0.76);
}

.tech-workday-sidebar {
  position: sticky;
  top: 82px;
  display: grid;
  gap: 12px;
  max-height: calc(100vh - 118px);
}

.tech-workday-panel-heading span {
  color: var(--ops-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.tech-workday-search {
  color: var(--ops-text);
  border-color: rgba(118, 238, 255, 0.22);
  background: rgba(4, 14, 20, 0.68);
}

.tech-workday-select-all,
.tech-workday-tech-option {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tech-workday-select-all {
  padding: 8px 10px;
  border-block: 1px solid rgba(118, 238, 255, 0.16);
  color: var(--ops-text);
  font-size: 0.88rem;
  font-weight: 850;
}

.tech-workday-tech-list {
  display: grid;
  gap: 7px;
  overflow-y: auto;
  padding-right: 2px;
}

.tech-workday-tech-option {
  min-height: 58px;
  padding: 8px;
  border: 1px solid rgba(118, 238, 255, 0.14);
  border-radius: 8px;
  background: rgba(7, 20, 28, 0.52);
}

.tech-workday-tech-option:hover,
.tech-workday-tech-option:focus-within {
  border-color: rgba(40, 231, 255, 0.38);
  background: rgba(8, 31, 42, 0.72);
}

.tech-workday-tech-option.is-static {
  cursor: default;
}

.tech-workday-avatar {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(40, 231, 255, 0.36);
  border-radius: 50%;
  color: #98f3ff;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.18), transparent 32%),
    rgba(8, 82, 100, 0.82);
  font-size: 0.82rem;
  font-weight: 950;
}

.tech-workday-tech-copy {
  display: grid;
  min-width: 0;
  flex: 1 1 auto;
  gap: 1px;
}

.tech-workday-tech-copy strong,
.tech-workday-tech-copy span,
.tech-workday-location {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tech-workday-tech-copy strong {
  color: var(--ops-text);
  font-size: 0.9rem;
}

.tech-workday-tech-copy span,
.tech-workday-tech-cell small {
  color: var(--ops-muted);
  font-size: 0.7rem;
  white-space: nowrap;
}

.tech-workday-tech-status {
  padding: 3px 7px;
  border: 1px solid rgba(34, 197, 94, 0.34);
  border-radius: 999px;
  color: #4ade80;
  background: rgba(20, 83, 45, 0.3);
  font-size: 0.72rem;
  font-weight: 900;
}

.tech-workday-tech-status.is-muted {
  color: var(--ops-muted);
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.28);
}

.tech-workday-summary {
  display: grid;
  gap: 10px;
  padding-top: 4px;
}

.tech-workday-summary h2 {
  font-size: 0.88rem;
  text-transform: uppercase;
}

.tech-workday-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.tech-workday-summary-grid div {
  min-height: 76px;
  padding: 10px;
  border: 1px solid rgba(118, 238, 255, 0.14);
  border-radius: 8px;
  background: rgba(4, 14, 20, 0.44);
}

.tech-workday-summary-grid strong {
  display: block;
  color: var(--ops-cyan);
  font-size: 1.45rem;
  line-height: 1.05;
}

.tech-workday-summary-grid span {
  color: var(--ops-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.tech-workday-selected-count {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.tech-workday-selected-count span {
  color: #bae6fd;
  font-size: 1.55rem;
  font-weight: 950;
  line-height: 1;
}

.tech-workday-calendar-header {
  margin: -1px -1px 0;
  padding: 18px 18px;
  border: 1px solid rgba(40, 231, 255, 0.92);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 38%),
    linear-gradient(135deg, rgba(40, 231, 255, 0.09), rgba(8, 24, 34, 0.94) 42%, rgba(5, 14, 22, 0.98)),
    rgba(7, 18, 27, 0.96);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 0 18px rgba(40, 231, 255, 0.055),
    0 0 0 1px rgba(40, 231, 255, 0.16),
    0 0 32px rgba(40, 231, 255, 0.24);
}

.tech-workday-map-panel {
  min-height: 0;
  padding: 16px;
  overflow: visible;
}

.tech-workday-map-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.tech-workday-map-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 8px;
}

.tech-workday-map-tech-picker {
  position: relative;
}

.tech-workday-map-tech-picker summary {
  min-height: 31px;
  padding: 5px 9px;
  border: 1px solid rgba(118, 238, 255, 0.34);
  border-radius: 6px;
  color: var(--ops-text);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 850;
  list-style: none;
}

.tech-workday-map-tech-picker summary::-webkit-details-marker { display: none; }

.tech-workday-map-tech-options {
  position: absolute;
  z-index: 8;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  min-width: 220px;
  max-height: 260px;
  gap: 6px;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid rgba(118, 238, 255, 0.3);
  border-radius: 8px;
  background: rgba(4, 18, 27, 0.98);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.34);
}

.tech-workday-map-tech-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ops-text);
  font-size: 0.8rem;
  font-weight: 750;
}

.tech-workday-map-header h2 {
  margin: 0;
  color: var(--ops-text);
  font-size: 1.05rem;
  font-weight: 900;
}

.tech-workday-map-canvas {
  position: relative;
  z-index: 1;
  min-height: 400px;
  overflow: hidden;
  border: 1px solid rgba(118, 238, 255, 0.26);
  border-radius: 8px;
  background: rgba(4, 14, 20, 0.72);
}

/* Match the Midnight Dispatch map chrome without changing Frost controls. */
[data-p2p-theme="dark"] .tech-workday-map-panel :is(.leaflet-control-zoom, .leaflet-control-layers) {
  overflow: hidden;
  border: 1px solid rgba(118, 238, 255, 0.22) !important;
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

[data-p2p-theme="dark"] .tech-workday-map-panel :is(.leaflet-control-zoom a, .leaflet-control-layers, .leaflet-control-attribution) {
  color: rgba(230, 247, 251, 0.78) !important;
  border-color: rgba(118, 238, 255, 0.22) !important;
  background: rgba(5, 13, 18, 0.82) !important;
  backdrop-filter: blur(10px);
}

[data-p2p-theme="dark"] .tech-workday-map-panel .leaflet-control-layers {
  padding: 6px 8px;
}

[data-p2p-theme="dark"] .tech-workday-map-panel .leaflet-control-layers label {
  margin: 0;
  color: var(--ops-text);
  font-size: 0.78rem;
}

[data-p2p-theme="dark"] .tech-workday-map-panel .leaflet-control-layers label + label {
  margin-top: 4px;
}

[data-p2p-theme="dark"] .tech-workday-map-panel .leaflet-control-attribution {
  margin: 0 8px 8px 0;
  padding: 4px 7px;
  border: 1px solid rgba(118, 238, 255, 0.18) !important;
  border-radius: 6px;
  font-size: 0.72rem;
  line-height: 1.2;
}

[data-p2p-theme="dark"] .tech-workday-map-panel .leaflet-control-zoom a:hover,
[data-p2p-theme="dark"] .tech-workday-map-panel .leaflet-control-zoom a:focus {
  color: #031014;
  background: var(--ops-cyan) !important;
}

[data-p2p-theme="dark"] .tech-workday-map-panel .leaflet-control-attribution a {
  color: #9beafe;
}

.tech-workday-map-status,
.tech-workday-map-note {
  margin-top: 8px;
  font-size: 0.78rem;
  font-weight: 750;
}

.tech-workday-map-status { color: var(--ops-text); }

.tech-workday-calendar-scroll {
  overflow: auto;
  margin-top: 10px;
  max-height: calc(100vh - 230px);
}

.tech-workday-calendar-grid {
  display: grid;
  grid-template-columns: 120px repeat(7, minmax(150px, 1fr));
  min-width: 1104px;
}

.tech-workday-selected-col-0 { grid-template-columns: 120px minmax(260px, max-content) repeat(6, minmax(128px, 1fr)); }
.tech-workday-selected-col-1 { grid-template-columns: 120px minmax(128px, 1fr) minmax(260px, max-content) repeat(5, minmax(128px, 1fr)); }
.tech-workday-selected-col-2 { grid-template-columns: 120px repeat(2, minmax(128px, 1fr)) minmax(260px, max-content) repeat(4, minmax(128px, 1fr)); }
.tech-workday-selected-col-3 { grid-template-columns: 120px repeat(3, minmax(128px, 1fr)) minmax(260px, max-content) repeat(3, minmax(128px, 1fr)); }
.tech-workday-selected-col-4 { grid-template-columns: 120px repeat(4, minmax(128px, 1fr)) minmax(260px, max-content) repeat(2, minmax(128px, 1fr)); }
.tech-workday-selected-col-5 { grid-template-columns: 120px repeat(5, minmax(128px, 1fr)) minmax(260px, max-content) minmax(128px, 1fr); }
.tech-workday-selected-col-6 { grid-template-columns: 120px repeat(6, minmax(128px, 1fr)) minmax(260px, max-content); }

.tech-workday-corner,
.tech-workday-column-heading,
.tech-workday-tech-cell,
.tech-workday-day-cell {
  border-right: 1px solid rgba(118, 238, 255, 0.12);
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, transparent, rgba(40, 231, 255, 0.56) 18%, rgba(40, 231, 255, 0.56) 82%, transparent) 1;
}

.tech-workday-corner,
.tech-workday-column-heading {
  position: sticky;
  top: 0;
  z-index: 3;
  min-height: 58px;
  padding: 10px;
  background: rgba(7, 24, 33, 0.98);
}

.tech-workday-corner {
  left: 0;
  z-index: 4;
  color: var(--ops-muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.tech-workday-column-heading {
  display: grid;
  align-content: center;
  border-right-color: transparent;
  gap: 2px;
  color: var(--ops-text);
  text-align: center;
  text-decoration: none;
}

.tech-workday-column-heading.tech-workday-day-selected {
  border-left-color: transparent;
  border-right-color: transparent;
  box-shadow: none;
}

.tech-workday-column-heading span {
  color: var(--ops-muted);
  font-size: 0.78rem;
}

.tech-workday-column-heading:hover,
.tech-workday-column-heading:focus {
  color: #b8f5ff;
  background: rgba(8, 40, 54, 0.98);
}

.tech-workday-tech-cell {
  position: sticky;
  left: 0;
  z-index: 2;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 14px;
  min-height: 172px;
  max-height: 172px;
  padding: 10px;
  text-align: center;
  background: rgba(5, 18, 25, 0.98);
}

.tech-workday-tech-cell > span:last-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.tech-workday-tech-cell strong {
  color: var(--ops-text);
  font-size: 0.84rem;
  line-height: 1.18;
}

.tech-workday-day-cell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 172px;
  max-height: 172px;
  padding: 7px;
  color: inherit;
  text-decoration: none;
  background:
    linear-gradient(180deg, rgba(148, 163, 184, 0.055), transparent 40%),
    rgba(7, 20, 28, 0.7);
}

.tech-workday-day-cell:hover,
.tech-workday-day-cell:focus {
  color: inherit;
  background:
    linear-gradient(180deg, rgba(40, 231, 255, 0.1), transparent 44%),
    rgba(8, 31, 42, 0.82);
}

.tech-workday-day-today {
  background:
    linear-gradient(180deg, rgba(14, 165, 233, 0.16), transparent 52%),
    rgba(8, 30, 42, 0.86);
}

.tech-workday-day-selected {
  border-left-color: rgba(40, 231, 255, 0.82);
  border-right-color: rgba(40, 231, 255, 0.82);
  box-shadow:
    inset 2px 0 0 rgba(40, 231, 255, 0.58),
    inset -2px 0 0 rgba(40, 231, 255, 0.58),
    inset 0 0 0 1px rgba(40, 231, 255, 0.2);
}

.tech-workday-day-count {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 18px;
  color: var(--ops-muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.tech-workday-route-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 16px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.tech-workday-route-success {
  border: 1px solid rgba(34, 197, 94, 0.38);
  color: #bbf7d0;
  background: rgba(20, 83, 45, 0.28);
}

.tech-workday-route-warning {
  border: 1px solid rgba(245, 158, 11, 0.44);
  color: #fed7aa;
  background: rgba(120, 53, 15, 0.3);
}

.tech-workday-route-routing {
  border: 1px solid color-mix(in srgb, var(--status-routing) 62%, transparent);
  color: color-mix(in srgb, var(--status-routing) 78%, #ffffff);
  background: color-mix(in srgb, var(--status-routing) 24%, transparent);
}

.tech-workday-stop-list {
  display: grid;
  align-content: start;
  gap: 4px;
  overflow-y: auto;
  min-height: 0;
  padding-right: 2px;
}

.tech-workday-stop-row {
  display: grid;
  grid-template-columns: 18px auto minmax(72px, 1fr);
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 5px;
  border: 1px solid rgba(118, 238, 255, 0.14);
  border-radius: 6px;
  color: var(--ops-text);
  cursor: pointer;
  text-decoration: none;
  background: rgba(4, 14, 20, 0.58);
}

.tech-workday-stop-row:hover,
.tech-workday-stop-row:focus {
  color: #e0fbff;
  border-color: rgba(40, 231, 255, 0.46);
  background: rgba(8, 40, 54, 0.82);
}

.tech-workday-stop-number {
  color: var(--ops-muted);
  font-size: 0.76rem;
  font-weight: 950;
  text-align: center;
}

.tech-workday-so-number,
.tech-workday-stop-row .routing-status-chip,
.tech-workday-repair-time,
.tech-workday-preference-pill {
  display: none;
}

.tech-workday-stop-row strong,
.tech-workday-so-number {
  overflow: hidden;
  color: #dff8ff;
  font-size: 0.76rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tech-workday-location {
  color: var(--ops-muted);
  font-size: 0.74rem;
  font-weight: 750;
}

.tech-workday-location-missing {
  padding: 2px 6px;
  border: 1px solid rgba(248, 113, 113, 0.28);
  border-radius: 6px;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.2);
}

.tech-workday-day-selected.tech-workday-day-cell {
  min-height: 172px;
  max-height: 172px;
}

.tech-workday-day-selected .tech-workday-stop-row {
  grid-template-columns: 22px 76px 58px 34px 76px minmax(130px, max-content);
  min-height: 30px;
  gap: 5px;
  padding: 5px;
}

.tech-workday-day-selected .tech-workday-so-number,
.tech-workday-day-selected .tech-workday-repair-time,
.tech-workday-day-selected .tech-workday-preference-pill {
  display: inline-flex;
}

.tech-workday-day-selected .tech-workday-stop-row .routing-status-chip {
  display: none;
}

.tech-workday-repair-time {
  color: var(--ops-muted);
  font-size: 0.7rem;
  font-weight: 850;
  white-space: nowrap;
}

.tech-workday-preference-pill {
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 2px 6px;
  border: 1px solid rgba(167, 139, 250, 0.34);
  border-radius: 6px;
  color: #ddd6fe;
  background: rgba(76, 29, 149, 0.24);
  font-size: 0.68rem;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.tech-workday-preference-pill.is-empty {
  color: rgba(148, 163, 184, 0.72);
  border-color: rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.18);
}

.tech-workday-day-selected .tech-workday-location {
  font-size: 0.76rem;
}

.tech-workday-window-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 20px;
  padding: 2px 6px;
  border: 1px solid rgba(226, 232, 240, 0.2);
  border-radius: 6px;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.62);
  font-size: 0.68rem;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.tech-workday-window-am,
.tech-workday-window-pm,
.tech-workday-window-time,
.tech-workday-window-preferred,
.tech-workday-window-empty {
  color: #f8fafc;
  border-color: rgba(226, 232, 240, 0.2);
  background: rgba(15, 23, 42, 0.62);
}

.tech-workday-empty-cell,
.tech-workday-empty-panel,
.tech-workday-empty-workspace {
  color: var(--ops-muted);
  font-size: 0.84rem;
}

.tech-workday-empty-cell {
  display: grid;
  min-height: 86px;
  place-items: center;
  text-align: center;
}

.tech-workday-empty-workspace {
  display: grid;
  gap: 10px;
  padding: 22px 18px;
  border: 1px dashed rgba(118, 238, 255, 0.28);
  border-radius: 10px;
  background: rgba(4, 14, 20, 0.34);
}

.tech-workday-empty-workspace h2 {
  margin: 0;
  color: var(--ops-text);
  font-size: 1.05rem;
  font-weight: 900;
}

.tech-workday-empty-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(88px, 1fr));
  gap: 7px;
  margin-top: 6px;
}

.tech-workday-empty-day {
  display: grid;
  gap: 2px;
  min-height: 84px;
  padding: 10px;
  border: 1px solid rgba(118, 238, 255, 0.16);
  border-radius: 7px;
  color: var(--ops-muted);
  text-decoration: none;
  background: rgba(7, 20, 28, 0.46);
}

.tech-workday-empty-day strong { color: var(--ops-text); }
.tech-workday-empty-day span { font-size: 0.78rem; }
.tech-workday-empty-day small { margin-top: auto; font-weight: 800; }
.tech-workday-empty-day:hover,
.tech-workday-empty-day:focus { color: var(--ops-text); border-color: rgba(40, 231, 255, 0.52); }
.tech-workday-empty-day.is-selected {
  border-color: rgba(40, 231, 255, 0.78);
  box-shadow: inset 0 0 0 1px rgba(40, 231, 255, 0.22);
  background: rgba(8, 40, 54, 0.72);
}

@media (max-width: 900px) {
  .tech-workday-header { align-items: flex-start; flex-direction: column; }
  .tech-workday-toolbar { width: 100%; justify-content: space-between; }
  .tech-workday-layout { grid-template-columns: 1fr; }
  .tech-workday-sidebar { position: static; max-height: none; }
  .tech-workday-calendar-scroll { max-height: none; }
  .tech-workday-map-header { flex-direction: column; }
  .tech-workday-map-controls { justify-content: flex-start; }
}

@media (max-width: 620px) {
  .tech-workday-toolbar,
  .tech-workday-export-actions,
  .tech-workday-week-controls { width: 100%; justify-content: flex-start; }
  .tech-workday-week-controls .routing-week-label { width: 100%; order: -1; }
  .tech-workday-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tech-workday-summary-grid div { min-height: 68px; padding: 8px; }
  .tech-workday-empty-week { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Slice 1 Technician Mobile: a focused field surface, not a compressed Workday. */
.technician-mobile-app-header { display: flex; align-items: center; justify-content: space-between; min-height: 58px; padding: 10px max(16px, env(safe-area-inset-left)) 10px max(16px, env(safe-area-inset-right)); border-bottom: 1px solid var(--panel-border); background: var(--panel-background); box-shadow: var(--panel-shadow); }
.technician-mobile-company-group { display: flex; align-items: flex-end; flex-direction: column; gap: 2px; }

.company-evaluation-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex: 0 0 auto;
  padding: 0.2rem 0.48rem;
  border: 1px solid color-mix(in srgb, var(--status-warning, #d79a13) 42%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--status-warning, #d79a13) 10%, transparent);
  color: var(--status-warning-strong, #956200);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.company-evaluation-badge.is-expired {
  border-color: color-mix(in srgb, var(--status-danger, #dc3545) 45%, transparent);
  background: color-mix(in srgb, var(--status-danger, #dc3545) 10%, transparent);
  color: var(--status-danger, #dc3545);
}

.evaluation-acknowledgement-page main { display: grid; min-height: calc(100vh - 150px); place-items: center; }
.evaluation-acknowledgement-shell { width: min(100%, 720px); }
.evaluation-acknowledgement-card {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid var(--panel-border);
  border-radius: 1rem;
  background: var(--panel-background);
  box-shadow: var(--panel-shadow);
}
.evaluation-acknowledgement-card h1 { margin-bottom: 1.35rem; }
.evaluation-acknowledgement-card p { max-width: 64ch; }
.evaluation-acknowledgement-card form { margin-top: 1.5rem; }
.evaluation-acknowledgement-kicker {
  margin-bottom: 0.35rem;
  color: var(--bs-primary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.technician-mobile-brand { display: inline-flex; align-items: center; }
.technician-mobile-brand img { display: block; width: 138px; height: auto; }
.technician-mobile-header-context { display: flex; align-items: center; gap: 10px; min-width: 0; }
.technician-mobile-company { max-width: 160px; overflow: hidden; color: var(--text-secondary); font-size: .78rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.technician-mobile-notes { display: inline-flex; align-items: center; gap: .25rem; white-space: nowrap; }
.technician-mobile-notes .badge { font-size: .65rem; }
.technician-mobile-account-toggle { display: inline-grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--panel-border); border-radius: 50%; color: var(--text-primary); background: var(--panel-background-soft); font-weight: 900; letter-spacing: .06em; }
.technician-mobile-account-toggle:hover, .technician-mobile-account-toggle:focus { border-color: var(--action-primary); color: var(--action-primary); outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
.technician-mobile-account-menu { min-width: 210px; }
.technician-mobile-shell { overflow-x: clip; --technician-mobile-readiness-blocker: color-mix(in srgb, var(--ops-red) 72%, var(--text-primary)); }
/* The saved-work shell is standalone and intentionally does not load Bootstrap. Restore the sizing foundation it needs locally so 100%-wide content includes its padding on iPhone. */
.technician-mobile-offline-shell { width: 100%; max-width: 100%; margin: 0; }
.technician-mobile-offline-shell, .technician-mobile-offline-shell *, .technician-mobile-offline-shell *::before, .technician-mobile-offline-shell *::after { box-sizing: border-box; }
.technician-mobile-offline-shell .technician-mobile-main { align-self: stretch; }
.technician-mobile-main { width: 100%; min-width: 0; max-width: 720px; margin: 0 auto; }
.technician-mobile-workspace { display: grid; gap: 18px; min-width: 0; max-width: 100%; }
.technician-mobile-workspace > *, .technician-mobile-detail-section, .technician-mobile-visit-card, .technician-mobile-header, .technician-mobile-visit-copy, .technician-mobile-review-item, .technician-mobile-review-item-details { min-width: 0; max-width: 100%; }
.technician-mobile-header h1, .technician-mobile-detail-section p, .technician-mobile-offline-warning, .technician-mobile-offline-note, .technician-mobile-stop-address, .technician-mobile-review-item p { overflow-wrap: anywhere; }
.technician-mobile-header h1 { margin: 0; color: var(--text-heading); font-size: clamp(1.8rem, 7vw, 2.4rem); font-weight: 900; letter-spacing: -.03em; }
.technician-mobile-header p { margin: 5px 0 0; color: var(--text-secondary); }
.technician-mobile-offline-status { font-size: .82rem; font-weight: 800; }
.technician-mobile-offline-status[data-state="ready"] { color: var(--semantic-success-text); }
.technician-mobile-offline-status[data-state="preparing"] { color: var(--ops-cyan); }
.technician-mobile-offline-status[data-state="failed"] { color: var(--ops-red); }
.technician-mobile-offline-status[data-state="offline"] { color: var(--semantic-warning-text); }
.technician-mobile-offline-kicker { margin: 0; color: var(--semantic-warning-text); font-size: .78rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.technician-mobile-offline-note { color: var(--text-secondary); font-size: .9rem; }
.technician-mobile-offline-saved-copy { margin: 0; color: var(--text-heading); font-size: .9rem; font-weight: 800; }
.technician-mobile-offline-warning { margin: 0; border-left: 3px solid var(--ops-amber); padding: 10px 12px; color: var(--text-secondary); background: var(--panel-background-soft); }
.technician-mobile-offline-unavailable { align-self: center; cursor: pointer; }
.technician-mobile-offline-back { border: 0; background: transparent; padding: 0; text-align: left; }
.technician-mobile-offline-preserve-lines { white-space: pre-line; }
.technician-mobile-offline-note, .technician-mobile-offline-warning, .technician-mobile-offline-saved-copy, .technician-mobile-item h3, .technician-mobile-item p { overflow-wrap: anywhere; }
.technician-mobile-connectivity { position: sticky; top: 0; z-index: 1040; display: flex; align-items: center; gap: 8px; padding: 10px max(12px, env(safe-area-inset-left)); border-bottom: 1px solid var(--semantic-warning-border); color: var(--text-primary); background: var(--semantic-warning-surface-strong); font-size: .84rem; font-weight: 700; }
.technician-mobile-connectivity > span { flex: 1 1 180px; }
.technician-mobile-kicker, .technician-mobile-item-number { margin: 0 0 5px; color: var(--action-primary); font-size: .76rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.technician-mobile-date-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.technician-mobile-date-nav .btn, .technician-mobile-contact-actions .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; }
.technician-mobile-supplies-link { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; }
.technician-mobile-supplies { padding-bottom: 88px; }
.technician-mobile-catalog-filters { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr) auto; gap: 8px; align-items: end; }
.technician-mobile-catalog-filters label { display: block; margin-bottom: 5px; color: var(--text-primary); font-weight: 800; }
.technician-mobile-catalog-filters .btn { min-height: 38px; }
.technician-mobile-supply-groups { display: grid; gap: 20px; }
.technician-mobile-supply-group { display: grid; gap: 10px; }
.technician-mobile-supply-group > h2 { margin: 0; padding-bottom: 8px; border-bottom: 1px solid var(--panel-border); color: var(--text-heading); font-size: 1.05rem; font-weight: 850; }
.technician-mobile-supply-list { display: grid; gap: 12px; }
.technician-mobile-supply-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--panel-border); border-radius: var(--panel-radius); background: var(--panel-background); box-shadow: var(--panel-shadow); }
.technician-mobile-supply-card h3 { margin: 0; color: var(--text-heading); font-size: 1.05rem; }
.technician-mobile-supply-card p { margin: 5px 0; color: var(--text-secondary); }
.technician-mobile-supply-card img { width: 72px; height: 72px; float: left; margin: 0 12px 6px 0; border-radius: 8px; object-fit: cover; }
.technician-mobile-quantity { display: grid; grid-template-columns: 42px 38px 42px; align-items: center; }
.technician-mobile-quantity button { min-height: 42px; border: 1px solid var(--panel-border); color: var(--text-primary); background: var(--panel-background-soft); font-size: 1.25rem; font-weight: 800; }
.technician-mobile-quantity output { text-align: center; font-weight: 800; }
.technician-mobile-bottom-action { position: fixed; right: 0; bottom: 0; left: 0; z-index: 1030; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px max(16px, env(safe-area-inset-left)) calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--panel-border); color: var(--text-primary); background: var(--panel-background); box-shadow: 0 -8px 24px color-mix(in srgb, var(--panel-background) 68%, transparent); }
.technician-mobile-bottom-action form { margin: 0; }

.supplies-catalog-layout .platform-main { min-width: 0; }
.supplies-catalog-browser { display: grid; gap: 1rem; }
.supplies-catalog-browser-heading, .supplies-catalog-category > header, .supplies-catalog-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.supplies-catalog-browser-heading h2, .supplies-catalog-category h3, .supplies-catalog-item h4 { margin: 0; color: var(--text-heading); }
.supplies-catalog-browser-heading > span { flex: 0 0 auto; color: var(--text-secondary); font-size: .82rem; font-weight: 800; }
.supplies-catalog-category { display: grid; gap: .7rem; padding-top: 1rem; border-top: 1px solid var(--panel-border); }
.supplies-catalog-category:first-of-type { padding-top: 0; border-top: 0; }
.supplies-catalog-category > header > div { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.supplies-catalog-items { display: grid; gap: .65rem; }
.supplies-catalog-item { padding: .8rem; border: 1px solid var(--panel-border); border-radius: 8px; background: var(--panel-background-soft); }
.supplies-catalog-item-photo { display: grid; flex: 0 0 76px; width: 76px; height: 76px; place-items: center; overflow: hidden; border: 1px solid var(--panel-border); border-radius: 8px; color: var(--text-secondary); background: var(--panel-background); font-size: .72rem; font-weight: 750; text-align: center; }
.supplies-catalog-item-photo img { width: 100%; height: 100%; object-fit: cover; }
.supplies-catalog-item-copy { flex: 1 1 auto; min-width: 0; }
.supplies-catalog-item-copy p { margin: .25rem 0; color: var(--text-secondary); overflow-wrap: anywhere; }
.supplies-catalog-empty-description { font-style: italic; }
.supplies-catalog-item-actions { display: grid; flex: 0 0 auto; gap: .55rem; justify-items: end; }
.supplies-catalog-state { display: inline-flex; width: fit-content; padding: .2rem .5rem; border: 1px solid var(--panel-border); border-radius: 999px; font-size: .72rem; font-weight: 850; }
.supplies-catalog-state.is-active { border-color: var(--semantic-success-border); color: var(--semantic-success-text); background: var(--semantic-success-surface); }
.supplies-catalog-state.is-inactive { color: var(--text-secondary); background: var(--panel-background); }
.supplies-catalog-empty { margin: 0; color: var(--text-secondary); }
.supplies-catalog-controls .platform-side-panel form { display: grid; gap: .65rem; }
.supplies-catalog-controls .platform-side-panel form > p { margin: 0; }
.supplies-catalog-form-field { display: grid; gap: .3rem; }
.supplies-catalog-form-field label { color: var(--text-primary); font-weight: 800; }
.supplies-catalog-description-field textarea { min-height: 110px; }
@media (max-width: 640px) {
  .technician-mobile-catalog-filters { grid-template-columns: 1fr; }
  .technician-mobile-catalog-filters .btn { width: 100%; min-height: 44px; }
  .supplies-catalog-browser-heading, .supplies-catalog-category > header { align-items: flex-start; flex-direction: column; }
  .supplies-catalog-item { flex-wrap: wrap; }
  .supplies-catalog-item-copy { flex-basis: calc(100% - 92px); }
  .supplies-catalog-item-actions { width: 100%; grid-template-columns: 1fr auto; align-items: center; justify-items: start; }
  .supplies-catalog-item-actions .btn { justify-self: end; }
}
.technician-mobile-visit-list { display: grid; gap: 12px; }
.technician-mobile-visit-card, .technician-mobile-detail-section, .technician-mobile-empty { border: 1px solid var(--panel-border); border-radius: var(--panel-radius); background: var(--panel-background); box-shadow: var(--panel-shadow); }
.technician-mobile-visit-card { display: grid; grid-template-columns: minmax(120px, .42fr) minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 16px; }
.technician-mobile-visit-card.is-complete { background: var(--panel-background-soft); box-shadow: none; opacity: .82; }
.technician-mobile-stop-meta { display: grid; gap: 4px; color: var(--text-secondary); font-size: .78rem; }
.technician-mobile-stop-meta strong { color: var(--text-primary); font-size: .92rem; }
.technician-mobile-route-stop, .technician-mobile-order-reference { color: var(--text-secondary); font-size: .72rem; font-weight: 650; }
.technician-mobile-visit-copy { min-width: 0; }
.technician-mobile-visit-copy h2, .technician-mobile-detail-section h2, .technician-mobile-item h3 { margin: 0; color: var(--text-heading); font-size: 1.05rem; font-weight: 850; }
.technician-mobile-order-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-width: 0; }
.technician-mobile-order-title-row > :first-child { min-width: 0; }
.technician-mobile-service-order-number { flex: 0 0 auto; color: var(--text-secondary); font-size: .78rem; font-weight: 800; letter-spacing: .02em; white-space: nowrap; }
.technician-mobile-visit-header .technician-mobile-service-order-number { font-size: .84rem; }
.technician-mobile-repair-time { color: var(--text-secondary); font-size: .84em; font-weight: 700; white-space: nowrap; }
.technician-mobile-visit-copy span, .technician-mobile-detail-section p, .technician-mobile-item p { margin: 5px 0 0; color: var(--text-secondary); font-size: .9rem; }
.technician-mobile-stop-address { max-width: 38ch; margin: 5px 0 0; color: var(--text-secondary); font-size: .84rem; line-height: 1.4; overflow-wrap: break-word; }
.technician-mobile-open-visit { min-height: 44px; white-space: nowrap; }
.technician-mobile-visit-complete { display: flex; justify-content: center; margin: 10px 0 0; }
.technician-mobile-completion-pill { display: inline-flex; align-items: center; justify-content: center; width: fit-content; margin: 0 auto; padding: 7px 14px; border: 1px solid var(--semantic-success-border); border-radius: 999px; color: var(--semantic-success-button-text); background: var(--ops-green); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ops-green) 62%, transparent), 0 0 22px color-mix(in srgb, var(--ops-green) 58%, transparent); font-size: .84rem; font-weight: 900; letter-spacing: .02em; line-height: 1.1; }
.technician-mobile-visit-qa, .technician-mobile-visit-all-complete { margin: 4px 0 0; color: var(--text-secondary); font-size: .82rem; }
.technician-mobile-visit-completion { display: grid; gap: 10px; padding: 18px; border: 1px solid var(--semantic-success); border-radius: var(--panel-radius); background: var(--panel-background-soft); }
.technician-mobile-visit-completion .technician-mobile-completion-pill { justify-self: center; margin: 0 auto; font-size: 1rem; }
.technician-mobile-visit-completion p { margin: 0; color: var(--text-secondary); }
.technician-mobile-empty, .technician-mobile-detail-section { padding: 18px; }
.technician-mobile-empty h2 { margin: 0; color: var(--text-heading); font-size: 1.1rem; }
.technician-mobile-empty p { margin: 6px 0 0; color: var(--text-secondary); }
.technician-mobile-back, .technician-mobile-address { color: var(--action-primary); font-weight: 800; text-decoration: none; }
.technician-mobile-back { width: fit-content; }
.technician-mobile-back:hover, .technician-mobile-back:focus, .technician-mobile-address:hover, .technician-mobile-address:focus { color: var(--action-hover); text-decoration: underline; }
.technician-mobile-address { display: block; margin-top: 7px; line-height: 1.45; }
.technician-mobile-contact-actions { display: grid; grid-template-columns: minmax(0, 1.55fr) repeat(2, minmax(0, 1fr)); gap: 8px; }
.technician-mobile-navigation { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 44px; min-width: 0; }
.technician-mobile-navigation > .btn { min-width: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; white-space: nowrap; }
.technician-mobile-navigation-chooser { position: relative; min-width: 0; }
.technician-mobile-navigation-chooser > summary { display: grid; height: 100%; min-height: 48px; place-items: center; border: 1px solid #67e8f9; border-left: 1px solid rgba(3, 16, 20, .28); border-radius: 0 6px 6px 0; color: #031014; background: linear-gradient(180deg, rgba(255, 255, 255, .48), transparent 48%), linear-gradient(180deg, #75f0ff, #1fd3ee); cursor: pointer; font-size: .72rem; list-style: none; }
.technician-mobile-navigation-chooser > summary::-webkit-details-marker { display: none; }
.technician-mobile-navigation-chooser > summary:hover, .technician-mobile-navigation-chooser > summary:focus { background: var(--action-hover); outline: none; }
.technician-mobile-navigation-menu { position: absolute; z-index: 1050; top: calc(100% + 5px); right: 0; display: none; min-width: 160px; overflow: hidden; border: 1px solid var(--panel-border); border-radius: 6px; background: var(--panel-background); box-shadow: var(--panel-shadow); }
.technician-mobile-navigation-chooser[open] .technician-mobile-navigation-menu { display: grid; }
.technician-mobile-navigation-menu a { padding: 10px 12px; color: var(--text-primary); font-size: .84rem; font-weight: 750; text-decoration: none; }
.technician-mobile-navigation-menu a:hover, .technician-mobile-navigation-menu a:focus, .technician-mobile-navigation-menu a[aria-current="true"] { color: var(--action-primary); background: var(--panel-background-soft); outline: none; }
.technician-mobile-contact-actions.is-complete-context .btn { border-color: var(--panel-border); color: var(--text-secondary); background: var(--panel-background-soft); box-shadow: none; filter: saturate(.35); }
.technician-mobile-contact-actions.is-complete-context .btn:hover, .technician-mobile-contact-actions.is-complete-context .btn:focus { border-color: var(--semantic-success-border); color: var(--semantic-success-text); background: var(--semantic-success-surface); filter: none; }
.technician-mobile-secondary-instructions { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--panel-border); }
.technician-mobile-secondary-instructions strong { color: var(--text-primary); font-size: .85rem; }
.technician-mobile-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.technician-mobile-section-heading > span { display: inline-grid; min-width: 30px; min-height: 30px; place-items: center; border-radius: 50%; color: var(--semantic-success-button-text); background: var(--status-scheduled); font-weight: 900; }
.technician-mobile-item-list { display: grid; }
.technician-mobile-item { display: grid; gap: 8px; padding: 14px 0; border-top: 1px solid var(--panel-border); }
.technician-mobile-item .technician-mobile-meta { font-size: .82rem; }
.technician-mobile-open-item, .technician-mobile-change-item { width: fit-content; min-height: 42px; }
.technician-mobile-item-navigation { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.technician-mobile-item-navigation .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; }
.technician-mobile-details-list { display: grid; gap: 10px; margin: 12px 0 0; }
.technician-mobile-details-list div { display: grid; gap: 2px; }
.technician-mobile-details-list dt { color: var(--text-secondary); font-size: .76rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.technician-mobile-details-list dd { margin: 0; color: var(--text-primary); font-weight: 700; }
.technician-mobile-read-only { margin: 0; color: var(--text-secondary); font-size: .85rem; text-align: center; }
.technician-mobile-report-form { display: grid; gap: 18px; }
.technician-mobile-form-help, .technician-mobile-unsaved-note { margin: 7px 0 0; color: var(--text-secondary); font-size: .86rem; }
.technician-mobile-form-fields, .technician-mobile-evidence-list, .technician-mobile-review-list { display: grid; gap: 14px; margin-top: 16px; }
.technician-mobile-field { display: grid; gap: 6px; }
.technician-mobile-field > label, .technician-mobile-evidence-group legend { color: var(--text-primary); font-size: .9rem; font-weight: 800; }
.technician-mobile-field.is-invalid select, .technician-mobile-field.is-invalid textarea { border-color: var(--semantic-danger); }
/* Safari zooms focused controls below 16px. Keep every Technician Mobile control at that effective size. */
.technician-mobile-shell input:not([type="file"]), .technician-mobile-shell select, .technician-mobile-shell textarea,
.technician-mobile-offline-shell input:not([type="file"]), .technician-mobile-offline-shell select, .technician-mobile-offline-shell textarea { font-size: 16px; }
.technician-mobile-form-errors { padding: 12px 14px; border: 1px solid var(--semantic-danger); border-radius: var(--panel-radius); color: var(--semantic-danger); background: var(--panel-background); }
.technician-mobile-evidence-group { display: grid; gap: 10px; margin: 0; padding: 14px 0 0; border: 0; border-top: 1px solid var(--panel-border); }
.technician-mobile-evidence-group:first-child { padding-top: 0; border-top: 0; }
.technician-mobile-photo-actions, .technician-mobile-report-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.technician-mobile-photo-actions .btn, .technician-mobile-report-actions .btn, .technician-mobile-review-report { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; }
.technician-mobile-photo-actions input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; clip-path: inset(50%); }
.technician-mobile-photo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.technician-mobile-photo-card { display: grid; gap: 7px; min-width: 0; padding: 8px; border: 1px solid var(--panel-border); border-radius: var(--panel-radius); background: var(--panel-background-soft); color: var(--text-secondary); font-size: .78rem; }
.technician-mobile-photo-card img { width: 100%; aspect-ratio: 1 / .78; border-radius: calc(var(--panel-radius) - 3px); object-fit: cover; }
.technician-mobile-photo-card .btn { justify-self: start; }
.technician-mobile-review-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; padding: 12px 0; border-top: 1px solid var(--panel-border); }
.technician-mobile-review-item:first-child { padding-top: 0; border-top: 0; }
.technician-mobile-review-item-details { min-width: 0; }
.technician-mobile-review-item p, .technician-mobile-item-complete { margin: 4px 0 0; color: var(--text-secondary); font-size: .84rem; font-weight: 750; overflow-wrap: anywhere; }
.technician-mobile-review-item .is-blocking { color: var(--technician-mobile-readiness-blocker); }
.technician-mobile-save-status, .technician-mobile-photo-status { margin: 0; color: var(--text-secondary); font-size: .8rem; }
.technician-mobile-required-detail { color: var(--semantic-danger); font-size: .78rem; font-weight: 750; }
.technician-mobile-save-status.is-failed, .technician-mobile-photo-status { font-weight: 700; }
.technician-mobile-save-status.is-failed { color: var(--semantic-danger); }
.technician-mobile-field:not(.is-required) [data-parts-needed-marker] { display: none; }
.technician-mobile-review-photos { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 8px; color: var(--text-secondary); font-size: .76rem; }
.technician-mobile-review-photos img { width: 42px; height: 34px; border-radius: 4px; object-fit: cover; }
html.has-mobile-autosave .technician-mobile-manual-save { display: none; }

@media (max-width: 575.98px) {
  .technician-mobile-main { padding-right: 12px; padding-left: 12px; }
  .technician-mobile-company { max-width: 118px; }
  .technician-mobile-date-nav { gap: 6px; }
  .technician-mobile-date-nav .btn { padding-right: 8px; padding-left: 8px; font-size: .81rem; }
  .technician-mobile-visit-card { grid-template-columns: 1fr; gap: 10px; }
  .technician-mobile-stop-meta { grid-template-columns: 1fr auto; align-items: center; }
  .technician-mobile-open-visit { width: 100%; }
  .technician-mobile-offline-unavailable { width: 100%; }
  .technician-mobile-contact-actions { grid-template-columns: 1fr; }
  .technician-mobile-connectivity { align-items: stretch; flex-wrap: wrap; }
  .technician-mobile-connectivity > .btn { flex: 1 1 100%; min-height: 40px; }
  .technician-mobile-photo-actions, .technician-mobile-report-actions { grid-template-columns: 1fr; }
  .technician-mobile-review-item { display: grid; align-items: stretch; gap: 10px; padding: 12px; border: 1px solid var(--panel-border); border-radius: var(--panel-radius); background: var(--panel-background-soft); }
  .technician-mobile-review-item + .technician-mobile-review-item { margin-top: 10px; }
  .technician-mobile-review-item:first-child { padding-top: 12px; border-top: 1px solid var(--panel-border); }
  .technician-mobile-review-item .btn { width: 100%; }
  .technician-mobile-supply-card { grid-template-columns: 1fr; }
  .technician-mobile-quantity { justify-self: start; }
}

.routing-selected-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.42fr) minmax(520px, 1fr);
  gap: 14px;
  align-items: stretch;
}

.routing-selected-list-panel {
  min-height: 360px;
  padding: 10px;
  border: 1px solid rgba(40, 231, 255, 0.18);
  border-radius: 8px;
  background: rgba(7, 16, 22, 0.5);
}

.routing-selected-list-panel.routing-validation-active {
  border-color: rgba(255, 66, 92, 0.95);
  background:
    linear-gradient(90deg, rgba(255, 66, 92, 0.12), rgba(255, 66, 92, 0.03) 44%, rgba(7, 16, 22, 0.58)),
    rgba(7, 16, 22, 0.5);
  box-shadow: inset 4px 0 0 rgba(255, 66, 92, 0.95), 0 0 0 1px rgba(255, 66, 92, 0.18), 0 0 22px rgba(255, 66, 92, 0.14);
}

.routing-selected-stops {
  display: grid;
  gap: 5px;
  padding-right: 4px;
}

.routing-selected-stop {
  display: grid;
  grid-template-columns: auto auto minmax(70px, auto) auto minmax(88px, 98px) minmax(0, 1fr) auto auto;
  gap: 6px;
  align-items: center;
  min-height: 31px;
  padding: 4px 7px;
  border: 1px solid rgba(40, 231, 255, 0.14);
  border-radius: 6px;
  background: rgba(5, 13, 18, 0.72);
  font-size: 0.78rem;
  line-height: 1;
  cursor: grab;
}

.routing-selected-stop .routing-stop-number {
  min-width: 22px;
  color: #8b9aaa;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.7);
}

.routing-selected-stop .routing-stop-repair {
  color: #e7f5f8;
  font-size: 0.76rem;
  font-weight: 900;
}

.routing-selected-stop:active {
  cursor: grabbing;
}

.routing-selected-stop a {
  color: var(--ops-cyan);
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.routing-stop-indicators {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-self: start;
  min-width: 0;
  max-width: 100%;
}

.routing-selected-stop .routing-pref-text,
.routing-selected-stop .routing-stop-indicators .text-secondary {
  flex: 0 0 auto;
  width: fit-content;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.routing-selected-stop-pref {
  box-shadow: inset 3px 0 0 rgba(251, 191, 36, 0.82);
}

.routing-selected-stop-structured-pref:not(.routing-selected-stop-pref) {
  box-shadow: inset 3px 0 0 rgba(168, 85, 247, 0.86);
}

.routing-selected-stop-unmapped {
  border-color: rgba(255, 92, 115, 0.86);
  background: linear-gradient(180deg, rgba(68, 19, 31, 0.82), rgba(38, 10, 18, 0.78));
  box-shadow: inset 3px 0 0 rgba(255, 92, 115, 0.95), 0 0 0 1px rgba(255, 92, 115, 0.2);
}

.routing-selected-stop.routing-window-missing {
  border-color: rgba(255, 66, 92, 0.95);
  background: linear-gradient(180deg, rgba(87, 20, 34, 0.92), rgba(43, 10, 18, 0.88));
  box-shadow: inset 4px 0 0 rgba(255, 66, 92, 0.98), 0 0 0 1px rgba(255, 66, 92, 0.28), 0 0 16px rgba(255, 66, 92, 0.2);
}

.routing-selected-stop.routing-window-missing .routing-selected-window-select {
  border-color: rgba(255, 66, 92, 0.95);
  box-shadow: 0 0 0 2px rgba(255, 66, 92, 0.18);
}

.routing-validation-alert {
  margin-top: 10px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 66, 92, 0.9);
  border-radius: 7px;
  color: #ffd6dc;
  background:
    linear-gradient(90deg, rgba(255, 66, 92, 0.2), rgba(255, 66, 92, 0.08)),
    rgba(52, 12, 21, 0.92);
  box-shadow: inset 4px 0 0 rgba(255, 66, 92, 0.95), 0 0 18px rgba(255, 66, 92, 0.16);
  font-size: 0.84rem;
  font-weight: 850;
  line-height: 1.3;
}

.routing-no-map-location {
  padding: 3px 6px;
  border: 1px solid rgba(255, 92, 115, 0.7);
  border-radius: 999px;
  color: #ffd0d8;
  background: rgba(90, 18, 32, 0.72);
  font-size: 0.68rem;
  font-weight: 900;
  white-space: nowrap;
}

.routing-manual-map-location {
  padding: 3px 6px;
  border: 1px solid rgba(213, 150, 28, 0.72);
  border-radius: 999px;
  color: #76510b;
  background: rgba(255, 239, 196, 0.84);
  font-size: 0.68rem;
  font-weight: 900;
  white-space: nowrap;
}

[data-p2p-theme="midnight"] .routing-manual-map-location {
  color: #d3a13f;
  background: rgba(101, 68, 16, 0.56);
}

.routing-selected-map-controls {
  justify-content: flex-end;
  margin-bottom: 8px;
}

.routing-selected-map-controls label {
  box-shadow: 0 3px 10px rgba(3, 12, 17, 0.28);
}

.routing-selected-map-stage {
  min-width: 0;
  position: relative;
}

.routing-map-empty-warning {
  position: absolute;
  z-index: 500;
  top: 10px;
  left: 50%;
  max-width: calc(100% - 32px);
  padding: 6px 10px;
  border: 1px solid rgba(255, 92, 115, 0.7);
  border-radius: 7px;
  color: #ffd0d8;
  background: rgba(60, 14, 24, 0.88);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
  transform: translateX(-50%);
}

.routing-route-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px !important;
  height: 28px !important;
  box-sizing: border-box;
  margin-left: 0 !important;
  margin-top: 0 !important;
  border: 2px solid #ffffff;
  border-radius: 999px;
  color: #ffffff;
  background: #e5394f;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.36), 0 0 0 1px rgba(105, 8, 22, 0.45);
  font-size: 0.78rem;
  font-weight: 950;
  text-align: center;
}

.routing-route-pin span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  line-height: 1;
  transform: translateY(1px);
}

.routing-selected-window-select {
  width: 100%;
  min-height: 24px;
  padding-top: 1px;
  padding-bottom: 1px;
  font-size: 0.72rem;
}

.routing-selected-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(40, 231, 255, 0.14);
}

.routing-selected-status-area {
  display: flex;
  flex: 1 1 290px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.routing-selected-status-area .routing-status-chip {
  padding: 5px 9px;
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.01em;
}

.routing-selected-status-detail {
  color: var(--ops-text);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.25;
}

.rough-routing-preview {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(40, 231, 255, 0.24);
  border-radius: 7px;
  background: rgba(6, 18, 25, 0.68);
  font-size: 0.78rem;
}

.routing-day-preview-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.routing-date-picker-toggle,
.routing-date-picker-menu {
  min-width: 10rem;
}

.routing-date-picker-toggle,
.routing-date-picker-menu .dropdown-item {
  white-space: nowrap;
}

@media (max-width: 575.98px) {
  .routing-day-preview-controls {
    width: 100%;
  }

  .routing-date-picker {
    flex: 1 1 10rem;
  }
}

.routing-day-heading.routing-date-selected,
.routing-cell.routing-date-selected {
  box-shadow: inset 0 3px 0 rgba(251, 191, 36, 0.95), inset 0 0 0 1px rgba(251, 191, 36, 0.38);
}

.routing-day-result-summary {
  flex: 0 1 auto;
  padding: 5px 9px;
  border: 1px solid rgba(40, 231, 255, 0.26);
  border-radius: 999px;
  color: var(--ops-text);
  background: rgba(6, 18, 25, 0.56);
  font-size: 0.74rem;
  font-weight: 850;
  line-height: 1.2;
  white-space: nowrap;
}

[data-p2p-theme="light"] .routing-day-result-summary {
  color: #244957;
  border-color: rgba(8, 151, 184, 0.5);
  background: #e6f7fb;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.routing-selected-planning-notice {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 5px 9px;
  border: 1px solid var(--semantic-warning-border);
  border-radius: 999px;
  color: var(--semantic-warning-text);
  background: var(--semantic-warning-surface);
  font-size: 0.74rem;
  font-weight: 850;
  line-height: 1.2;
  white-space: nowrap;
}

.routing-selected-panel {
  position: relative;
}

.routing-selected-map-panel {
  min-width: 0;
  min-height: 520px;
  position: relative;
}

.routing-selected-map-panel .dispatch-zone-map {
  width: 100%;
  min-height: 520px;
  height: 520px;
  max-height: 520px;
}

.routing-stop-tooltip {
  border: 1px solid rgba(40, 231, 255, 0.42);
  border-radius: 8px;
  color: var(--ops-text);
  background: rgba(5, 13, 18, 0.92);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.28);
  font-weight: 800;
}

.routing-stop-tooltip a {
  color: var(--ops-text);
  text-decoration: none;
}

@media (max-width: 1200px) {
  .routing-selected-grid {
    grid-template-columns: 1fr;
  }

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

  .dispatch-schedule-order,
  .dispatch-schedule-notes,
  .dispatch-schedule-actions,
  .dispatch-schedule-suggestions {
    grid-column: span 2;
  }

  .scheduling-workspace {
    grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
  }
}

@media (max-width: 1180px) {
  .scheduling-workspace {
    column-gap: 16px;
    padding-right: 0;
  }

  .dispatch-schedule-row {
    grid-template-columns: 1fr;
  }

  .dispatch-schedule-order,
  .dispatch-schedule-fields,
  .dispatch-schedule-notes,
  .dispatch-schedule-actions,
  .dispatch-schedule-suggestions {
    grid-column: span 1;
  }

  .dispatch-schedule-suggestions {
    grid-row: auto;
  }
}

@media (max-width: 760px) {
  .dispatch-schedule-fields {
    grid-template-columns: 1fr;
  }

  .dispatch-schedule-fields::before {
    display: none;
  }

  .dispatch-schedule-notes,
  .dispatch-schedule-actions {
    grid-column: span 1;
  }

  .dispatch-suggestion-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .dispatch-suggestion-main {
    grid-template-columns: 1fr;
  }

  .dispatch-suggestion-actions {
    justify-content: flex-start;
  }

  .scheduling-workspace,
  .scheduling-detail-context,
  .scheduling-notes-grid,
  .scheduling-manual-proposal-grid {
    grid-template-columns: 1fr;
  }

  .scheduling-queue-panel {
    position: static;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .scheduling-queue-list {
    flex: 0 1 auto;
    max-height: min(20rem, 50dvh);
  }

  .scheduling-detail-header {
    flex-direction: column;
  }
}

.dashboard-card-title-link {
  color: var(--ops-cyan);
  text-decoration: none;
  text-shadow: none;
}

.dashboard-card-title-link:hover,
.dashboard-card-title-link:focus {
  color: #a5f3fc;
  text-decoration: underline;
}

.dashboard-rank-header,
.dashboard-rank-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dashboard-rank-number {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 28px;
  border: 1px solid rgba(40, 231, 255, 0.3);
  border-radius: 999px;
  color: var(--ops-cyan);
  font-weight: 900;
}

.dashboard-rank-main {
  color: var(--ops-muted);
}

.dashboard-rank-main strong {
  font-size: 1.25rem;
}

@media (max-width: 640px) {
  .workflow-age-grid,
  .schedule-summary-grid,
  .dashboard-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workflow-tile::after {
    display: none !important;
  }

  .dispatch-dashboard-heading {
    grid-template-columns: 1fr;
  }
}

.nav-link,
.navbar .text-secondary {
  color: #f4fbff !important;
}

.navbar-nav {
  gap: 10px;
}

.navbar .nav-link {
  position: relative;
  margin-top: 2px;
  padding: 0.52rem 0.84rem;
  border: 1px solid rgba(118, 238, 255, 0.18);
  border-radius: 8px;
  color: #ffffff !important;
  background: linear-gradient(180deg, rgba(40, 231, 255, 0.04), rgba(5, 13, 18, 0.2));
  box-shadow: none;
  text-shadow: none;
  transition:
    color 0.15s ease,
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus,
.navbar .nav-link.active {
  color: #ffffff !important;
  border-color: rgba(118, 238, 255, 0.52);
  background:
    linear-gradient(180deg, rgba(40, 231, 255, 0.2), rgba(7, 32, 43, 0.6));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 18px rgba(40, 231, 255, 0.18);
}

.navbar .nav-link.active {
  color: #021014 !important;
  border-color: rgba(183, 251, 255, 1);
  background:
    linear-gradient(180deg, rgba(7, 42, 54, 0.96), rgba(5, 27, 38, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 24px rgba(40, 231, 255, 0.3);
  text-shadow: none;
}

.navbar .app-domain-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 8.25rem;
  font-weight: 800;
  letter-spacing: 0;
}

.navbar .app-domain-toggle.active {
  color: #23e6f2 !important;
}

.navbar .app-domain-toggle.dropdown-toggle::after {
  flex: 0 0 auto;
  margin-left: 0.25rem;
  transform-origin: center;
  transition: transform 0.14s ease;
}

.navbar .app-domain-toggle.dropdown-toggle.show::after {
  transform: rotate(180deg);
}

.app-domain-icon {
  width: 1.1rem;
  height: 1.1rem;
  display: inline-block;
  color: currentColor;
  background: currentColor;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
}

.app-domain-icon-dispatch {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h11v11H9M14 10h4l3 4v3h-2M3 17h2'/%3E%3Ccircle cx='7' cy='17' r='2'/%3E%3Ccircle cx='17' cy='17' r='2'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h11v11H9M14 10h4l3 4v3h-2M3 17h2'/%3E%3Ccircle cx='7' cy='17' r='2'/%3E%3Ccircle cx='17' cy='17' r='2'/%3E%3C/g%3E%3C/svg%3E");
}

.app-domain-icon-data {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cellipse cx='12' cy='5' rx='7' ry='3'/%3E%3Cpath d='M5 5v6c0 1.7 3.1 3 7 3s7-1.3 7-3V5M5 11v6c0 1.7 3.1 3 7 3s7-1.3 7-3v-6'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cellipse cx='12' cy='5' rx='7' ry='3'/%3E%3Cpath d='M5 5v6c0 1.7 3.1 3 7 3s7-1.3 7-3V5M5 11v6c0 1.7 3.1 3 7 3s7-1.3 7-3v-6'/%3E%3C/g%3E%3C/svg%3E");
}

.app-domain-icon-people {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/g%3E%3C/svg%3E");
}

.app-domain-icon-business {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 10 9-6 9 6M5 10v8M9 10v8M15 10v8M19 10v8M3 18h18M2 22h20'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 10 9-6 9 6M5 10v8M9 10v8M15 10v8M19 10v8M3 18h18M2 22h20'/%3E%3C/g%3E%3C/svg%3E");
}

.app-domain-icon-messages {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/g%3E%3C/svg%3E");
}

.app-domain-icon-search {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/g%3E%3C/svg%3E");
}

.app-domain-icon-system {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.7 1.7 0 0 0 .3 1.9l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.9-.3 1.7 1.7 0 0 0-1 1.6V21a2 2 0 1 1-4 0v-.2a1.7 1.7 0 0 0-1-1.6 1.7 1.7 0 0 0-1.9.3l-.1.1A2 2 0 1 1 4.2 17l.1-.1a1.7 1.7 0 0 0 .3-1.9 1.7 1.7 0 0 0-1.6-1H3a2 2 0 1 1 0-4h.2a1.7 1.7 0 0 0 1.6-1 1.7 1.7 0 0 0-.3-1.9L4.4 7A2 2 0 1 1 7.2 4.2l.1.1a1.7 1.7 0 0 0 1.9.3h.1A1.7 1.7 0 0 0 10 3V3a2 2 0 1 1 4 0v.2a1.7 1.7 0 0 0 1 1.6 1.7 1.7 0 0 0 1.9-.3l.1-.1A2 2 0 1 1 19.8 7l-.1.1a1.7 1.7 0 0 0-.3 1.9 1.7 1.7 0 0 0 1.6 1h.2a2 2 0 1 1 0 4H21a1.7 1.7 0 0 0-1.6 1Z'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.7 1.7 0 0 0 .3 1.9l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.9-.3 1.7 1.7 0 0 0-1 1.6V21a2 2 0 1 1-4 0v-.2a1.7 1.7 0 0 0-1-1.6 1.7 1.7 0 0 0-1.9.3l-.1.1A2 2 0 1 1 4.2 17l.1-.1a1.7 1.7 0 0 0 .3-1.9 1.7 1.7 0 0 0-1.6-1H3a2 2 0 1 1 0-4h.2a1.7 1.7 0 0 0 1.6-1 1.7 1.7 0 0 0-.3-1.9L4.4 7A2 2 0 1 1 7.2 4.2l.1.1a1.7 1.7 0 0 0 1.9.3h.1A1.7 1.7 0 0 0 10 3V3a2 2 0 1 1 4 0v.2a1.7 1.7 0 0 0 1 1.6 1.7 1.7 0 0 0 1.9-.3l.1-.1A2 2 0 1 1 19.8 7l-.1.1a1.7 1.7 0 0 0-.3 1.9 1.7 1.7 0 0 0 1.6 1h.2a2 2 0 1 1 0 4H21a1.7 1.7 0 0 0-1.6 1Z'/%3E%3C/g%3E%3C/svg%3E");
}

.navbar .app-domain-menu {
  display: block;
  min-width: 13.75rem;
  padding: 0.48rem;
  border: 1px solid rgba(118, 238, 255, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(7, 22, 31, 0.98), rgba(4, 12, 18, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 24px 56px rgba(0, 0, 0, 0.52);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
  transition:
    opacity 0.5s ease-out,
    transform 0.5s ease-out,
    visibility 0s linear 0.5s;
}

.navbar .app-domain-menu.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition:
    opacity 0.5s ease-out,
    transform 0.5s ease-out,
    visibility 0s linear 0s;
}

.app-domain-menu .dropdown-item {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.42rem 0.72rem;
  border-radius: 6px;
  color: rgba(244, 251, 255, 0.92);
  font-weight: 750;
  transition:
    background-color 0.16s ease,
    color 0.16s ease;
}

.app-domain-menu .dropdown-item:hover,
.app-domain-menu .dropdown-item:focus {
  color: #ffffff;
  background: rgba(40, 231, 255, 0.11);
}

.app-domain-menu .dropdown-item.active {
  color: #23e6f2;
  background: rgba(40, 231, 255, 0.16);
}

.app-domain-menu .dropdown-item.disabled {
  color: rgba(244, 251, 255, 0.46);
}

.app-domain-future {
  margin-left: auto;
  padding: 0.1rem 0.34rem;
  border: 1px solid rgba(118, 238, 255, 0.18);
  border-radius: 999px;
  color: rgba(118, 238, 255, 0.6);
  background: rgba(40, 231, 255, 0.05);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.navbar .nav-link.active::before,
.navbar .nav-link:hover::before,
.navbar .nav-link:focus::before {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 1px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(35, 230, 242, 0), rgba(35, 230, 242, 0.95) 18%, rgba(35, 230, 242, 0.95) 82%, rgba(35, 230, 242, 0));
  box-shadow: 0 0 10px rgba(35, 230, 242, 0.42);
  pointer-events: none;
}

.navbar .app-domain-toggle.active::before,
.navbar .app-domain-toggle:hover::before,
.navbar .app-domain-toggle:focus::before {
  left: 10px;
  right: 10px;
}

.navbar-toggler {
  border-color: var(--ops-line);
}

.navbar-toggler-icon {
  filter: invert(1) brightness(1.8);
}


#accountingTabs {
  gap: 10px;
  border-bottom-color: rgba(40, 231, 255, 0.3);
}

#accountingTabs .nav-link {
  min-height: 36px;
  padding: 8px 16px;
  border: 1px solid rgba(40, 231, 255, 0.72);
  border-radius: 6px 6px 0 0;
  color: #ffffff !important;
  background:
    linear-gradient(180deg, rgba(40, 231, 255, 0.14), rgba(5, 13, 18, 0.76));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 20px rgba(40, 231, 255, 0.18);
  font-weight: 850;
}

#accountingTabs .nav-link:hover,
#accountingTabs .nav-link:focus {
  color: #ffffff !important;
  border-color: rgba(159, 248, 255, 0.98);
  background:
    linear-gradient(180deg, rgba(60, 239, 255, 0.42), rgba(8, 42, 55, 0.92));
  box-shadow: 0 0 28px rgba(40, 231, 255, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

#accountingTabs .nav-link.active {
  color: #021014 !important;
  border-color: rgba(183, 251, 255, 1);
  background: linear-gradient(180deg, #d2feff, #39efff 48%, #00c8e8);
  box-shadow: 0 0 32px rgba(40, 231, 255, 0.64), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.accounting-ledger-shell {
  overflow: visible;
}

.accounting-ledger-filter {
  position: relative;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(280px, 0.44fr) minmax(180px, 0.24fr) minmax(180px, 0.24fr);
  gap: 12px 16px;
  align-items: end;
  margin-bottom: 18px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 40%),
    rgba(7, 18, 25, 0.62);
  overflow: visible;
}

.accounting-ledger-filter .form-label {
  color: #d7eff4;
  font-weight: 850;
}

.accounting-ledger-history-type .btn {
  min-height: 40px;
  font-weight: 850;
}

.accounting-ledger-advanced {
  align-self: end;
}

.accounting-ledger-advanced-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.accounting-ledger-filter-icon {
  width: 18px;
  height: 18px;
  border-width: 1.5px;
}

.accounting-ledger-filter-icon.command-icon-list::before {
  width: 10px;
  height: 8px;
  border-top-width: 1.5px;
  border-bottom-width: 1.5px;
  box-shadow: 0 4px 0 currentColor;
}

.accounting-ledger-reset {
  align-self: end;
}

.accounting-ledger-toolbar {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin: 4px 0 12px;
}

.accounting-ledger-section-title {
  color: var(--ops-text);
  font-weight: 900;
}

.accounting-ledger-table-shell {
  position: relative;
  z-index: 1;
  overflow-x: auto;
  overflow-y: visible;
  background: rgba(7, 18, 25, 0.6);
}

.accounting-ledger-table {
  min-width: 1480px;
}

.accounting-ledger-table th,
.accounting-ledger-detail-table th {
  white-space: nowrap;
}

.accounting-ledger-row td {
  height: 56px;
}

.accounting-ledger-row {
  cursor: pointer;
}

.accounting-ledger-row:hover .accounting-ledger-batch-id,
.accounting-ledger-row:focus-within .accounting-ledger-batch-id {
  color: #9ff8ff;
}

.accounting-ledger-batch-id {
  color: #67e8f9;
  font-size: 1.02rem;
  font-weight: 950;
  letter-spacing: 0;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.accounting-ledger-expand {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  color: var(--ops-cyan);
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform var(--transition-fast);
}

.accounting-ledger-expand[aria-expanded="true"] {
  transform: rotate(90deg);
}

.accounting-ledger-type-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border: 1px solid rgba(37, 99, 235, 0.72);
  border-radius: 5px;
  color: #bcd6ff;
  background: rgba(37, 99, 235, 0.22);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.accounting-ledger-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 5px;
  color: #061115;
  font-size: 0.78rem;
  font-weight: 900;
}

.accounting-ledger-status-finalized {
  background: var(--ops-green);
}

.accounting-ledger-status-void {
  color: #ffd7dc;
  background: rgba(239, 68, 68, 0.64);
  border: 1px solid rgba(255, 154, 166, 0.36);
}

.accounting-ledger-status-pending {
  background: var(--ops-amber);
}

.accounting-ledger-status-exported {
  color: #150b2a;
  background: #b88cff;
}

.accounting-ledger-status-error {
  color: #451a03;
  background: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.44);
}

.accounting-ledger-status-draft {
  color: #d7eff4;
  background: rgba(148, 163, 184, 0.34);
  border: 1px solid rgba(203, 213, 225, 0.28);
}

.accounting-ledger-status-reversed {
  color: #fee2e2;
  background: rgba(190, 18, 60, 0.42);
  border: 1px solid rgba(251, 113, 133, 0.34);
}

.accounting-ledger-detail-row > td {
  padding: 0 38px 18px 38px;
  background: rgba(7, 31, 43, 0.46);
}

.accounting-ledger-detail-panel {
  overflow-x: auto;
  border: 1px solid rgba(40, 231, 255, 0.14);
  border-radius: 8px;
  background: rgba(5, 13, 18, 0.34);
}

.accounting-ledger-void-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  background: rgba(93, 16, 28, 0.2);
}

.accounting-ledger-void-summary span {
  display: block;
  color: var(--ops-muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.accounting-ledger-void-summary strong {
  color: var(--ops-text);
  overflow-wrap: anywhere;
}

.accounting-ledger-detail-table {
  min-width: 1120px;
}

.accounting-ledger-detail-table tr.accounting-ledger-search-match > * {
  background: rgba(84, 241, 166, 0.16) !important;
  box-shadow: inset 4px 0 0 var(--ops-green);
}

.accounting-ledger-detail-table tr.accounting-ledger-search-match a {
  color: #9fffc6;
  font-weight: 950;
}

.accounting-ledger-pagination,
.accounting-ledger-footer,
.accounting-ledger-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.accounting-ledger-pagination {
  justify-content: space-between;
  padding: 14px 16px;
  color: var(--text-secondary);
  border-top: 1px solid var(--panel-border);
}

.accounting-ledger-page-size {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 4px 18px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  color: var(--text-primary);
  background: var(--panel-background-soft);
}

.accounting-ledger-footer {
  justify-content: space-between;
  margin-top: 18px;
  padding: 14px 16px;
  background: rgba(7, 18, 25, 0.48);
}

.accounting-ledger-tip {
  color: var(--ops-muted);
}

.accounting-ledger-print-mount {
  display: none;
}

@media print {
  body.accounting-ledger-printing > *:not(.accounting-ledger-print-mount) {
    display: none !important;
  }

  body.accounting-ledger-printing .accounting-ledger-print-mount {
    display: block;
    color: #111827;
    background: #ffffff;
  }

  body.accounting-ledger-printing .accounting-ledger-print-mount h1 {
    margin: 0 0 16px;
    font-size: 18px;
  }

  body.accounting-ledger-printing .accounting-ledger-print-mount table {
    width: 100%;
    color: #111827;
    border-collapse: collapse;
  }

  body.accounting-ledger-printing .accounting-ledger-print-mount th,
  body.accounting-ledger-printing .accounting-ledger-print-mount td {
    padding: 8px;
    border: 1px solid #d1d5db;
  }

  body.accounting-ledger-printing .accounting-ledger-print-mount .dropdown,
  body.accounting-ledger-printing .accounting-ledger-print-mount .accounting-ledger-expand {
    display: none !important;
  }
}

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

  .accounting-ledger-search,
  .accounting-ledger-history-type,
  .accounting-ledger-advanced,
  .accounting-ledger-reset {
    grid-column: 1 / -1;
  }

}

.text-secondary,
.form-text,
.table > :not(caption) > * > .text-secondary {
  color: var(--ops-muted) !important;
}

.text-danger {
  color: var(--ops-red) !important;
}

.text-success {
  color: var(--ops-green) !important;
}

.text-warning-emphasis {
  color: var(--ops-amber) !important;
}

.login-shell {
  min-height: calc(100vh - 120px);
  display: grid;
  place-items: center;
}

.login-stack {
  width: min(100%, 460px);
}

.login-brand-mark {
  width: 100%;
  min-height: 112px;
  margin-bottom: 14px;
  border: 1px solid rgba(40, 231, 255, 0.16);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(7, 16, 22, 0.24), rgba(7, 16, 22, 0.02), rgba(7, 16, 22, 0.24));
  box-shadow: 0 0 28px rgba(40, 231, 255, 0.11), 0 18px 40px rgba(0, 0, 0, 0.26);
}

.login-brand-mark img {
  display: block;
  width: calc(100% - 32px);
  height: 100%;
  max-height: 108px;
  margin: 0 auto;
  object-fit: contain;
}

.login-panel {
  width: 100%;
  padding: 24px;
  background: linear-gradient(180deg, rgba(15, 32, 43, 0.96), rgba(11, 23, 32, 0.96));
  border: 1px solid rgba(40, 231, 255, 0.25);
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(40, 231, 255, 0.04), 0 22px 60px rgba(0, 0, 0, 0.32);
}

.login-panel h1,
.login-panel .form-label {
  color: #f2fbfd !important;
}

.login-panel .form-label {
  font-weight: 750;
}

.login-panel .small {
  color: #9befff;
}

.page-narrow {
  width: 100%;
  max-width: none;
}

.page-wide {
  width: 100%;
  max-width: none;
}

.client-billing-primary-note {
  min-height: 66px;
  padding: 0.45rem 0;
}

.client-billing-primary-note .form-label {
  color: var(--ops-muted);
}

.client-outcome-rate-grid {
  overflow: visible;
}

.client-outcome-rate-grid .table {
  table-layout: auto;
}

.client-outcome-rate-grid th,
.client-outcome-rate-grid td {
  padding: 0.42rem 0.5rem;
  vertical-align: middle;
}

.client-outcome-rate-grid-outcome {
  width: 34%;
}

.client-outcome-rate-grid-type {
  width: 24%;
}

.client-outcome-rate-grid-amount {
  width: 28%;
}

.client-outcome-rate-grid-active {
  width: 14%;
  min-width: 104px;
}

.client-outcome-rate-grid .import-select,
.client-outcome-rate-grid .form-control {
  min-width: 0;
}

.client-billing-notes-prominent textarea {
  min-height: 132px;
}

.border,
.table-responsive,
form.border,
section .border {
  border-color: rgba(40, 231, 255, 0.18) !important;
}

.rounded {
  border-radius: 8px !important;
}

form.border,
.table-responsive,
.modal-content,
.media-card,
.media-preview-item,
.history-report-preview,
.login-panel,
aside > .border,
section > .border,
.col-12 > .border,
.col-md-4 > .border {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), transparent 38%),
    linear-gradient(135deg, rgba(17, 43, 56, 0.82), rgba(7, 18, 25, 0.72)) !important;
  box-shadow:
    inset 0 1px 0 var(--ops-glass-shine),
    inset 0 -1px 0 rgba(40, 231, 255, 0.08),
    0 18px 48px rgba(0, 0, 0, 0.24),
    0 0 30px rgba(40, 231, 255, 0.045);
  backdrop-filter: blur(16px) saturate(1.18);
}

.bg-white {
  background-color: rgba(15, 32, 43, 0.92) !important;
}

#activityLogModal {
  z-index: 1200;
}

body:has(#activityLogModal.show) .modal-backdrop {
  z-index: 1190;
}

#communicationModal {
  z-index: 1200;
}

body:has(#communicationModal.show) .modal-backdrop {
  z-index: 1190;
}

#communicationModal.show {
  display: flex !important;
  align-items: flex-start;
  overflow: hidden;
  padding: 5rem 0 1rem;
}

.communication-modal-dialog {
  width: calc(100% - 2rem);
  height: min(820px, calc(100dvh - 6rem));
  margin: 0 auto;
}

.communication-modal-dialog .modal-content {
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
}

.communication-modal-dialog .modal-header {
  flex: 0 0 auto;
}

.communication-modal-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.communication-compose-section {
  flex: 0 1 auto;
  max-height: 40vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.communication-recipients > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.communication-recipients > div > div {
  max-height: 8.5rem;
  overflow-y: auto;
  padding: 0.5rem;
  border: 1px solid var(--ops-border);
  border-radius: var(--panel-radius);
  overscroll-behavior: contain;
}

.communication-recipients > div > div > label {
  position: sticky;
  top: -0.5rem;
  display: block;
  margin: -0.5rem -0.5rem 0.35rem;
  padding: 0.5rem;
  background: var(--panel-background);
  font-weight: 600;
  z-index: 1;
}

.communication-recipients .form-check {
  margin-bottom: 0.25rem;
}

.communication-history-section {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.communication-history-table {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.communication-history-table thead th {
  position: sticky;
  top: 0;
  background: var(--panel-background);
  z-index: 1;
}

#activityLogModal.show {
  display: flex !important;
  align-items: center;
}

.activity-log-modal-dialog {
  width: calc(100% - 2rem);
  margin: 0 auto;
}

.activity-log-modal-content {
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
}

.activity-log-modal-content .modal-header {
  flex: 0 0 auto;
}

.activity-log-modal-body {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding: 0;
}

.activity-log-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1rem;
}

.activity-log-item {
  border-bottom: 1px solid rgba(118, 238, 255, 0.14);
}

.activity-log-item:last-child {
  border-bottom: 0;
}

.activity-log-timestamp {
  flex: 0 0 auto;
  white-space: nowrap;
}

.activity-log-description {
  overflow-wrap: anywhere;
  line-height: 1.45;
}

@media (max-height: 640px) {
  .activity-log-modal-dialog {
    width: calc(100% - 1rem);
  }

  .activity-log-modal-content {
    max-height: calc(100vh - 1rem);
  }

  .activity-log-list {
    padding: 0.875rem 1rem;
  }

  #communicationModal.show {
    padding-top: 4rem;
  }

  .communication-modal-dialog {
    width: calc(100% - 1rem);
    height: calc(100dvh - 5rem);
  }
}

@media (max-width: 575.98px) {
  .communication-recipients > div {
    grid-template-columns: 1fr;
  }

  .activity-log-timestamp {
    width: 100%;
  }
}

.report-error-summary {
  padding: 12px 14px;
  border: 1px solid rgba(255, 107, 122, 0.72);
  border-radius: 8px;
  color: #ffd9de;
  background: rgba(93, 16, 28, 0.48);
  box-shadow: 0 0 22px rgba(255, 107, 122, 0.14);
}

.report-error-field {
  padding: 10px;
  border: 1px solid rgba(255, 107, 122, 0.58);
  border-radius: 8px;
  background: rgba(93, 16, 28, 0.22);
  box-shadow: 0 0 18px rgba(255, 107, 122, 0.12);
}

.report-error-field .form-control,
.report-error-field .form-select,
.report-error-field .media-dropzone {
  border-color: var(--ops-red) !important;
  box-shadow: 0 0 0 0.18rem rgba(255, 107, 122, 0.16), 0 0 18px rgba(255, 107, 122, 0.16);
}

.report-field-errors {
  margin-top: 6px;
  color: #ff9aa6;
  font-size: 0.92rem;
  font-weight: 750;
}

.report-field-errors ul {
  margin: 0;
  padding-left: 1.1rem;
}

[data-p2p-theme="light"] .technician-workspace .report-error-summary,
[data-p2p-theme="light"] .technician-workspace .report-error-field {
  color: #7f1d1d;
  background: #fff1f2;
  border-color: #e36b78;
  box-shadow: 0 0 0 1px rgba(190, 24, 42, 0.05);
}

[data-p2p-theme="light"] .technician-workspace .report-field-errors {
  color: #b42318;
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] .technician-workspace .report-error-summary,
  [data-p2p-theme="auto"] .technician-workspace .report-error-field {
    color: #7f1d1d;
    background: #fff1f2;
    border-color: #e36b78;
    box-shadow: 0 0 0 1px rgba(190, 24, 42, 0.05);
  }

  [data-p2p-theme="auto"] .technician-workspace .report-field-errors {
    color: #b42318;
  }
}

.report-photo-status {
  display: inline-flex;
  margin-top: 8px;
  padding: 4px 9px;
  border: 1px solid;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 750;
}

.report-photo-status-complete {
  color: #b9ffd4;
  border-color: rgba(78, 244, 138, 0.48);
  background: rgba(18, 100, 54, 0.36);
}

.report-photo-status-needed {
  color: #ffd9de;
  border-color: rgba(255, 107, 122, 0.58);
  background: rgba(93, 16, 28, 0.34);
}

.form-label,
dt {
  color: #bfeef7;
  font-weight: 650;
}

dd,
p,
li {
  color: var(--ops-text);
}

.form-control,
.form-select {
  color: var(--ops-text);
  color-scheme: dark;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 48%),
    rgba(4, 12, 18, 0.78);
  border-color: rgba(168, 221, 232, 0.28);
  border-radius: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.form-control:focus,
.form-select:focus {
  color: var(--ops-text);
  background-color: rgba(5, 15, 22, 0.98);
  border-color: var(--ops-cyan);
  box-shadow: 0 0 0 0.2rem rgba(40, 231, 255, 0.14), 0 0 18px rgba(40, 231, 255, 0.2);
}

.form-select option,
select option {
  color: var(--ops-text);
  background-color: #071016;
}

.form-select option:checked,
select option:checked {
  color: #031116;
  background-color: var(--ops-cyan);
}

.form-select option:hover,
select option:hover {
  color: #031116;
  background-color: #75f0ff;
}

.form-control::placeholder {
  color: #66818c;
}

.form-control:disabled,
.form-select:disabled {
  color: #6f8b96;
  background-color: rgba(14, 27, 36, 0.78);
}

.btn {
  border-radius: 6px;
  font-weight: 650;
}

.btn-primary {
  color: #031014;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.48), transparent 48%),
    linear-gradient(180deg, #75f0ff, #1fd3ee);
  border-color: #67e8f9;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    inset 0 -1px 0 rgba(2, 16, 20, 0.22),
    0 0 18px rgba(40, 231, 255, 0.32);
}

.btn-primary:hover,
.btn-primary:focus {
  color: #021014;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.56), transparent 46%),
    linear-gradient(180deg, #a5f3fc, #38e7ff);
  border-color: #a5f3fc;
  box-shadow: 0 0 24px rgba(40, 231, 255, 0.38);
}

.btn-outline-primary {
  color: #67e8f9;
  border-color: rgba(40, 231, 255, 0.72);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 52%);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  color: #031014;
  background-color: #67e8f9;
  border-color: #67e8f9;
}

.btn-outline-secondary {
  color: #b9d4dc;
  border-color: rgba(137, 168, 179, 0.46);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  color: var(--ops-text);
  background-color: rgba(137, 168, 179, 0.16);
  border-color: rgba(137, 168, 179, 0.72);
}

.btn-outline-danger {
  color: #ff99a4;
  border-color: rgba(255, 107, 122, 0.7);
}

.btn-outline-danger:hover,
.btn-outline-danger:focus {
  color: #22080b;
  background-color: var(--ops-red);
  border-color: var(--ops-red);
}

.table-responsive {
  position: relative;
  z-index: 1;
  overflow: hidden;
}

/* Accounting queues retain their operational column widths and scroll inside the table region. */
.accounting-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  scrollbar-color: rgba(103, 232, 249, 0.82) rgba(7, 18, 25, 0.72);
}

.accounting-table-scroll > .table {
  width: max-content;
  min-width: 100%;
}

.accounting-table-scroll > .table :is(th, td) {
  white-space: nowrap;
}

.accounting-table-scroll::-webkit-scrollbar {
  height: 12px;
}

.accounting-table-scroll::-webkit-scrollbar-track {
  background: rgba(7, 18, 25, 0.72);
}

.accounting-table-scroll::-webkit-scrollbar-thumb {
  border: 3px solid rgba(7, 18, 25, 0.72);
  border-radius: 999px;
  background: rgba(103, 232, 249, 0.82);
}

[data-p2p-theme="light"] .accounting-table-scroll {
  scrollbar-color: rgba(8, 151, 184, 0.78) rgba(226, 241, 246, 0.92);
}

[data-p2p-theme="light"] .accounting-table-scroll::-webkit-scrollbar-track {
  background: rgba(226, 241, 246, 0.92);
}

[data-p2p-theme="light"] .accounting-table-scroll::-webkit-scrollbar-thumb {
  border-color: rgba(226, 241, 246, 0.92);
  background: rgba(8, 151, 184, 0.78);
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] .accounting-table-scroll {
    scrollbar-color: rgba(8, 151, 184, 0.78) rgba(226, 241, 246, 0.92);
  }

  [data-p2p-theme="auto"] .accounting-table-scroll::-webkit-scrollbar-track {
    background: rgba(226, 241, 246, 0.92);
  }

  [data-p2p-theme="auto"] .accounting-table-scroll::-webkit-scrollbar-thumb {
    border-color: rgba(226, 241, 246, 0.92);
    background: rgba(8, 151, 184, 0.78);
  }
}

.export-preview-table-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.export-preview-table-wrap .table {
  min-width: max-content;
}

.export-preview-table-wrap th,
.export-preview-table-wrap td {
  min-width: 150px;
  white-space: nowrap;
}

.export-workspace {
  --export-border: rgba(40, 231, 255, 0.16);
  --export-border-strong: rgba(40, 231, 255, 0.30);
  --export-border-bright: rgba(40, 231, 255, 0.48);
  --export-surface: rgba(4, 18, 27, 0.74);
  --export-surface-soft: rgba(7, 27, 39, 0.54);
  --export-control-height: 40px;
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

.export-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 10px;
}

.export-title-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
}

.export-page-header h1 {
  margin-bottom: 4px;
  font-weight: 700;
  color: #f4fbff;
  letter-spacing: 0;
}

.export-title-line .text-secondary {
  font-size: 0.92rem;
}

.export-download-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex: 0 0 auto;
}

.export-download-actions .btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: 22px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.export-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
  width: 100%;
}

.export-main,
.export-sidebar {
  display: grid;
  gap: 22px;
  align-content: start;
  min-width: 0;
}

.export-control-panel,
.export-preview-panel,
.export-side-panel {
  border: 1px solid var(--export-border);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.038), transparent 36%),
    var(--export-surface);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 16px 36px rgba(0, 0, 0, 0.16);
}

.export-control-panel,
.export-preview-header,
.export-side-panel {
  padding: 16px;
}

.export-control-panel {
  padding: 20px 22px;
  overflow: visible;
}

.export-top-filters {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(620px, 1.28fr);
  gap: 20px;
  align-items: start;
}

.export-top-filters > div {
  min-width: 0;
}

.export-workspace .form-label {
  margin-bottom: 8px;
  color: #d6e6eb;
  font-size: 0.84rem;
  font-weight: 700;
}

.export-workspace .form-control {
  min-height: var(--export-control-height);
  border-color: rgba(40, 231, 255, 0.18);
  border-radius: 7px;
  background-color: rgba(1, 10, 16, 0.58);
  color: var(--ops-text);
  box-shadow: inset 0 0 0 1px rgba(40, 231, 255, 0.03);
}

.export-workspace .form-control:focus {
  border-color: var(--export-border-bright);
  box-shadow: 0 0 0 0.18rem rgba(40, 231, 255, 0.13);
}

.export-date-filter-editor {
  min-width: 0;
  position: relative;
  z-index: 3;
}

.export-date-filter-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.export-date-filter-heading .btn {
  min-height: 28px;
  padding: 4px 10px;
  border-color: rgba(40, 231, 255, 0.3);
  color: #28e7ff;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1;
}

.export-date-filter-rows {
  display: grid;
  gap: 8px;
  overflow: visible;
  padding: 0;
}

.export-date-filter-row {
  display: grid;
  grid-template-columns: minmax(170px, 0.9fr) minmax(130px, 0.7fr) minmax(130px, 0.7fr) auto;
  gap: 8px;
  align-items: center;
  position: relative;
}

.export-date-field-picker {
  position: relative;
  min-width: 0;
}

.export-date-field-trigger {
  width: 100%;
  min-height: var(--export-control-height);
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
}

.export-date-field-trigger::after {
  content: "⌄";
  margin-left: auto;
  color: #28e7ff;
  font-size: 1.1rem;
  line-height: 1;
}

.export-date-field-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 60;
  display: none;
  width: min(280px, 100%);
  overflow: hidden;
  border: 1px solid rgba(40, 231, 255, 0.42);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(40, 231, 255, 0.08), transparent 42%),
    #04131c;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.36), 0 0 20px rgba(40, 231, 255, 0.18);
}

.export-date-field-picker.is-open .export-date-field-menu {
  display: grid;
}

.export-date-field-menu button {
  min-height: 38px;
  border: 0;
  border-bottom: 1px solid rgba(40, 231, 255, 0.12);
  padding: 8px 11px;
  color: #dffbff;
  background: transparent;
  font-size: 0.86rem;
  font-weight: 700;
  text-align: left;
}

.export-date-field-menu button:last-child {
  border-bottom: 0;
}

.export-date-field-menu button:hover,
.export-date-field-menu button:focus {
  color: #04131c;
  background: #28e7ff;
  outline: 0;
}

.export-date-filter-row > .btn,
.export-date-field-trigger {
  min-height: var(--export-control-height);
  border-color: rgba(40, 231, 255, 0.24);
  color: #bff8ff;
  font-size: 0.78rem;
  font-weight: 700;
}

.export-actions-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  margin-top: 24px;
}

.export-action-controls,
.export-action-submit {
  display: flex;
  gap: 20px;
  align-items: center;
  min-width: 0;
  flex-wrap: nowrap;
}

.export-action-submit {
  justify-content: flex-end;
}

.export-action-controls .btn,
.export-action-submit .btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: 18px;
  border-color: rgba(40, 231, 255, 0.38);
  border-radius: 7px;
  color: #28e7ff;
  font-weight: 700;
  background-color: rgba(0, 20, 30, 0.28);
}

.export-action-controls .btn {
  justify-content: flex-start;
  min-width: 250px;
  text-align: left;
}

.export-action-submit .btn-outline-secondary:hover,
.export-action-submit .btn-outline-secondary:focus {
  color: #031014;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 45%),
    #28e7ff;
  border-color: #67e8f9;
  box-shadow: 0 0 18px rgba(40, 231, 255, 0.26);
}

.export-action-controls .btn::before {
  display: inline-flex;
  width: 22px;
  margin-right: 10px;
  color: #28e7ff;
  font-weight: 800;
}

.export-action-controls .btn:nth-child(1)::before {
  content: "▥";
}

.export-action-controls .btn:nth-child(2)::before {
  content: "▽";
}

.export-action-controls .btn span {
  color: var(--ops-muted);
  font-weight: 600;
  margin-left: 4px;
}

.export-action-submit .btn-primary {
  color: #031014;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.50), transparent 48%),
    linear-gradient(180deg, #7df3ff, #24d8f2);
  border-color: #67e8f9;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    0 0 18px rgba(40, 231, 255, 0.30);
}

.export-action-submit .btn-primary:hover,
.export-action-submit .btn-primary:focus {
  color: #021014;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), transparent 46%),
    linear-gradient(180deg, #a5f3fc, #38e7ff);
  border-color: #a5f3fc;
  box-shadow: 0 0 24px rgba(40, 231, 255, 0.38);
}

.export-canceled-toggle {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 0 8px 0 0;
  padding-left: 0 !important;
  white-space: nowrap;
}

.export-canceled-toggle .form-check-input {
  float: none;
  flex: 0 0 auto;
  width: 2.25rem;
  height: 1.15rem;
  margin-left: 0 !important;
  margin-top: 0;
  border-color: rgba(203, 213, 225, 0.42);
  background-color: rgba(8, 22, 32, 0.95);
}

.export-canceled-toggle .form-check-input:checked {
  border-color: rgba(40, 231, 255, 0.66);
  background-color: var(--action-primary);
}

.export-canceled-toggle .form-check-label {
  color: #d6e6eb;
  font-weight: 600;
  line-height: 1;
}

.export-preview-panel {
  overflow: hidden;
  border-color: var(--export-border-strong);
  background:
    linear-gradient(180deg, rgba(40, 231, 255, 0.035), transparent 18%),
    var(--export-surface);
}

.export-preview-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 46px;
  padding-block: 10px;
  border-bottom: 1px solid rgba(40, 231, 255, 0.16);
  background: rgba(9, 27, 39, 0.62);
}

.export-preview-header h2 {
  color: #28e7ff;
  font-weight: 800;
}

.export-preview-header h2 span {
  color: var(--ops-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.export-preview-count {
  color: #bff8ff;
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
}

.export-preview-panel .export-preview-table-wrap {
  min-height: 640px;
  max-height: calc(100vh - 360px);
  overflow: auto;
}

.export-preview-panel .table {
  min-width: 1120px;
}

.export-preview-panel .table th,
.export-preview-panel .table td {
  min-width: 145px;
  padding: 0.52rem 0.82rem;
  border-color: rgba(40, 231, 255, 0.11);
  font-size: 0.86rem;
  line-height: 1.2;
}

.export-preview-panel .table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #0b2635;
  color: #dffbff;
  font-size: 0.72rem;
  letter-spacing: 0;
}

.export-preview-panel .table td {
  color: #dbe8ec;
}

.export-side-panel h2 {
  color: #dffbff;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 14px;
}

.export-side-panel h2 span {
  color: var(--ops-muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.export-summary-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.export-summary-list div,
.export-saved-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid rgba(40, 231, 255, 0.1);
}

.export-summary-list div:first-child,
.export-saved-item:first-child {
  border-top: 0;
}

.export-summary-list dt {
  color: #d6e6eb;
  font-size: 0.95rem;
  font-weight: 600;
}

.export-summary-list dd {
  margin: 0;
  color: #28e7ff;
  font-size: 1.12rem;
  font-weight: 800;
}

.export-saved-list {
  display: grid;
  gap: 2px;
}

.export-saved-item a {
  color: #dbe8ec;
  font-weight: 700;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.export-saved-item a:hover,
.export-saved-item a:focus {
  color: var(--action-primary);
}

.export-save-form {
  display: grid;
  gap: 10px;
}

.export-advanced-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.export-modal .modal-dialog {
  margin-top: 1.75rem;
  margin-bottom: 1.75rem;
}

.export-modal .modal-dialog-centered {
  min-height: calc(100% - 3.5rem);
}

.export-modal .modal-content {
  max-height: calc(100vh - 3.5rem);
  overflow: hidden;
}

.export-modal .modal-body {
  overflow: auto;
  padding: 14px 16px;
}

.export-workspace .modal-content {
  border: 1px solid var(--export-border-strong);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 40%),
    #071b27;
  color: var(--ops-text);
}

.export-workspace .modal-header,
.export-workspace .modal-footer {
  border-color: rgba(40, 231, 255, 0.14);
}

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

.export-section {
  border: 1px solid rgba(40, 231, 255, 0.16);
  border-radius: 8px;
  background: rgba(1, 12, 18, 0.32);
  overflow: hidden;
}

.export-section summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 14px;
  color: #dffbff;
  font-weight: 800;
  border-bottom: 1px solid transparent;
}

.export-section summary span {
  color: var(--ops-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.export-section summary::-webkit-details-marker {
  display: none;
}

.export-section summary::after {
  content: "+";
  float: right;
  color: #28e7ff;
  font-weight: 900;
}

.export-section[open] summary {
  border-bottom-color: rgba(40, 231, 255, 0.12);
}

.export-section[open] summary::after {
  content: "-";
}

.export-section .export-check-panel,
.export-section .export-column-picker {
  margin: 12px 14px 14px;
}

.export-section .export-check-panel {
  max-height: 230px;
}

.export-filter-option-search {
  min-height: 34px !important;
  margin-bottom: 8px;
  font-size: 0.82rem;
}

.export-status-change-grid {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 14px 14px;
}

.export-workspace .form-select {
  min-height: var(--export-control-height);
  border-color: rgba(40, 231, 255, 0.18);
  border-radius: 7px;
  background-color: rgba(1, 10, 16, 0.58);
  color: var(--ops-text);
}

.export-selected-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 190px;
  margin: 12px 14px 14px;
  overflow: auto;
}

.export-selected-columns span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(40, 231, 255, 0.22);
  border-radius: 6px;
  color: #dffbff;
  background: rgba(40, 231, 255, 0.06);
  font-size: 0.84rem;
  font-weight: 700;
}

.export-column-picker {
  max-height: none;
  padding-right: 0;
}

@media (max-width: 1280px) {
  .export-shell {
    grid-template-columns: 1fr;
  }

  .export-sidebar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .export-top-filters {
    grid-template-columns: 1fr;
  }

  .export-actions-row {
    align-items: stretch;
    flex-direction: column;
    display: flex;
  }

  .export-action-controls,
  .export-action-submit,
  .export-download-actions,
  .export-page-header {
    flex-wrap: wrap;
  }

  .export-action-controls .btn {
    min-width: 220px;
  }

  .export-date-filter-row {
    grid-template-columns: minmax(170px, 1fr) repeat(2, minmax(130px, 0.8fr)) auto;
  }
}

@media (max-width: 760px) {
  .export-sidebar {
    grid-template-columns: 1fr;
  }

  .export-advanced-grid,
  .export-date-filter-row,
  .export-status-change-grid {
    grid-template-columns: 1fr;
  }
}

.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--ops-text);
  --bs-table-border-color: rgba(40, 231, 255, 0.14);
  --bs-table-hover-bg: rgba(40, 231, 255, 0.08);
  --bs-table-hover-color: var(--ops-text);
}

.table-light {
  --bs-table-bg: rgba(55, 217, 245, 0.1);
  --bs-table-color: #bff8ff;
  border-color: rgba(40, 231, 255, 0.18);
}

.table th {
  color: #bff8ff;
  font-size: 0.84rem;
  text-transform: uppercase;
}

.order-list-tools {
  overflow: visible;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), transparent 38%),
    linear-gradient(135deg, rgba(17, 43, 56, 0.82), rgba(7, 18, 25, 0.72)) !important;
}

.column-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.column-picker .btn {
  min-width: 72px;
}

.order-list-advanced-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.order-list-advanced-actions .btn {
  min-width: 126px;
}

.order-list-canceled-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin: 0;
  padding-left: 2.6em;
  white-space: nowrap;
}

.order-list-modal {
  border: 1px solid rgba(40, 231, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 34%),
    rgba(8, 19, 27, 0.97);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.54), 0 0 36px rgba(40, 231, 255, 0.12);
}

.order-list-modal .modal-header,
.order-list-modal .modal-footer {
  border-color: rgba(40, 231, 255, 0.14);
}

.order-list-modal .btn-close {
  filter: invert(1) grayscale(1) brightness(1.8);
  opacity: 0.78;
}

.order-list-modal-picker {
  gap: 9px;
}

.order-filter-modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.order-filter-modal-group {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(40, 231, 255, 0.14);
  border-radius: 8px;
  background: rgba(5, 13, 18, 0.48);
}

.order-filter-modal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: #dff7fb;
  font-size: 0.88rem;
  font-weight: 850;
}

.order-filter-modal-options {
  display: grid;
  gap: 3px;
  max-height: 220px;
  overflow: auto;
  padding-right: 4px;
}

/* Advanced filters share the same neutral Frost containment while Midnight
   keeps its established high-contrast treatment above. */
[data-p2p-theme="light"] :is(.order-filter-modal-group, .column-filter-panel) {
  color: var(--frost-text-primary);
  border-color: var(--surface-border);
  background: var(--surface-secondary);
  box-shadow: var(--surface-shadow);
  backdrop-filter: none;
}

[data-p2p-theme="light"] .order-filter-modal-heading {
  color: var(--frost-text-primary);
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] :is(.order-filter-modal-group, .column-filter-panel) {
    color: var(--frost-text-primary);
    border-color: var(--surface-border);
    background: var(--surface-secondary);
    box-shadow: var(--surface-shadow);
    backdrop-filter: none;
  }

  [data-p2p-theme="auto"] .order-filter-modal-heading {
    color: var(--frost-text-primary);
  }
}

.btn-check:checked + .btn-outline-secondary {
  color: #031014;
  background-color: var(--ops-cyan);
  border-color: var(--ops-cyan);
  box-shadow: 0 0 18px rgba(40, 231, 255, 0.22);
}

.column-filter-row {
  position: relative;
  z-index: 30;
  border-top: 1px solid rgba(40, 231, 255, 0.14);
}

.column-filter-menu {
  position: relative;
}

.column-filter-menu[open] {
  z-index: 40;
}

.column-filter-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid rgba(137, 168, 179, 0.46);
  border-radius: 6px;
  color: #b9d4dc;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 48%);
  cursor: pointer;
  list-style: none;
}

.column-filter-menu summary::-webkit-details-marker {
  display: none;
}

.column-filter-menu summary::after {
  content: "▾";
  color: var(--ops-cyan);
  font-size: 0.72rem;
}

.column-filter-menu[open] summary {
  color: #031014;
  background: var(--ops-cyan);
  border-color: var(--ops-cyan);
  box-shadow: 0 0 18px rgba(40, 231, 255, 0.18);
}

.column-filter-menu[open] summary::after {
  color: #031014;
}

.column-filter-panel {
  position: absolute;
  z-index: 1040;
  top: calc(100% + 6px);
  left: 0;
  width: min(280px, calc(100vw - 32px));
  max-height: 280px;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(40, 231, 255, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 34%),
    rgba(8, 19, 27, 0.94);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.38), 0 0 24px rgba(40, 231, 255, 0.1);
  backdrop-filter: blur(18px) saturate(1.18);
}

.column-filter-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 7px;
  border-radius: 6px;
  color: var(--ops-text);
  cursor: pointer;
}

.column-filter-option:hover {
  background: rgba(40, 231, 255, 0.08);
}

.column-filter-option input {
  accent-color: var(--ops-cyan);
}

.column-filter-option span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-sort-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #bff8ff;
  text-decoration: none;
}

.table-sort-link:hover,
.table-sort-link:focus {
  color: #ffffff;
  text-shadow: none;
}

.order-list-table td {
  min-width: 110px;
}

.order-list-click-row {
  cursor: pointer;
  transition: background-color 140ms ease, box-shadow 140ms ease, color 140ms ease;
}

.order-list-click-row:hover,
.order-list-click-row:focus {
  background: rgba(40, 231, 255, 0.1);
  box-shadow: inset 4px 0 0 rgba(40, 231, 255, 0.82), inset 0 0 0 999px rgba(40, 231, 255, 0.018);
  outline: 0;
}

.order-list-click-row.order-list-row-last-opened {
  background: rgba(40, 231, 255, 0.16);
  box-shadow: inset 4px 0 0 rgba(40, 231, 255, 0.95), inset 0 0 0 999px rgba(40, 231, 255, 0.04);
}

.order-list-click-row.order-list-row-last-opened td {
  color: #f3fdff;
}

.badge {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
}

.order-status-pill {
  color: #031014;
  border-color: color-mix(in srgb, var(--status-pill-color) 72%, #ffffff 10%);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--status-pill-color) 82%, #ffffff 12%), var(--status-pill-color));
  box-shadow: 0 0 14px color-mix(in srgb, var(--status-pill-color) 24%, transparent);
  font-weight: 850;
}

.status-pill-new { --status-pill-color: #2d8cff; }
.status-pill-assigned { --status-pill-color: #22d0ee; }
.status-pill-unscheduled { --status-pill-color: #facc15; }
.status-pill-scheduled { --status-pill-color: #22c55e; }
.status-pill-routed { --status-pill-color: #8b5cf6; }
.status-pill-pending-report { --status-pill-color: #f97316; }
.status-pill-report-submitted { --status-pill-color: #8b5cf6; }
.status-pill-qa-review { --status-pill-color: #6366f1; }
.status-pill-complete { --status-pill-color: #64748b; }
.status-pill-canceled { --status-pill-color: #ef4444; }

.text-bg-secondary {
  color: #dffbff !important;
  background-color: rgba(59, 130, 246, 0.3) !important;
  border-color: rgba(96, 165, 250, 0.36);
}

.text-bg-success {
  color: #042317 !important;
  background-color: var(--ops-green) !important;
}

.text-bg-warning {
  color: #211500 !important;
  background-color: var(--ops-amber) !important;
}

.vip-priority-field-title,
.vip-priority-toggle .form-check-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  padding: 5px 12px;
  border: 1px solid rgba(192, 132, 252, 0.34);
  border-radius: 999px;
  color: #ead8ff;
  background: rgba(192, 132, 252, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-weight: 800;
  line-height: 1.1;
}

.vip-priority-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vip-priority-toggle .form-check-input {
  margin-top: 0;
  accent-color: var(--status-vip);
}

.vip-priority-toggle .form-check-label {
  margin-left: 0;
  color: #d8bbff;
  background: rgba(192, 132, 252, 0.1);
  transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease, color 140ms ease;
}

.vip-priority-badge,
.vip-priority-toggle .form-check-input:checked + .form-check-label {
  color: #17061f;
  border-color: color-mix(in srgb, var(--status-vip) 78%, #ffffff 18%);
  background: linear-gradient(180deg, color-mix(in srgb, var(--status-vip) 88%, #ffffff 14%), var(--status-vip));
  box-shadow: 0 0 16px rgba(192, 132, 252, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.vip-priority-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 5px 11px;
  border-radius: 999px;
  font-weight: 850;
  line-height: 1.05;
}

.contact-chip {
  display: inline-flex;
  align-items: center;
  max-width: min(100%, 520px);
  margin-left: 8px;
  padding: 2px 8px;
  border: 1px solid rgba(137, 168, 179, 0.3);
  border-radius: 999px;
  color: var(--ops-muted);
  background: rgba(137, 168, 179, 0.08);
  font-size: 0.78rem;
  line-height: 1.4;
  vertical-align: middle;
}

.contact-chip-success {
  color: #b7ffd8;
  border-color: rgba(84, 241, 166, 0.38);
  background: rgba(84, 241, 166, 0.1);
}

.contact-chip-warning {
  color: #ffe6a1;
  border-color: rgba(251, 191, 36, 0.38);
  background: rgba(251, 191, 36, 0.1);
}

.contact-chip-danger {
  color: #ffb3bd;
  border-color: rgba(255, 107, 122, 0.42);
  background: rgba(255, 107, 122, 0.1);
}

.blocked-date-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 32px;
}

.blocked-date-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px 5px 10px;
  border: 1px solid rgba(255, 107, 122, 0.38);
  border-radius: 999px;
  color: #ffd1d7;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 55%),
    rgba(255, 107, 122, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.blocked-date-chip button {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid rgba(255, 107, 122, 0.45);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 107, 122, 0.18);
  line-height: 1;
}

.blocked-date-chip button:hover,
.blocked-date-chip button:focus {
  background: rgba(255, 107, 122, 0.32);
}

.blocked-date-chip-success {
  border-color: rgba(85, 240, 160, 0.5);
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 55%),
    rgba(46, 204, 113, 0.22);
}

.blocked-date-chip-success button {
  border-color: rgba(85, 240, 160, 0.55);
  background: rgba(46, 204, 113, 0.24);
}

.blocked-date-chip-success button:hover,
.blocked-date-chip-success button:focus {
  background: rgba(46, 204, 113, 0.38);
}

.alert {
  color: var(--ops-text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 42%),
    rgba(15, 32, 43, 0.88);
  border-color: rgba(40, 231, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 16px 42px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px) saturate(1.14);
}

/* Keep Service Order accounting attention distinct in Midnight without changing Frost. */
[data-p2p-theme="dark"] .service-order-accounting-attention {
  border-color: color-mix(in srgb, var(--ops-red) 62%, var(--panel-border)) !important;
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--ops-red) 22%, transparent),
    0 16px 42px rgba(0, 0, 0, 0.18) !important;
}

[data-p2p-theme="dark"] .service-order-accounting-attention .service-order-accounting-attention-action {
  color: var(--ops-red) !important;
  border-color: color-mix(in srgb, var(--ops-red) 62%, transparent) !important;
}

[data-p2p-theme="dark"] .service-order-accounting-attention .service-order-accounting-attention-action:hover,
[data-p2p-theme="dark"] .service-order-accounting-attention .service-order-accounting-attention-action:focus {
  color: #fff2f4 !important;
  background: color-mix(in srgb, var(--ops-red) 18%, transparent) !important;
}

.btn-close {
  filter: invert(1) grayscale(1) brightness(1.8);
}

.photo-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: rgba(137, 168, 179, 0.16);
}

.photo-thumb-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.photo-thumb-button:hover .photo-thumb,
.photo-thumb-button:focus .photo-thumb {
  box-shadow: inset 0 0 0 2px var(--ops-cyan), 0 0 22px rgba(40, 231, 255, 0.18);
}

.photo-thumb-button:focus {
  outline: none;
}

.qa-report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px 24px;
}

.qa-report-grid p {
  margin-bottom: 0;
}

.qa-outcome-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border: 1px solid rgba(168, 221, 232, 0.22);
  border-radius: 999px;
  color: var(--ops-text);
  background: rgba(15, 32, 43, 0.82);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.qa-outcome-pill-green {
  color: #96ffbd;
  border-color: rgba(78, 244, 138, 0.72);
  background: linear-gradient(180deg, rgba(23, 150, 76, 0.42), rgba(10, 74, 42, 0.38));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 18px rgba(78, 244, 138, 0.18);
}

.qa-outcome-pill-orange {
  color: #ffd185;
  border-color: rgba(255, 176, 74, 0.76);
  background: linear-gradient(180deg, rgba(174, 100, 14, 0.44), rgba(86, 49, 9, 0.4));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 18px rgba(255, 176, 74, 0.18);
}

.qa-outcome-pill-red {
  color: #ffb1ba;
  border-color: rgba(255, 79, 99, 0.78);
  background: linear-gradient(180deg, rgba(151, 38, 52, 0.48), rgba(80, 18, 28, 0.42));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 18px rgba(255, 79, 99, 0.2);
}

.qa-outcome-pill-neutral {
  color: #d3e7ed;
  border-color: rgba(168, 221, 232, 0.26);
  background: rgba(7, 18, 25, 0.72);
}

.qa-pay-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px 24px;
}

.qa-pay-row p {
  margin-bottom: 0;
}

.qa-decision-panel {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(40, 231, 255, 0.16);
}

@media (max-width: 767.98px) {
  .qa-pay-row {
    grid-template-columns: 1fr;
  }
}

.qa-photo-card {
  display: block;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(40, 231, 255, 0.22);
  border-radius: 6px;
  color: inherit;
  background: rgba(15, 32, 43, 0.92);
  text-decoration: none;
  text-align: left;
}

.qa-photo-card:hover,
.qa-photo-card:focus {
  color: inherit;
  border-color: var(--ops-cyan);
  background:
    linear-gradient(180deg, rgba(40, 231, 255, 0.14), transparent 54%),
    rgba(10, 39, 51, 0.92);
  box-shadow: 0 0 0 1px rgba(40, 231, 255, 0.18), 0 0 24px rgba(40, 231, 255, 0.24);
  outline: none;
}

.qa-photo-card img {
  width: 100%;
  aspect-ratio: 1.18 / 1;
  object-fit: cover;
  background: rgba(137, 168, 179, 0.16);
}

.qa-photo-card span {
  display: block;
  padding: 6px 8px;
  font-size: 0.86rem;
  font-weight: 800;
}

.qa-file-card {
  min-height: 126px;
  padding: 10px;
  display: grid;
  place-items: center;
  gap: 8px;
  text-align: center;
}

.qa-file-card .media-file-icon {
  width: 58px;
  height: 58px;
  flex-basis: 58px;
}

.qa-photo-modal-dialog {
  max-width: min(75vw, 1440px);
}

.qa-photo-modal-dialog .modal-content {
  max-height: 86vh;
}

.qa-photo-modal-dialog .modal-body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.qa-photo-modal-frame {
  height: 75vh;
  max-height: calc(86vh - 120px);
  overflow: auto;
  border: 1px solid rgba(40, 231, 255, 0.16);
  border-radius: 8px;
  background: rgba(3, 12, 17, 0.8);
  text-align: center;
}

.qa-photo-modal-image {
  max-width: 100%;
  max-height: 100%;
  height: auto;
  transform-origin: center top;
  transition: transform 0.14s ease;
}

.qa-workspace-page,
.qa-standalone-page {
  display: grid;
  gap: 8px;
}

.qa-page-header {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  width: fit-content;
  max-width: 100%;
}

.qa-page-header h1 {
  margin: 0;
  color: var(--text-heading);
  font-size: 1.68rem;
  font-weight: 850;
  line-height: 1.08;
}

.qa-page-subtitle {
  min-width: 0;
  color: var(--ops-muted);
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.1;
  white-space: nowrap;
}

.qa-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
}

.qa-kpi-card {
  min-height: 52px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border: 1px solid currentColor;
  border-radius: 8px;
  color: var(--ops-cyan);
  background:
    linear-gradient(90deg, color-mix(in srgb, currentColor 16%, transparent), rgba(7, 18, 25, 0.76)),
    rgba(7, 18, 25, 0.82);
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

.qa-kpi-card:hover,
.qa-kpi-card:focus-within {
  transform: translateY(-2px);
  border-color: currentColor;
  background:
    linear-gradient(90deg, color-mix(in srgb, currentColor 20%, transparent), rgba(7, 18, 25, 0.78)),
    rgba(7, 18, 25, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 18px 42px rgba(0, 0, 0, 0.34),
    0 0 0 1px color-mix(in srgb, currentColor 32%, transparent),
    0 0 30px color-mix(in srgb, currentColor 30%, transparent);
}

.qa-kpi-icon {
  width: 30px;
  height: 30px;
  border: 2px solid currentColor;
  border-radius: 6px;
  position: relative;
}

.qa-kpi-icon::before,
.qa-kpi-icon::after {
  content: "";
  position: absolute;
}

.qa-kpi-icon-clipboard::before {
  left: 8px;
  top: -5px;
  width: 10px;
  height: 7px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: rgba(7, 18, 25, 0.96);
}

.qa-kpi-icon-clipboard::after {
  left: 8px;
  top: 9px;
  width: 13px;
  height: 8px;
  border-left: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: rotate(-45deg);
}

.qa-kpi-icon-camera {
  border-radius: 9px;
}

.qa-kpi-icon-camera::before {
  left: 7px;
  top: 7px;
  width: 13px;
  height: 13px;
  border: 3px solid currentColor;
  border-radius: 999px;
}

.qa-kpi-icon-camera::after {
  left: 6px;
  top: -5px;
  width: 12px;
  height: 6px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: rgba(7, 18, 25, 0.96);
}

.qa-kpi-icon-alert {
  border-radius: 999px;
}

.qa-kpi-icon-alert::before {
  left: 12px;
  top: 6px;
  width: 3px;
  height: 13px;
  border-radius: 999px;
  background: currentColor;
}

.qa-kpi-icon-alert::after {
  left: 12px;
  bottom: 5px;
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
}

.qa-kpi-icon-timer {
  border-radius: 999px;
}

.qa-kpi-icon-timer::before {
  left: 9px;
  top: -7px;
  width: 10px;
  height: 6px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.qa-kpi-icon-timer::after {
  left: 13px;
  top: 7px;
  width: 8px;
  height: 11px;
  border-left: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: rotate(0deg);
  transform-origin: left bottom;
}

.qa-kpi-copy {
  display: block;
  min-width: 0;
}

.qa-kpi-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.qa-kpi-card strong {
  color: currentColor;
  flex: 0 0 auto;
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1;
}

.qa-kpi-copy span {
  color: rgba(230, 247, 251, 0.82);
  min-width: 0;
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1.08;
}

.qa-kpi-card .qa-kpi-icon {
  color: inherit;
}

.qa-kpi-warning { color: var(--status-unscheduled); }
.qa-kpi-danger { color: var(--status-capacity); }
.qa-kpi-violet { color: var(--ops-violet); }

.qa-workspace-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.3fr) minmax(0, 0.7fr);
  align-items: start;
  gap: 18px;
  position: relative;
}

.qa-workspace-layout::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(30% + 5px);
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(40, 231, 255, 0.58), rgba(192, 132, 252, 0.3), transparent);
  box-shadow: 0 0 22px rgba(40, 231, 255, 0.34);
  pointer-events: none;
}

.qa-queue-panel {
  position: sticky;
  top: 84px;
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 112px);
  padding: 10px;
  overflow: hidden;
  border-color: rgba(40, 231, 255, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 48%),
    linear-gradient(135deg, rgba(3, 9, 13, 0.96), rgba(4, 15, 20, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 44px rgba(0, 0, 0, 0.34),
    0 0 26px rgba(40, 231, 255, 0.08);
}

.qa-queue-header,
.qa-workspace-header,
.qa-card-main,
.qa-workspace-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.qa-queue-header h2,
.qa-review-card h3,
.qa-empty-workspace h2 {
  margin: 0;
  color: #f4fbff;
  font-size: 0.96rem;
  font-weight: 850;
  text-transform: uppercase;
}

.qa-sort-control {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ops-muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.qa-sort-control .form-select {
  width: 124px;
}

.qa-filter-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.qa-filter-tabs a {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--ops-muted);
  font-size: 0.78rem;
  font-weight: 750;
  text-decoration: none;
  background: rgba(4, 14, 20, 0.34);
  transition: color var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.qa-filter-tabs a:hover,
.qa-filter-tabs a:focus {
  color: #061115;
  border-color: rgba(103, 232, 249, 0.98);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.46), transparent 48%),
    linear-gradient(180deg, #75f0ff, #1fd3ee);
  box-shadow: 0 0 22px rgba(40, 231, 255, 0.34);
}

.qa-filter-tabs a.active {
  color: #031014;
  border-color: rgba(103, 232, 249, 0.98);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.48), transparent 48%),
    linear-gradient(180deg, #75f0ff, #1fd3ee);
  box-shadow: 0 0 22px rgba(40, 231, 255, 0.34);
}

.qa-card-list {
  display: grid;
  gap: 6px;
  overflow-y: auto;
  padding-right: 2px;
}

.qa-queue-card {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid color-mix(in srgb, currentColor 55%, transparent);
  border-left: 3px solid currentColor;
  border-radius: 6px;
  color: var(--ops-text);
  background:
    radial-gradient(circle at 12% 18%, color-mix(in srgb, currentColor 13%, transparent), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 58%),
    rgba(7, 18, 25, 0.82);
  text-decoration: none;
  transition: transform var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.qa-queue-card:hover,
.qa-queue-card:focus {
  color: var(--ops-text);
  transform: translateY(-1px);
  border-color: currentColor;
  background:
    radial-gradient(circle at 12% 18%, color-mix(in srgb, currentColor 18%, transparent), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 58%),
    rgba(7, 18, 25, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 18px 42px rgba(0, 0, 0, 0.3),
    0 0 0 1px color-mix(in srgb, currentColor 24%, transparent),
    0 0 24px color-mix(in srgb, currentColor 22%, transparent);
}

.qa-queue-card.selected {
  color: #ffffff;
  border-width: 2px;
  border-left-width: 6px;
  transform: translateX(1px);
}

.qa-card-title-line,
.qa-card-detail-line {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.qa-card-title-line {
  flex-wrap: wrap;
}

.qa-card-title-line strong {
  flex: 0 0 auto;
}

.qa-card-separator {
  color: rgba(220, 249, 255, 0.46);
}

.qa-card-date {
  color: rgba(220, 249, 255, 0.68);
  font-size: 0.72rem;
  font-weight: 760;
}

.qa-card-detail-line {
  flex-wrap: wrap;
  color: var(--ops-muted);
  font-size: 0.72rem;
}

.qa-card-tech {
  flex: 0 0 auto;
  color: #ffffff;
  font-weight: 800;
}

.qa-queue-card.selected .qa-card-main strong,
.qa-queue-card.selected .qa-card-customer {
  color: #ffffff;
}

.qa-queue-card.selected .text-secondary,
.qa-queue-card.selected .qa-card-main span:not(.qa-status-pill) {
  color: rgba(220, 249, 255, 0.82) !important;
}

.qa-queue-outcome-green {
  color: var(--status-scheduled);
}

.qa-queue-outcome-orange {
  color: var(--status-no-coverage);
}

.qa-queue-outcome-red {
  color: var(--status-capacity);
}

.qa-queue-outcome-neutral {
  color: var(--map-zone);
}

.qa-queue-outcome-green.selected {
  border-color: rgba(168, 255, 202, 1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), transparent 46%),
    radial-gradient(circle at 12% 18%, rgba(116, 255, 169, 0.38), transparent 44%),
    linear-gradient(135deg, rgba(24, 124, 71, 0.96), rgba(9, 58, 38, 0.94) 76%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 0 0 2px rgba(205, 255, 224, 0.38),
    inset 6px 0 0 rgba(168, 255, 202, 0.98),
    0 0 0 2px rgba(78, 244, 138, 0.38),
    0 0 42px rgba(78, 244, 138, 0.42);
}

.qa-queue-outcome-orange.selected {
  border-color: rgba(255, 218, 142, 1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), transparent 46%),
    radial-gradient(circle at 12% 18%, rgba(255, 191, 89, 0.42), transparent 44%),
    linear-gradient(135deg, rgba(146, 83, 13, 0.98), rgba(66, 39, 9, 0.96) 76%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 0 0 2px rgba(255, 232, 181, 0.42),
    inset 6px 0 0 rgba(255, 218, 142, 0.98),
    0 0 0 2px rgba(255, 176, 74, 0.44),
    0 0 44px rgba(255, 176, 74, 0.46);
}

.qa-queue-outcome-red.selected {
  border-color: rgba(255, 161, 173, 1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), transparent 46%),
    radial-gradient(circle at 12% 18%, rgba(255, 98, 117, 0.42), transparent 44%),
    linear-gradient(135deg, rgba(142, 38, 52, 0.98), rgba(71, 18, 28, 0.96) 76%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 0 0 2px rgba(255, 199, 205, 0.38),
    inset 6px 0 0 rgba(255, 161, 173, 0.98),
    0 0 0 2px rgba(255, 79, 99, 0.42),
    0 0 44px rgba(255, 79, 99, 0.44);
}

.qa-queue-outcome-neutral.selected {
  border-color: rgba(176, 251, 255, 1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), transparent 46%),
    radial-gradient(circle at 12% 18%, rgba(40, 231, 255, 0.34), transparent 44%),
    linear-gradient(135deg, rgba(22, 66, 82, 0.96), rgba(10, 40, 52, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 0 0 2px rgba(216, 253, 255, 0.34),
    inset 6px 0 0 var(--ops-cyan),
    0 0 0 2px rgba(40, 231, 255, 0.32),
    0 0 42px rgba(40, 231, 255, 0.42);
}

.qa-card-main strong {
  font-size: 1.01rem;
  font-weight: 880;
}

.qa-card-main span:not(.qa-status-pill) {
  color: var(--ops-muted);
  font-size: 0.72rem;
}

.qa-card-customer {
  line-height: 1.18;
  color: #ffffff;
  font-weight: 840;
}

.qa-card-furniture {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qa-readiness-row {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 7px;
  padding-top: 0;
  color: var(--ops-muted);
  font-size: 0.71rem;
}

.qa-readiness-row .is-complete { color: var(--ops-green); }
.qa-readiness-row .is-missing { color: var(--ops-amber); }

.qa-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 21px;
  padding: 3px 7px;
  border-radius: 6px;
  color: #031014;
  background: var(--ops-cyan);
  font-size: 0.7rem;
  font-weight: 500;
  white-space: nowrap;
}

.qa-status-success { background: rgba(84, 241, 166, 0.88); }
.qa-status-warning { color: #221700; background: rgba(251, 191, 36, 0.9); }
.qa-status-danger { color: #fff; background: rgba(255, 107, 122, 0.56); }
.qa-status-primary { color: #bfdbff; background: rgba(59, 130, 246, 0.22); }

.qa-review-workspace {
  min-width: 0;
  position: relative;
  border: 1px solid rgba(118, 238, 255, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 34%),
    rgba(8, 20, 27, 0.76);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 20px 50px rgba(0, 0, 0, 0.28);
}

.qa-review-workspace .qa-error-banner {
  display: flex;
  gap: .65rem;
  margin: 0 12px 12px;
  padding: .7rem .85rem;
  color: #fff;
  border: 1px solid rgba(255, 107, 122, .78);
  border-left: 5px solid #ff6b7a;
  border-radius: 6px;
  background: rgba(142, 25, 43, .86);
}
.qa-item-selector-button.active,
.qa-item-selector-button:focus-visible {
  color: #031014 !important;
  border-color: rgba(103, 232, 249, .98) !important;
  background: linear-gradient(180deg, #75f0ff, #1fd3ee) !important;
  box-shadow: 0 0 0 2px rgba(40, 231, 255, .3), 0 0 20px rgba(40, 231, 255, .24);
}
.qa-item-selector-button { font-weight: 700; }
.qa-review-form [data-qa-item-workspace] {
  position: relative;
  z-index: 1;
}

/* Keep the native Repair billing rule menu above the following QA review grid.
   The grid is a later sibling and otherwise composites over the open menu. */
.qa-review-form [data-qa-item-workspace] .qa-item-panel {
  position: relative;
  z-index: 1;
}

.qa-review-form .qa-review-grid {
  position: relative;
  z-index: 0;
}
.qa-item-evidence-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.qa-item-thumbnails { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .35rem; }
.qa-item-thumbnail { width: 74px; height: 58px; padding: 0; overflow: hidden; border-radius: 5px; }
.qa-item-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
[data-p2p-theme="light"] .qa-review-workspace { background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(238,248,251,.78)), #f8fcfd !important; }
[data-p2p-theme="light"] .qa-review-workspace .qa-error-banner { color: #651525; border-color: rgba(190,66,85,.55); background: #fff0f2; }

/* Keep the validation state on the Frost surface even when the outcome tone
   class is applied after the workspace theme rules. */
[data-p2p-theme="light"] .qa-review-workspace.qa-review-tone-green,
[data-p2p-theme="light"] .qa-review-workspace.qa-review-tone-orange,
[data-p2p-theme="light"] .qa-review-workspace.qa-review-tone-red,
[data-p2p-theme="light"] .qa-review-workspace.qa-review-tone-neutral {
  background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(238,248,251,.78)), #f8fcfd !important;
}
[data-p2p-theme="light"] .qa-standalone-page.qa-review-tone-green,
[data-p2p-theme="light"] .qa-standalone-page.qa-review-tone-orange,
[data-p2p-theme="light"] .qa-standalone-page.qa-review-tone-red,
[data-p2p-theme="light"] .qa-standalone-page.qa-review-tone-neutral {
  background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(238,248,251,.78)), #f8fcfd !important;
}
[data-p2p-theme="light"] .qa-review-workspace .qa-error-banner,
[data-p2p-theme="auto"] .qa-review-workspace .qa-error-banner,
[data-p2p-theme="light"] .qa-standalone-page .qa-error-banner,
[data-p2p-theme="auto"] .qa-standalone-page .qa-error-banner {
  color: #651525 !important;
  border-color: rgba(190,66,85,.68) !important;
  background: #fff0f2 !important;
  box-shadow: 0 3px 12px rgba(131, 35, 51, .16);
}
.qa-review-workspace .report-error-field,
.qa-standalone-page .report-error-field {
  padding: 10px;
  border: 1px solid rgba(190, 66, 85, .68);
  border-radius: 8px;
  background: rgba(255, 240, 242, .78);
  box-shadow: 0 0 0 1px rgba(190, 66, 85, .12), 0 0 18px rgba(190, 66, 85, .12);
}
.qa-review-workspace .report-error-field .form-control,
.qa-review-workspace .report-error-field .form-select,
.qa-standalone-page .report-error-field .form-control,
.qa-standalone-page .report-error-field .form-select {
  border-color: #be4255 !important;
  box-shadow: 0 0 0 .18rem rgba(190, 66, 85, .16), 0 0 18px rgba(190, 66, 85, .12);
}
.qa-review-workspace .report-field-errors,
.qa-standalone-page .report-field-errors {
  margin-top: 6px;
  color: #8f263a;
  font-size: .92rem;
  font-weight: 750;
}
@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] .qa-review-workspace.qa-review-tone-green,
  [data-p2p-theme="auto"] .qa-review-workspace.qa-review-tone-orange,
  [data-p2p-theme="auto"] .qa-review-workspace.qa-review-tone-red,
  [data-p2p-theme="auto"] .qa-review-workspace.qa-review-tone-neutral {
    background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(238,248,251,.78)), #f8fcfd !important;
  }
  [data-p2p-theme="auto"] .qa-standalone-page.qa-review-tone-green,
  [data-p2p-theme="auto"] .qa-standalone-page.qa-review-tone-orange,
  [data-p2p-theme="auto"] .qa-standalone-page.qa-review-tone-red,
  [data-p2p-theme="auto"] .qa-standalone-page.qa-review-tone-neutral {
    background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(238,248,251,.78)), #f8fcfd !important;
  }
}

.qa-review-workspace::before,
.qa-standalone-page::before {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  border: 2px solid transparent;
  border-radius: inherit;
  opacity: 0;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.qa-standalone-page {
  position: relative;
  border-radius: 8px;
}

.qa-review-tone-green,
.qa-review-tone-orange,
.qa-review-tone-red,
.qa-review-tone-neutral {
  border-color: var(--qa-review-tone-color, rgba(118, 238, 255, 0.28));
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--qa-review-tone-color, var(--map-zone)) 10%, transparent), rgba(7, 18, 25, 0.76)),
    rgba(7, 18, 25, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 18px 42px rgba(0, 0, 0, 0.34),
    0 0 0 1px color-mix(in srgb, var(--qa-review-tone-color, var(--map-zone)) 24%, transparent),
    0 0 30px color-mix(in srgb, var(--qa-review-tone-color, var(--map-zone)) 18%, transparent);
}

.qa-review-tone-green {
  --qa-review-tone-color: var(--status-scheduled);
}

.qa-review-tone-orange {
  --qa-review-tone-color: var(--status-no-coverage);
}

.qa-review-tone-red {
  --qa-review-tone-color: var(--status-capacity);
}

.qa-review-tone-neutral {
  --qa-review-tone-color: var(--map-zone);
}

.qa-review-tone-green::before,
.qa-review-tone-orange::before,
.qa-review-tone-neutral::before,
.qa-review-tone-red::before {
  border-color: color-mix(in srgb, var(--qa-review-tone-color, var(--map-zone)) 72%, transparent);
  box-shadow: inset 0 2px 0 color-mix(in srgb, var(--qa-review-tone-color, var(--map-zone)) 54%, transparent);
  opacity: 1;
}

.qa-workspace-header {
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid rgba(118, 238, 255, 0.22);
  border-radius: 8px 8px 0 0;
  background: rgba(3, 12, 17, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.qa-workspace-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.qa-workspace-title-row h2 {
  margin: 0;
  font-size: 1.43rem;
  font-weight: 900;
}

.qa-so-link {
  color: var(--ops-cyan);
  text-decoration: none;
  text-shadow: none;
}

.qa-so-link:hover,
.qa-so-link:focus {
  color: #b8f5ff;
  text-decoration: underline;
}

.qa-workspace-nav {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.qa-workspace-page .btn:not(.qa-action),
.qa-standalone-page .btn:not(.qa-action) {
  border-width: 1px;
  transition: color var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.qa-workspace-page .btn-outline-primary:not(.qa-action),
.qa-standalone-page .btn-outline-primary:not(.qa-action) {
  color: var(--ops-cyan);
  border-color: rgba(40, 231, 255, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 52%),
    rgba(4, 14, 20, 0.42);
  box-shadow: 0 0 16px rgba(40, 231, 255, 0.1);
}

.qa-workspace-page .btn-outline-primary:not(.qa-action):hover,
.qa-workspace-page .btn-outline-primary:not(.qa-action):focus,
.qa-standalone-page .btn-outline-primary:not(.qa-action):hover,
.qa-standalone-page .btn-outline-primary:not(.qa-action):focus {
  color: #031014;
  border-color: rgba(103, 232, 249, 0.98);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.46), transparent 48%),
    linear-gradient(180deg, #75f0ff, #1fd3ee);
  box-shadow: 0 0 24px rgba(40, 231, 255, 0.36);
}

.qa-workspace-page .btn-outline-secondary:not(.qa-action),
.qa-standalone-page .btn-outline-secondary:not(.qa-action) {
  color: #c7e5ed;
  border-color: rgba(137, 168, 179, 0.5);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 52%),
    rgba(4, 14, 20, 0.36);
}

.qa-workspace-page .btn-outline-secondary:not(.qa-action):hover,
.qa-workspace-page .btn-outline-secondary:not(.qa-action):focus,
.qa-standalone-page .btn-outline-secondary:not(.qa-action):hover,
.qa-standalone-page .btn-outline-secondary:not(.qa-action):focus {
  color: #031014;
  border-color: rgba(103, 232, 249, 0.9);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent 48%),
    linear-gradient(180deg, #75f0ff, #1fd3ee);
  box-shadow: 0 0 22px rgba(40, 231, 255, 0.3);
}

.qa-workspace-page .btn-outline-danger:not(.qa-action),
.qa-standalone-page .btn-outline-danger:not(.qa-action) {
  color: #ff9aa6;
  border-color: rgba(255, 107, 122, 0.68);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 52%),
    rgba(52, 12, 20, 0.34);
  box-shadow: 0 0 14px rgba(255, 107, 122, 0.1);
}

.qa-workspace-page .btn-outline-danger:not(.qa-action):hover,
.qa-workspace-page .btn-outline-danger:not(.qa-action):focus,
.qa-standalone-page .btn-outline-danger:not(.qa-action):hover,
.qa-standalone-page .btn-outline-danger:not(.qa-action):focus {
  color: #22080b;
  border-color: rgba(255, 156, 167, 0.98);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.36), transparent 48%),
    linear-gradient(180deg, #ff9aa6, var(--ops-red));
  box-shadow: 0 0 24px rgba(255, 107, 122, 0.34);
}

.qa-position {
  color: var(--ops-muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.qa-review-form {
  display: grid;
  gap: 0;
}

.qa-progress-rail {
  position: sticky;
  top: 4.75rem;
  z-index: 1090;
  isolation: isolate;
  margin: 0 8px 8px;
  padding: 6px 10px 8px;
  color: #9fbcc5;
  border: 1px solid rgba(113, 176, 190, 0.42);
  border-top: 0;
  border-radius: 0 0 6px 6px;
  background: #27343b;
  box-shadow:
    inset 0 -1px 0 rgba(118, 238, 255, 0.12),
    0 9px 16px rgba(0, 0, 0, 0.3);
}

.qa-progress-rail-summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.qa-progress-rail-summary strong {
  color: #8fd4e2;
  font-size: 0.88rem;
}

.qa-progress-milestones {
  position: relative;
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding: 0;
  list-style: none;
}

.qa-progress-milestones::before,
.qa-progress-milestones::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 0;
  height: 2px;
  border-radius: 999px;
}

.qa-progress-milestones::before {
  right: 0;
  background: rgba(132, 177, 189, 0.34);
}

.qa-progress-milestones::after {
  width: var(--qa-progress-percent);
  max-width: 100%;
  background: rgba(54, 174, 111, 0.78);
}

.qa-progress-milestone {
  position: relative;
  z-index: 1;
  display: grid;
  flex: 1 1 0;
  min-width: 0;
  justify-items: center;
  color: #819da6;
  font-size: 0.65rem;
  line-height: 1.15;
  text-align: center;
}

.qa-progress-dot {
  display: inline-flex;
  width: 12px;
  height: 12px;
  align-items: center;
  justify-content: center;
  margin-bottom: 3px;
  border: 2px solid #718d96;
  border-radius: 50%;
  color: #071219;
  background: #0d2029;
  font-size: 0.56rem;
  font-weight: 900;
}

.qa-progress-milestone-label { font-weight: 850; }
.qa-progress-milestone-detail { min-height: 0.75rem; color: inherit; font-size: 0.61rem; }
.qa-progress-milestone.is-complete { color: #87d6a9; }
.qa-progress-milestone.is-complete .qa-progress-dot { border-color: #35b970; color: #062114; background: #43c981; }
.qa-progress-milestone.is-current { color: #9ee6f1; }
.qa-progress-milestone.is-current .qa-progress-dot { border-color: #43d0e6; box-shadow: 0 0 0 2px rgba(67, 208, 230, 0.2); }
.qa-progress-milestone.is-attention { color: #e7b265; }
.qa-progress-milestone.is-attention .qa-progress-dot { border-color: #d79a43; color: #ffe0a8; background: rgba(118, 74, 24, 0.82); }
.qa-progress-milestone.is-blocked { color: #ef8c98; }
.qa-progress-milestone.is-blocked .qa-progress-dot { border-color: #d95768; color: #ffd8de; background: rgba(120, 32, 47, 0.84); }
.qa-progress-rail.is-complete .qa-progress-rail-summary strong { color: #6ee6a0; }

[data-p2p-theme="light"] .qa-progress-rail {
  color: #456574;
  border-color: rgba(55, 111, 136, 0.42);
  background: #dce5e8;
  box-shadow:
    inset 0 -1px 0 rgba(8, 127, 157, 0.12),
    0 9px 16px rgba(31, 58, 72, 0.14);
}
[data-p2p-theme="light"] .qa-progress-rail-summary strong,
[data-p2p-theme="light"] .qa-progress-milestone.is-current { color: #087f98; }
[data-p2p-theme="light"] .qa-progress-milestones::before { background: rgba(55, 111, 136, 0.28); }
[data-p2p-theme="light"] .qa-progress-milestones::after { background: rgba(36, 145, 91, 0.76); }
[data-p2p-theme="light"] .qa-progress-milestone { color: #66828e; }
[data-p2p-theme="light"] .qa-progress-dot { border-color: #66828e; background: #f7fbfc; }
[data-p2p-theme="light"] .qa-progress-milestone.is-complete { color: #23754b; }
[data-p2p-theme="light"] .qa-progress-milestone.is-complete .qa-progress-dot { border-color: #258752; color: #f5fff8; background: #2fa866; }
[data-p2p-theme="light"] .qa-progress-milestone.is-attention { color: #8a5817; }
[data-p2p-theme="light"] .qa-progress-milestone.is-blocked { color: #a9374a; }
[data-p2p-theme="light"] .qa-progress-rail.is-complete .qa-progress-rail-summary strong { color: #23754b; }

@media (max-width: 767.98px) {
  .qa-progress-rail { margin: 0 6px 6px; padding: 6px 7px 7px; }
  .qa-progress-milestone { font-size: 0.58rem; }
  .qa-progress-milestone-detail { display: none; }
}

.qa-review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 8px;
  padding: 8px;
  border: 0;
  background: transparent;
}

#qa-report-review {
  scroll-margin-top: 5rem;
}

#id_client_reference_number {
  scroll-margin-top: 8rem;
}

.qa-review-column {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.qa-review-card {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 10px;
  border-color: rgba(118, 238, 255, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 48%),
    rgba(7, 18, 25, 0.64);
}

.qa-card-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.qa-closure-card {
  align-self: start;
  padding: 5px 10px;
}

.qa-checklist {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 14px;
}

.qa-checklist-row {
  display: inline-flex;
  align-items: center;
  color: var(--ops-muted);
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.15;
}

.qa-checklist-row span {
  display: inline;
  font-weight: inherit;
}

.qa-checklist-row.is-complete { color: var(--ops-green); }
.qa-checklist-row.is-missing { color: var(--ops-amber); }

.qa-form-grid {
  display: grid;
  gap: 8px;
}

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

.qa-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));
  gap: 8px 10px;
}

.qa-photo-dropzone-compact {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px;
}

.qa-photo-dropzone-compact .text-secondary {
  display: none;
}

.qa-review-card .form-label {
  margin-bottom: 3px;
  font-size: 0.78rem;
}

.qa-review-card textarea.form-control {
  min-height: 72px;
}

.qa-review-card #id_notes {
  min-height: 44px;
}

.qa-notes-card {
  align-self: start;
  gap: 5px;
  padding-top: 7px;
  padding-bottom: 7px;
}

.qa-notes-field {
  margin-bottom: 0;
}

.qa-parts-card {
  align-self: start;
  gap: 6px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.qa-parts-card h3 {
  margin-bottom: 0;
}

.qa-parts-card .qa-form-grid-two {
  gap: 8px;
}

.qa-parts-card .qa-pay-row {
  grid-template-columns: 0.9fr 1fr 1fr 0.9fr;
  gap: 8px 12px;
  margin-top: 8px !important;
}

.qa-parts-card .qa-pay-row p {
  margin-bottom: 2px;
  line-height: 1.05;
}

.qa-parts-card .form-text {
  line-height: 1.25;
}

.qa-parts-card #qa-pay-help {
  margin-top: 4px !important;
}

.qa-instructions-block {
  padding: 8px;
  border: 1px solid rgba(118, 238, 255, 0.12);
  border-radius: 6px;
  background: rgba(3, 12, 17, 0.38);
}

.qa-action-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin: 16px 8px 8px;
  padding: 0;
}

.qa-action {
  min-height: 0;
  display: grid;
  grid-template-columns: 24px auto;
  align-items: center;
  justify-items: start;
  gap: 7px;
  padding: 7px 10px;
  border-width: 1px;
  border-radius: 6px;
  text-align: left;
  font-weight: 850;
  line-height: 1.15;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

.qa-action-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: currentColor;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
}

.qa-action-approve .qa-action-icon {
  border: 2px solid currentColor;
  border-radius: 999px;
  font-size: 0.95rem;
}

.qa-action-copy {
  display: grid;
  gap: 1px;
}

.qa-action-copy > span {
  font-size: 0.78rem;
  font-weight: 900;
}

.qa-action small {
  color: rgba(213, 229, 233, 0.7);
  font-size: 0.67rem;
  font-weight: 700;
}

.qa-action:hover,
.qa-action:focus {
  color: currentColor;
  transform: translateY(-1px);
  border-color: currentColor;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 6px 14px rgba(0, 0, 0, 0.24),
    0 0 0 1px color-mix(in srgb, currentColor 32%, transparent),
    0 0 12px color-mix(in srgb, currentColor 18%, transparent);
}

.qa-action:hover small,
.qa-action:focus small {
  color: rgba(255, 255, 255, 0.86);
}

.qa-action-approve {
  color: #70c99b;
  border-color: rgba(112, 201, 155, 0.62);
  background: rgba(42, 100, 74, 0.28);
}

.qa-action-approve:hover,
.qa-action-approve:focus {
  color: #84d6ac;
  background: rgba(42, 100, 74, 0.38);
}

.qa-action.btn-outline-danger {
  color: #d1a363;
  border-color: rgba(209, 163, 99, 0.58);
  background: rgba(105, 76, 40, 0.24);
}

.qa-action.btn-outline-danger:hover,
.qa-action.btn-outline-danger:focus {
  color: #e0b473;
  background: rgba(105, 76, 40, 0.34);
}

.qa-action.btn-outline-secondary {
  color: #79b9c6;
  border-color: rgba(121, 185, 198, 0.58);
  background: rgba(45, 91, 101, 0.24);
}

.qa-action.btn-outline-secondary:hover,
.qa-action.btn-outline-secondary:focus {
  color: #91cad4;
  background: rgba(45, 91, 101, 0.34);
}

.qa-item-review-status {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.qa-reopen-item {
  padding: 3px 7px;
  color: #a8c7cf;
  border-color: rgba(126, 177, 188, 0.56);
  font-size: 0.72rem;
}

.qa-reopen-item:hover,
.qa-reopen-item:focus {
  color: #d2edf2;
  border-color: #82c5d2;
  background: rgba(73, 142, 155, 0.22);
}

.qa-empty-queue,
.qa-empty-workspace {
  display: grid;
  gap: 4px;
  padding: 18px;
}

@media (max-width: 1180px) {
  .qa-kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .qa-workspace-layout,
  .qa-review-grid {
    grid-template-columns: 1fr;
  }

  .qa-workspace-layout::before {
    display: none;
  }

  .qa-queue-panel {
    position: static;
    max-height: none;
  }
}

@media (max-width: 767.98px) {
  .qa-kpi-row,
  .qa-form-grid-two {
    grid-template-columns: 1fr;
  }

  .qa-action-bar { align-items: stretch; }

  .qa-workspace-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

.address-suggestions {
  position: absolute;
  z-index: 1050;
  width: min(100%, 720px);
  max-height: 240px;
  overflow-y: auto;
  background: var(--ops-panel);
  border: 1px solid rgba(40, 231, 255, 0.24);
}

.address-suggestions .list-group-item,
.list-group-item {
  color: var(--ops-text);
  background-color: rgba(15, 32, 43, 0.96);
  border-color: rgba(40, 231, 255, 0.14);
}

.address-suggestions .list-group-item:hover,
.list-group-item:hover {
  color: var(--ops-text);
  background-color: rgba(40, 231, 255, 0.1);
}

.validation-hint {
  min-height: 1.25rem;
}

.customer-history-callout {
  margin-top: 0.25rem;
}

.customer-history-callout.is-active {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--semantic-success-border);
  border-radius: 8px;
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--semantic-success-surface-strong), var(--semantic-success-surface));
  box-shadow: 0 0 0 1px var(--semantic-success-border), 0 0 24px var(--semantic-success-surface-strong);
}

.customer-history-callout.is-active #customer-history-status {
  margin: 0;
  color: var(--semantic-success-text) !important;
  font-weight: 700;
}

.customer-history-callout.is-active #customer-history-button {
  border-color: var(--semantic-success-border);
  color: var(--semantic-success-text);
  background: var(--semantic-success-surface);
}

.customer-history-callout.is-active #customer-history-button:hover,
.customer-history-callout.is-active #customer-history-button:focus {
  color: var(--semantic-success-button-text);
  background: var(--semantic-success-text);
  box-shadow: 0 0 18px var(--semantic-success-surface-strong);
}

/* Keep the office-create service-history dialog below the sticky application
   chrome and constrain tall result sets to a scrollable modal body. */
body:has(#customerHistoryModal.service-order-history-modal.show) .modal-backdrop {
  z-index: 1190;
}

#customerHistoryModal.service-order-history-modal {
  z-index: 1200;
  padding: clamp(1rem, 4vh, 2.5rem) 1rem 1rem !important;
}

#customerHistoryModal.service-order-history-modal .modal-dialog {
  width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0 auto;
}

#customerHistoryModal.service-order-history-modal .modal-content {
  max-height: 100%;
  overflow: hidden;
}

#customerHistoryModal.service-order-history-modal .modal-header {
  flex: 0 0 auto;
}

#customerHistoryModal.service-order-history-modal .modal-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.service-address-review-callout {
  padding: 0.95rem 1rem 1rem;
  border: 1px solid var(--semantic-warning-border);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--semantic-warning-surface-strong), var(--semantic-warning-surface));
  box-shadow: 0 0 0 1px var(--semantic-warning-border), 0 0 24px var(--semantic-warning-surface-strong);
}

.service-address-review-callout .form-label {
  color: var(--semantic-warning-text);
}

.service-address-review-callout #address-verification-status {
  color: var(--semantic-warning-text);
}

.historical-schedule-override {
  padding: 0.75rem;
  border: 1px solid var(--semantic-warning-border);
  border-radius: 8px;
  color: var(--text-primary);
  background: var(--semantic-warning-surface);
}

.historical-schedule-override-message {
  display: grid;
  gap: 0.15rem;
  color: var(--semantic-warning-text);
}

.historical-schedule-override-message span {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.media-dropzone {
  border: 2px dashed var(--semantic-info-border);
  border-radius: 8px;
  color: var(--text-primary);
  background: var(--semantic-info-surface);
  padding: 24px;
  text-align: center;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.media-dropzone.is-dragging,
.media-dropzone:focus {
  border-color: var(--ops-cyan);
  background: var(--semantic-info-surface-strong);
  box-shadow: 0 0 24px var(--semantic-info-surface-strong);
  outline: none;
}

.media-dropzone-title {
  color: var(--text-primary);
  font-weight: 600;
}

.media-dropzone .text-secondary {
  color: var(--text-secondary) !important;
}

.media-preview-list,
.media-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.media-preview-item,
.media-card {
  min-height: 96px;
  border: 1px solid rgba(40, 231, 255, 0.2);
  border-radius: 8px;
  background: rgba(15, 32, 43, 0.92);
  padding: 10px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: inherit;
  text-decoration: none;
  text-align: left;
}

.media-preview-item .btn {
  flex: 0 0 auto;
  align-self: center;
}

.media-card-shell {
  position: relative;
}

.media-card {
  width: 100%;
}

.media-card:hover {
  border-color: var(--ops-cyan);
  box-shadow: 0 0 20px rgba(40, 231, 255, 0.16);
}

.media-preview-item img,
.media-card img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
  background: rgba(137, 168, 179, 0.16);
}

.media-preview-meta {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 2px;
}

.media-preview-meta .text-truncate {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.2;
}

.media-file-icon {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(40, 231, 255, 0.11);
  border: 1px solid rgba(40, 231, 255, 0.2);
  color: #a5f3fc;
  font-weight: 700;
  font-size: 0.85rem;
}

.media-modal-frame {
  max-height: 75vh;
  overflow: auto;
  border: 1px solid rgba(40, 231, 255, 0.16);
  border-radius: 8px;
  background: rgba(3, 12, 17, 0.8);
  text-align: center;
}

.media-modal-image {
  max-width: 100%;
  height: auto;
  object-fit: contain;
  transform-origin: center top;
  transition: transform 0.14s ease;
}

.service-order-item-list {
  display: grid;
  gap: 0.5rem;
}

.service-order-item-row {
  display: grid;
  grid-template-columns: minmax(72px, auto) minmax(0, 1fr) minmax(180px, auto);
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.75rem 0.875rem;
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--ops-border);
  border-radius: 0.5rem;
  background: var(--ops-panel);
}

.service-order-item-row:hover,
.service-order-item-row:focus-visible {
  color: inherit;
  border-color: var(--ops-cyan);
  box-shadow: 0 0 0 0.2rem rgba(40, 231, 255, 0.12);
}

.service-order-item-sequence {
  color: var(--ops-muted);
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
}

.service-order-item-summary,
.service-order-item-status {
  min-width: 0;
}

.service-order-item-status {
  display: grid;
  gap: 0.15rem;
  text-align: right;
}

.service-order-item-row-removed {
  opacity: 0.7;
  border-style: dashed;
}

.service-order-removed-items summary {
  color: var(--ops-muted);
  cursor: pointer;
  font-size: 0.875rem;
}

.service-order-item-modal-content {
  max-height: calc(100vh - 2rem);
}

.service-order-item-editor-body {
  overflow-y: auto;
  overscroll-behavior: contain;
}

.service-order-item-editor-page .modal-body {
  overflow: visible;
}

.service-order-form-item-list {
  display: grid;
  gap: 0.75rem;
}

.service-order-form-item-link {
  display: grid;
  gap: 0.15rem;
  padding: 0.75rem 0.875rem;
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--ops-border);
  border-radius: 0.5rem;
  background: var(--ops-panel);
}

.service-order-form-item-link:hover,
.service-order-form-item-link:focus-visible {
  color: inherit;
  border-color: var(--ops-cyan);
}

.service-order-form-item-link small {
  color: var(--ops-muted);
}

@media (max-width: 767.98px) {
  .service-order-item-row {
    grid-template-columns: minmax(62px, auto) minmax(0, 1fr);
  }

  .service-order-item-status {
    grid-column: 2;
    text-align: left;
  }
}

.media-delete-form {
  margin-top: 6px;
}

.history-report-preview {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--ops-text);
  background: rgba(4, 12, 18, 0.58);
  border: 1px solid rgba(40, 231, 255, 0.16);
  border-radius: 6px;
  padding: 10px;
}

.report-edit-history {
  border-top: 1px solid rgba(40, 231, 255, 0.14);
  color: var(--ops-muted);
}

.history-quick-facts {
  display: grid;
  grid-template-columns: minmax(140px, auto) 1fr;
  gap: 4px 12px;
  font-size: 0.9rem;
}

.history-quick-facts dt {
  color: var(--ops-muted);
  font-weight: 600;
}

.history-quick-facts dd {
  margin-bottom: 0;
}

.export-check-panel {
  max-height: 220px;
  overflow: auto;
  border: 1px solid rgba(40, 231, 255, 0.18);
  border-radius: 8px;
  padding: 8px;
  background: rgba(4, 12, 18, 0.28);
}

.export-column-picker {
  max-height: 170px;
  overflow: auto;
  padding-right: 4px;
}

.export-section .export-check-panel {
  max-height: 230px;
}

.export-section .export-column-picker {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

/* Dispatch Command Center */
.command-center {
  display: grid;
  gap: 20px;
  padding: 10px 18px 4px;
}

.command-header,
.command-actions,
.command-kpi,
.command-panel-header,
.command-alert,
.command-map-footer,
.command-summary-list div,
.command-activity-list a {
  display: flex;
  align-items: center;
}

.command-header {
  position: relative;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 2px;
}

.command-header h1 {
  margin: 0 0 6px;
  color: #f4fbff;
  font-size: clamp(1.8rem, 2.4vw, 2.25rem);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.05;
  text-shadow: none;
}

.command-header p {
  margin: 0;
  color: rgba(230, 247, 251, 0.88);
  font-size: 1.04rem;
  line-height: 1.35;
}

.command-actions {
  column-gap: 36px;
  row-gap: 12px;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
}

.calendar-navigation-group {
  padding: 5px;
  border: 1px solid rgba(118, 238, 255, 0.38);
  border-radius: 9px;
  background: rgba(5, 13, 18, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 4px 12px rgba(0, 0, 0, 0.14);
}

.command-date-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border: 1px solid rgba(118, 238, 255, 0.16);
  border-radius: 7px;
  background: rgba(5, 13, 18, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.command-date-nav .btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding-inline: 13px;
}

.command-date-form {
  position: relative;
  width: 210px;
}

.command-date-form .form-control {
  min-height: 40px;
  padding-left: 48px;
  border-color: rgba(118, 238, 255, 0.22);
  color: var(--ops-text);
  background: rgba(5, 13, 18, 0.72);
}

.command-field-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  color: var(--ops-text);
  transform: translateY(-50%);
  pointer-events: none;
}

.command-refresh {
  min-height: 52px;
  min-width: 138px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.98rem;
  font-weight: 750;
}

.command-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
}

.command-kpi-context {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  white-space: nowrap;
}

.command-kpi-context h2 {
  margin: 0;
  color: var(--ops-cyan);
  font-size: clamp(1.8rem, 2.4vw, 2.25rem);
  font-weight: 850;
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-shadow: none;
}

.command-kpi,
.command-panel {
  border: 1px solid rgba(118, 238, 255, 0.16);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.052), transparent 54%), rgba(7, 18, 25, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 18px 46px rgba(0, 0, 0, 0.22);
}

.command-kpi {
  position: relative;
  height: 141px;
  min-height: 141px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 22px 15px;
  color: var(--ops-text);
  overflow: hidden;
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 22px 48px rgba(0, 0, 0, 0.32),
    0 0 28px rgba(40, 231, 255, 0.04);
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.command-kpi:hover,
.command-kpi:focus,
.command-alert:hover,
.command-alert:focus,
.command-activity-list a:hover,
.command-activity-list a:focus {
  color: var(--ops-text);
  border-color: rgba(40, 231, 255, 0.42);
}

.command-kpi:hover,
.command-kpi:focus {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 28px 58px rgba(0, 0, 0, 0.38),
    0 0 30px color-mix(in srgb, currentColor 14%, transparent);
}

.command-kpi::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background: radial-gradient(circle at 86% 20%, currentColor, transparent 36%);
}

.command-kpi strong {
  display: block;
  color: currentColor;
  font-size: 2.55rem;
  font-weight: 850;
  line-height: 1;
}

.command-kpi span:not(.command-kpi-icon) {
  display: block;
  margin-top: 6px;
  color: #fff;
  font-size: 1.07rem;
  font-weight: 760;
  line-height: 1.16;
}

.command-kpi small {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding-top: 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: currentColor;
  font-size: 0.96rem;
  font-weight: 750;
  line-height: 1.1;
}

.command-kpi-icon,
.command-alert-icon,
.command-summary-icon,
.command-activity-icon {
  position: relative;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border: 2px solid currentColor;
}

.command-kpi-icon {
  width: 44px;
  height: 44px;
  opacity: 0.9;
  filter: none;
}

.command-icon-calendar { border-radius: 6px; }
.command-icon-calendar::before { content: ""; width: 18px; height: 15px; border-top: 5px solid currentColor; border-bottom: 2px solid currentColor; }
.command-icon-clock { border-radius: 999px; }
.command-icon-clock::before { content: ""; width: 11px; height: 11px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translate(2px, -2px); }
.command-icon-map { border-radius: 4px; transform: skewY(-8deg); }
.command-icon-house-question {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  filter: none;
}

.command-icon-house-question::before {
  content: "";
  position: absolute;
  inset: 3px 2px 2px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='M6 23 24 8l18 15v18a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3V23Z' fill='none' stroke='black' stroke-width='5' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='M6 23 24 8l18 15v18a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3V23Z' fill='none' stroke='black' stroke-width='5' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.command-icon-house-question::after {
  content: "?";
  position: absolute;
  left: 50%;
  top: 57%;
  transform: translate(-50%, -50%);
  color: currentColor;
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
}
.command-icon-route {
  border: 0;
  border-radius: 0;
  filter: none;
}
.command-icon-route svg {
  width: 44px;
  height: 44px;
  fill: none;
  stroke: currentColor;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.command-icon-route .command-route-line {
  stroke-dasharray: 5 6;
}
.command-icon-users { border-radius: 999px; }
.command-icon-users::before { content: ""; width: 22px; height: 12px; border: 2px solid currentColor; border-top: 0; border-radius: 0 0 16px 16px; }
.command-icon-person {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.command-icon-person::before {
  content: "";
  position: absolute;
  inset: 3px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='M24 6c5.2 0 9.5 4.1 9.5 9.2 0 5.2-4.3 9.5-9.5 9.5s-9.5-4.3-9.5-9.5C14.5 10.1 18.8 6 24 6Zm0 22c8 0 14.5 4.5 16 11.1.4 1.7-.9 2.9-2.5 2.9h-27c-1.6 0-2.9-1.2-2.5-2.9C9.5 32.5 16 28 24 28Z' fill='black'/%3E%3Cpath d='M13 11.5C15.1 6.8 18.6 4 24 4s8.9 2.8 11 7.5H13Z' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='M24 6c5.2 0 9.5 4.1 9.5 9.2 0 5.2-4.3 9.5-9.5 9.5s-9.5-4.3-9.5-9.5C14.5 10.1 18.8 6 24 6Zm0 22c8 0 14.5 4.5 16 11.1.4 1.7-.9 2.9-2.5 2.9h-27c-1.6 0-2.9-1.2-2.5-2.9C9.5 32.5 16 28 24 28Z' fill='black'/%3E%3Cpath d='M13 11.5C15.1 6.8 18.6 4 24 4s8.9 2.8 11 7.5H13Z' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
}

.command-icon-person::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.75;
}
.command-icon-alert { border-radius: 999px; }
.command-icon-alert::before {
  content: "";
  width: 24px;
  height: 22px;
  background: currentColor;
  clip-path: polygon(50% 0, 100% 100%, 0 100%, 50% 0, 50% 14%, 23% 86%, 77% 86%, 50% 14%);
}
.command-icon-alert::after {
  content: "!";
  position: absolute;
  left: 50%;
  top: 51%;
  transform: translate(-50%, -50%);
  color: currentColor;
  font-size: 17px;
  font-weight: 950;
  line-height: 1;
}
.command-icon-alert.command-kpi-icon::before {
  width: 26px;
  height: 24px;
}
.command-icon-alert.command-alert-icon::before {
  width: 19px;
  height: 17px;
}
.command-icon-alert.command-alert-icon::after {
  font-size: 13px;
}
.command-icon-star { clip-path: polygon(50% 0, 61% 34%, 98% 35%, 68% 56%, 79% 91%, 50% 70%, 21% 91%, 32% 56%, 2% 35%, 39% 34%); background: currentColor; border: 0; }
.command-icon-shield {
  border-radius: 13px 13px 18px 18px;
}

.command-icon-shield::before {
  content: "!";
  width: auto;
  height: auto;
  color: currentColor;
  font-size: 1.08em;
  font-weight: 900;
  line-height: 1;
}

.command-icon-shield::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 7px;
  height: 7px;
  border: 2px solid currentColor;
  border-radius: 999px;
  background: rgba(5, 13, 18, 0.82);
}
.command-icon-search { border-radius: 999px; }
.command-icon-search::after { content: ""; width: 10px; height: 2px; background: currentColor; transform: translate(15px, 14px) rotate(45deg); }
.command-icon-qa {
  border-width: 3px;
  border-radius: 999px;
  background: transparent;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-weight: 950;
}
.command-icon-qa::before {
  content: "A";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -48%);
  color: currentColor;
  font-size: 13px;
  font-weight: 950;
  line-height: 1;
}
.command-icon-qa::after {
  content: "";
  width: 10px;
  height: 3px;
  background: currentColor;
  transform: translate(15px, 14px) rotate(45deg);
}
.command-icon-inbox::before {
  content: "";
  width: 19px;
  height: 13px;
  border: 2px solid currentColor;
  border-radius: 3px;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.12);
}
.command-icon-inbox::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 5px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 5px 5px;
  transform: translateY(3px);
}
.command-icon-checklist::before {
  content: "";
  width: 16px;
  height: 20px;
  border: 2px solid currentColor;
  border-radius: 2px;
}
.command-icon-checklist::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 5px 0 currentColor, 0 10px 0 currentColor;
  transform: translateX(2px);
}
.command-icon-route::before {
  content: "";
  width: 17px;
  height: 17px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  border-radius: 0 0 0 9px;
  transform: translate(-2px, 1px);
}
.command-icon-route::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border: 2px solid currentColor;
  border-radius: 999px;
  transform: translate(8px, -8px);
  box-shadow: -14px 14px 0 -2px rgba(7, 18, 25, 0.82), -14px 14px 0 0 currentColor;
}
.command-icon-list { border-radius: 6px; }
.command-icon-list::before { content: ""; width: 18px; height: 14px; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; box-shadow: 0 6px 0 currentColor; }
.command-icon-target { border-radius: 999px; }
.command-icon-gauge { border-radius: 999px 999px 4px 4px; }

.command-tone-cyan { --command-tone-color: var(--map-zone); color: var(--command-tone-color); background-color: rgba(0, 147, 163, 0.12); border-color: rgba(40, 231, 255, 0.22); }
.command-tone-amber, .command-tone-yellow { --command-tone-color: var(--status-unscheduled); color: var(--command-tone-color); background-color: rgba(255, 228, 92, 0.12); border-color: rgba(255, 228, 92, 0.32); }
.command-tone-orange { --command-tone-color: var(--status-no-coverage); color: var(--command-tone-color); background-color: rgba(255, 138, 0, 0.12); border-color: rgba(255, 138, 0, 0.26); }
.command-tone-blue { --command-tone-color: var(--status-routing); color: var(--command-tone-color); background-color: rgba(59, 130, 246, 0.12); border-color: rgba(59, 130, 246, 0.24); }
.command-tone-red { --command-tone-color: var(--status-capacity); color: var(--command-tone-color); background-color: rgba(255, 64, 80, 0.12); border-color: rgba(255, 64, 80, 0.26); }
.command-tone-violet { --command-tone-color: var(--status-vip); color: var(--command-tone-color); background-color: rgba(192, 132, 252, 0.12); border-color: rgba(192, 132, 252, 0.24); }
.command-tone-gold { --command-tone-color: #f8b400; color: var(--command-tone-color); background-color: rgba(248, 180, 0, 0.12); border-color: rgba(248, 180, 0, 0.24); }
.command-tone-green { --command-tone-color: var(--status-scheduled); color: var(--command-tone-color); background-color: rgba(84, 241, 166, 0.12); border-color: rgba(84, 241, 166, 0.24); }
.command-tone-neutral { --command-tone-color: var(--ops-muted); color: var(--command-tone-color); background-color: rgba(148, 163, 174, 0.1); border-color: rgba(148, 163, 174, 0.24); }

.command-kpi.command-tone-cyan { background-color: rgba(0, 147, 163, 0.06); }
.command-kpi.command-tone-amber,
.command-kpi.command-tone-yellow { background-color: rgba(255, 228, 92, 0.06); }
.command-kpi.command-tone-orange { background-color: rgba(255, 138, 0, 0.06); }
.command-kpi.command-tone-blue { background-color: rgba(59, 130, 246, 0.06); }
.command-kpi.command-tone-red { background-color: rgba(255, 64, 80, 0.06); }
.command-kpi.command-tone-violet { background-color: rgba(192, 132, 252, 0.06); }
.command-kpi.command-tone-gold { background-color: rgba(248, 180, 0, 0.06); }
.command-kpi.command-tone-green { background-color: rgba(84, 241, 166, 0.06); }
.command-kpi.command-tone-neutral { background-color: rgba(148, 163, 174, 0.06); }

/* Midnight KPI refinement: keep each established semantic hue, but let the
   shared dark surface do most of the visual work. QA Review is the reference:
   an accent identifies meaning without turning every card into a light source. */
[data-p2p-theme="dark"] .command-kpi {
  border-color: color-mix(in srgb, currentColor 18%, var(--panel-border));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 54%),
    rgba(7, 18, 25, 0.86);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 16px 32px rgba(0, 0, 0, 0.2);
}

[data-p2p-theme="dark"] .command-kpi::before {
  display: none;
}

[data-p2p-theme="dark"] .command-kpi:hover,
[data-p2p-theme="dark"] .command-kpi:focus {
  border-color: color-mix(in srgb, currentColor 32%, var(--panel-border-strong));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 20px 38px rgba(0, 0, 0, 0.26);
}

[data-p2p-theme="dark"] .dispatch-workflow-card.accounting-kpi-card {
  border-color: color-mix(in srgb, currentColor 20%, var(--panel-border));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 58%),
    rgba(7, 16, 22, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

/* Keep the established semantic families, but pull their Midnight luminance
   toward the base surface so foreground detail stays crisp instead of glowing. */
[data-p2p-theme="dark"] .command-center .command-tone-cyan { --command-tone-color: color-mix(in srgb, var(--map-zone) 75%, var(--ops-bg)); }
[data-p2p-theme="dark"] .command-center .command-tone-amber,
[data-p2p-theme="dark"] .command-center .command-tone-yellow { --command-tone-color: color-mix(in srgb, var(--status-unscheduled) 75%, var(--ops-bg)); }
[data-p2p-theme="dark"] .command-center .command-tone-orange { --command-tone-color: color-mix(in srgb, var(--status-no-coverage) 75%, var(--ops-bg)); }
[data-p2p-theme="dark"] .command-center .command-tone-blue { --command-tone-color: color-mix(in srgb, var(--status-routing) 75%, var(--ops-bg)); }
[data-p2p-theme="dark"] .command-center .command-tone-red { --command-tone-color: color-mix(in srgb, var(--status-capacity) 75%, var(--ops-bg)); }
[data-p2p-theme="dark"] .command-center .command-tone-violet { --command-tone-color: color-mix(in srgb, var(--status-vip) 75%, var(--ops-bg)); }
[data-p2p-theme="dark"] .command-center .command-tone-gold { --command-tone-color: color-mix(in srgb, #f8b400 75%, var(--ops-bg)); }
[data-p2p-theme="dark"] .command-center .command-tone-green { --command-tone-color: color-mix(in srgb, var(--status-scheduled) 75%, var(--ops-bg)); }
[data-p2p-theme="dark"] .command-center .command-tone-neutral { --command-tone-color: color-mix(in srgb, var(--ops-muted) 75%, var(--ops-bg)); }

[data-p2p-theme="dark"] .command-center .command-tone-cyan,
[data-p2p-theme="dark"] .command-center .command-tone-amber,
[data-p2p-theme="dark"] .command-center .command-tone-yellow,
[data-p2p-theme="dark"] .command-center .command-tone-orange,
[data-p2p-theme="dark"] .command-center .command-tone-blue,
[data-p2p-theme="dark"] .command-center .command-tone-red,
[data-p2p-theme="dark"] .command-center .command-tone-violet,
[data-p2p-theme="dark"] .command-center .command-tone-gold,
[data-p2p-theme="dark"] .command-center .command-tone-green,
[data-p2p-theme="dark"] .command-center .command-tone-neutral {
  background-color: transparent;
}

[data-p2p-theme="dark"] .command-center .command-alert-count,
[data-p2p-theme="dark"] .command-center .command-alert-count-zero {
  color: var(--command-tone-color);
  background: rgba(7, 18, 25, 0.86);
  border-color: color-mix(in srgb, var(--command-tone-color) 32%, var(--panel-border));
  box-shadow: none;
}

[data-p2p-theme="dark"] .command-center .command-alert-clear .command-alert-icon,
[data-p2p-theme="dark"] .command-center .command-alert-clear .command-alert-chevron,
[data-p2p-theme="dark"] .command-center .command-alert-clear .command-alert-copy strong,
[data-p2p-theme="dark"] .command-center .command-alert-clear .command-alert-copy small {
  color: color-mix(in srgb, var(--status-scheduled) 75%, var(--ops-bg));
}

[data-p2p-theme="dark"] .dispatch-workflow-card.accounting-kpi-card.dispatch-card-tone-green { color: color-mix(in srgb, var(--status-scheduled) 75%, var(--ops-bg)); }
[data-p2p-theme="dark"] .dispatch-workflow-card.accounting-kpi-card.dispatch-card-tone-amber,
[data-p2p-theme="dark"] .dispatch-workflow-card.accounting-kpi-card.dispatch-card-tone-yellow { color: color-mix(in srgb, var(--status-unscheduled) 75%, var(--ops-bg)); }
[data-p2p-theme="dark"] .dispatch-workflow-card.accounting-kpi-card.dispatch-card-tone-blue,
[data-p2p-theme="dark"] .dispatch-workflow-card.accounting-kpi-card.dispatch-card-tone-primary { color: color-mix(in srgb, var(--status-routing) 75%, var(--ops-bg)); }
[data-p2p-theme="dark"] .dispatch-workflow-card.accounting-kpi-card.dispatch-card-tone-red,
[data-p2p-theme="dark"] .dispatch-workflow-card.accounting-kpi-card.dispatch-card-tone-danger { color: color-mix(in srgb, var(--status-capacity) 75%, var(--ops-bg)); }
[data-p2p-theme="dark"] .dispatch-workflow-card.accounting-kpi-card.dispatch-card-tone-orange { color: color-mix(in srgb, var(--status-no-coverage) 75%, var(--ops-bg)); }
[data-p2p-theme="dark"] .dispatch-workflow-card.accounting-kpi-card.dispatch-card-tone-violet,
[data-p2p-theme="dark"] .dispatch-workflow-card.accounting-kpi-card.dispatch-card-tone-warning { color: color-mix(in srgb, var(--status-vip) 75%, var(--ops-bg)); }
[data-p2p-theme="dark"] .dispatch-workflow-card.accounting-kpi-card.dispatch-card-tone-cyan,
[data-p2p-theme="dark"] .dispatch-workflow-card.accounting-kpi-card.dispatch-card-tone-success { color: color-mix(in srgb, var(--map-zone) 75%, var(--ops-bg)); }

[data-p2p-theme="dark"] .dispatch-workflow-card.accounting-kpi-card .dispatch-card-divider {
  background: color-mix(in srgb, currentColor 9%, transparent);
}

[data-p2p-theme="dark"] .dispatch-workflow-card.accounting-kpi-card:hover,
[data-p2p-theme="dark"] .dispatch-workflow-card.accounting-kpi-card:focus {
  border-color: color-mix(in srgb, currentColor 34%, var(--panel-border-strong));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 34px rgba(0, 0, 0, 0.26);
}

/* Technician Opportunity Dashboard */
.opportunity-dashboard {
  max-width: 1983px;
  margin: 0 auto;
  padding: 28px 18px 38px;
}

.opportunity-dashboard-header {
  max-width: 760px;
  margin-bottom: 26px;
}

.opportunity-dashboard-kicker {
  margin: 0 0 8px;
  color: var(--action-primary);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.opportunity-dashboard-header h1 {
  margin: 0 0 8px;
  color: var(--text-primary);
  font-size: clamp(2rem, 4vw, 2.7rem);
  font-weight: 800;
  line-height: 1.08;
}

.opportunity-dashboard-header > p:not(.opportunity-dashboard-kicker) {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1.05rem;
}
.opportunity-experience-switch { margin-top: 12px; }

.opportunity-dashboard-subtitle {
  margin-top: 13px !important;
  color: var(--text-primary) !important;
  font-size: 0.94rem !important;
  font-weight: 650;
}

.opportunity-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(0, 1.12fr) repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 14px;
  width: 100%;
  margin-inline: auto;
}

.opportunity-card {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 319px;
  padding: 18px 18px 52px;
  overflow: visible;
  border: 1px solid var(--panel-border);
  border-radius: var(--panel-radius);
  background: var(--panel-background);
  box-shadow: var(--panel-shadow);
  color: var(--text-primary);
  text-decoration: none;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.opportunity-card:hover,
.opportunity-card:focus {
  color: var(--text-primary);
  transform: translateY(-2px);
  border-color: currentColor;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
}

.opportunity-card:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 3px;
}

.opportunity-card-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  color: currentColor;
}

.opportunity-card-icon svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.opportunity-card-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
}

.opportunity-card-heading {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 38px;
}

.opportunity-card-label {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
}

.opportunity-card-primary-value {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  color: currentColor;
  font-size: 1.38rem;
  line-height: 1.1;
}

.opportunity-card-primary-value strong {
  font-weight: 850;
}

.opportunity-card-estimate {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 100%;
  margin-left: auto;
  color: currentColor;
  font-size: 0.58em;
  font-weight: 750;
}

.opportunity-card-estimate > span {
  color: var(--text-secondary);
}

.opportunity-card-amount {
  color: currentColor;
  font-size: 1.69rem;
  white-space: nowrap;
}

.opportunity-card-zero-state {
  margin-top: 7px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 650;
}

.opportunity-card-hours {
  margin-top: 7px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 650;
}

.opportunity-card-unavailable {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 650;
  line-height: 1.25;
}

.opportunity-card-message {
  margin-top: 13px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.35;
}

.opportunity-card small {
  margin-top: auto;
  padding-top: 10px;
  color: var(--text-secondary);
  font-size: 0.7rem;
  line-height: 1.25;
}

.opportunity-card-disclaimer {
  margin-bottom: 1.75rem;
}

.opportunity-card-arrow {
  position: absolute;
  right: 17px;
  bottom: 14px;
  color: currentColor;
  font-size: 1.2rem;
  font-weight: 800;
}

.opportunity-card-featured {
  min-height: 424px;
  border-color: color-mix(in srgb, currentColor 48%, var(--panel-border));
  background: linear-gradient(145deg, color-mix(in srgb, currentColor 12%, var(--panel-background)), var(--panel-background) 62%);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.22);
}

.opportunity-card-featured .opportunity-card-label {
  font-size: 1.08rem;
}

.opportunity-card-featured .opportunity-card-primary-value {
  margin-top: 17px;
  font-size: 1.5rem;
}

.opportunity-card-featured .opportunity-card-estimate {
  font-size: 0.62em;
}

.opportunity-card-featured .opportunity-card-amount {
  font-size: 1.94rem;
}

.opportunity-card-featured .opportunity-card-message {
  font-size: 0.88rem;
}

.opportunity-tone-amber { color: var(--status-unscheduled); }
.opportunity-tone-green { color: var(--status-scheduled); }
.opportunity-tone-orange { color: var(--status-no-coverage); }
.opportunity-tone-blue { color: var(--status-routing); }

.payment-history-panel {
  padding: 24px;
  border: 1px solid var(--panel-border);
  border-radius: var(--panel-radius);
  background: var(--panel-background);
  box-shadow: var(--panel-shadow);
}

.payment-history-panel form {
  max-width: 540px;
}

.payment-history-panel label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 750;
}

.payment-history-empty-state {
  display: grid;
  justify-items: center;
  max-width: 620px;
  margin: 42px auto 14px;
  text-align: center;
}

.payment-history-empty-state .opportunity-card-icon {
  margin-bottom: 16px;
  color: var(--action-primary);
}

.payment-history-empty-state h2 {
  margin: 0 0 8px;
  color: var(--text-primary);
  font-size: 1.28rem;
}

.payment-history-empty-state p,
.payment-history-empty-state small {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

.payment-history-empty-state small {
  margin-top: 14px;
}

.command-main-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.42fr) minmax(520px, 1fr);
  align-items: stretch;
  gap: 20px;
}

.command-bottom-grid {
  display: grid;
  grid-template-columns: 0.95fr 0.95fr 1.2fr;
  gap: 20px;
}

.command-panel {
  min-width: 0;
  padding: 22px;
}

.command-panel-header {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.command-panel-header h2 {
  margin: 0;
  color: #9cecff;
  font-size: 0.98rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.command-panel-header a,
.command-panel-link,
.command-map-footer a {
  color: #7ddfff;
  text-decoration: none;
  font-weight: 700;
  transition: color 140ms ease, opacity 140ms ease;
}

.command-panel-header a:hover,
.command-panel-link:hover,
.command-map-footer a:hover {
  color: #b8f5ff;
}

.command-alert-list,
.command-summary-list,
.command-activity-list,
.command-coverage-stats {
  display: grid;
}

.command-alert-list { gap: 4px; }

.command-alert {
  min-height: 72px;
  gap: 17px;
  padding: 10px 6px;
  border-bottom: 1px solid rgba(118, 238, 255, 0.08);
  color: var(--ops-text);
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.command-alert:hover,
.command-alert:focus {
  background: rgba(118, 238, 255, 0.035);
}

.command-alert-icon,
.command-summary-icon,
.command-activity-icon {
  width: 38px;
  height: 38px;
  border-radius: 999px;
}

.command-alert-copy {
  display: grid;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
}

.command-alert-copy strong {
  color: #f0f8fb;
  font-size: 0.99rem;
  font-weight: 800;
  line-height: 1.2;
}

.command-alert-copy small {
  font-size: 0.9rem;
  line-height: 1.25;
}

.command-alert-copy small,
.command-map-footer,
.command-activity-list time {
  color: rgba(230, 247, 251, 0.68);
}

.command-alert-count {
  min-width: 28px;
  width: max-content;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: 9px;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  justify-self: end;
  background-color: color-mix(in srgb, var(--command-tone-color, currentColor) 34%, rgba(5, 13, 18, 0.82));
  border-color: color-mix(in srgb, var(--command-tone-color, currentColor) 54%, transparent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--command-tone-color, currentColor) 24%, transparent);
}

.command-alert-count-zero {
  color: #62ffc2;
  background-color: rgba(84, 241, 166, 0.14);
  border-color: rgba(84, 241, 166, 0.34);
  box-shadow: 0 0 16px rgba(84, 241, 166, 0.12);
}

.command-alert-clear .command-alert-icon,
.command-alert-clear .command-alert-chevron,
.command-alert-clear .command-alert-copy strong,
.command-alert-clear .command-alert-copy small {
  color: var(--status-scheduled);
}

.dispatch-card-copy {
  display: grid;
  gap: 3px;
}

.dispatch-card-copy small {
  color: rgba(230, 247, 251, 0.72);
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.15;
}

.dispatch-card-tone-neutral {
  color: var(--ops-muted);
}

.dispatch-card-clear .dispatch-card-copy,
.dispatch-card-clear .dispatch-card-copy small,
.dispatch-card-clear strong,
.dispatch-card-clear .dispatch-card-arrow {
  color: var(--status-scheduled) !important;
}

[data-p2p-theme="light"] .command-alert-clear .command-alert-icon,
[data-p2p-theme="light"] .command-alert-clear .command-alert-chevron,
[data-p2p-theme="light"] .command-alert-clear .command-alert-copy strong,
[data-p2p-theme="light"] .command-alert-clear .command-alert-copy small,
[data-p2p-theme="light"] .dispatch-card-clear .dispatch-card-copy,
[data-p2p-theme="light"] .dispatch-card-clear .dispatch-card-copy small,
[data-p2p-theme="light"] .dispatch-card-clear strong,
[data-p2p-theme="light"] .dispatch-card-clear .dispatch-card-arrow {
  color: #075437 !important;
}

/* The selected-route totals are the primary at-a-glance planning signal. */
.routing-selected-route-total {
  color: #f8fcff !important;
  font-weight: 850;
}

[data-p2p-theme="light"] .routing-selected-route-total {
  color: #07090b !important;
  font-weight: 850;
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] .routing-selected-route-total {
    color: #07090b !important;
    font-weight: 850;
  }
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] .command-alert-clear .command-alert-icon,
  [data-p2p-theme="auto"] .command-alert-clear .command-alert-chevron,
  [data-p2p-theme="auto"] .command-alert-clear .command-alert-copy strong,
  [data-p2p-theme="auto"] .command-alert-clear .command-alert-copy small,
  [data-p2p-theme="auto"] .dispatch-card-clear .dispatch-card-copy,
  [data-p2p-theme="auto"] .dispatch-card-clear .dispatch-card-copy small,
  [data-p2p-theme="auto"] .dispatch-card-clear strong,
  [data-p2p-theme="auto"] .dispatch-card-clear .dispatch-card-arrow {
    color: #075437 !important;
  }
}

.command-alert-chevron {
  color: rgba(230, 247, 251, 0.7);
  font-size: 1.8rem;
}

.command-panel-link {
  display: block;
  margin-top: 15px;
  text-align: center;
}

.command-map-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  padding-bottom: 16px;
}

.command-map-header {
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.command-map-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.command-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 9px 12px;
  border: 1px solid rgba(118, 238, 255, 0.13);
  border-radius: 6px;
  background: rgba(5, 13, 18, 0.58);
  backdrop-filter: blur(12px);
}

.command-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(244, 251, 255, 0.94);
  font-size: 0.85rem;
  font-weight: 700;
}

.command-dot {
  width: 13px;
  height: 13px;
  border-radius: 999px;
  box-shadow: none;
}

.command-dot.scheduled { color: var(--map-status-scheduled); background: var(--map-status-scheduled); }
.command-dot.unscheduled { color: var(--map-status-unscheduled); background: var(--map-status-unscheduled); }
.command-dot.routing { color: var(--map-status-routing); background: var(--map-status-routing); }
.command-dot.capacity { color: var(--map-status-capacity); background: var(--map-status-capacity); }
.command-dot.coverage { color: var(--map-status-no-coverage); background: var(--map-status-no-coverage); }
.command-dot.vip { color: var(--map-status-vip); background: var(--map-status-vip); }

.command-service-map {
  flex: 1 1 auto;
  min-height: 360px;
  border: 0;
  margin: 0 -2px;
  background: #071016;
  overflow: hidden;
}

.command-map-footer {
  justify-content: space-between;
  gap: 16px;
  padding: 12px 8px 0;
  font-size: 0.94rem;
}

.command-map-panel .leaflet-control-zoom {
  border: 1px solid rgba(118, 238, 255, 0.18);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.command-map-panel .leaflet-control-zoom a,
.command-map-panel .leaflet-control-attribution {
  color: var(--ops-text) !important;
  background: rgba(5, 13, 18, 0.78) !important;
  backdrop-filter: blur(10px);
}

.command-map-panel .leaflet-control-zoom a {
  width: 34px;
  height: 34px;
  border: 0;
  border-bottom: 1px solid rgba(118, 238, 255, 0.14);
  color: var(--ops-text);
  line-height: 34px;
}

.command-map-panel .leaflet-control-zoom a:last-child {
  border-bottom: 0;
}

.command-map-panel .leaflet-control-attribution {
  margin: 0 8px 8px 0;
  padding: 4px 7px;
  border: 1px solid rgba(118, 238, 255, 0.16) !important;
  border-radius: 6px;
  color: rgba(230, 247, 251, 0.72) !important;
  font-size: 0.72rem;
}

.command-map-panel .leaflet-control-attribution a {
  color: #7ddfff !important;
}

.command-coverage-content {
  display: grid;
  grid-template-columns: 186px minmax(0, 1fr);
  align-items: center;
  gap: 30px;
}

.command-util-ring {
  width: 176px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background:
    conic-gradient(
      var(--status-scheduled) 0 calc(var(--within-capacity) * 1%),
      var(--status-no-coverage) 0 calc((var(--within-capacity) + var(--near-capacity)) * 1%),
      var(--status-capacity) 0 calc((var(--within-capacity) + var(--near-capacity) + var(--over-capacity)) * 1%),
      rgba(255, 255, 255, 0.08) 0
    );
}

.command-util-ring::before {
  content: "";
  position: absolute;
}

.command-util-ring > div {
  width: 124px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 999px;
  background: #071016;
  text-align: center;
}

.command-util-ring strong {
  font-size: 2.04rem;
  font-weight: 850;
  line-height: 1;
}

.command-util-ring span {
  margin-top: 6px;
  color: rgba(230, 247, 251, 0.78);
  font-size: 0.92rem;
  line-height: 1.2;
}

.command-coverage-stats div,
.command-summary-list div,
.command-activity-list a {
  min-height: 44px;
  gap: 13px;
  border-bottom: 1px solid rgba(118, 238, 255, 0.08);
}

.command-coverage-stats div,
.command-summary-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.command-coverage-stats strong,
.command-summary-list strong {
  min-width: 3ch;
  text-align: right;
  color: #f0f8fb;
  font-weight: 850;
}

.command-coverage-stats span {
  position: relative;
  padding-left: 18px;
  color: rgba(230, 247, 251, 0.78);
  font-weight: 760;
}

.command-coverage-stats span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
  transform: translateY(-50%);
}

.command-coverage-stats span.success { color: var(--status-scheduled); }
.command-coverage-stats span.warning { color: var(--status-no-coverage); }
.command-coverage-stats span.danger { color: var(--status-capacity); }

.command-coverage-stats div:last-child span {
  padding-left: 0;
  color: rgba(230, 247, 251, 0.82);
}

.command-coverage-stats div:last-child span::before {
  display: none;
}

.command-summary-list span,
.command-activity-list span {
  flex: 1 1 auto;
  color: rgba(230, 247, 251, 0.86);
  font-weight: 650;
}

.command-summary-icon,
.command-activity-icon {
  width: 24px;
  height: 24px;
  border-width: 1.5px;
  opacity: 0.9;
}

/* The date context must claim its own row before it can collide with title or date controls. */
@media (max-width: 1950px) and (min-width: 993px) {
  .command-header {
    flex-wrap: wrap;
  }

  .command-kpi-context {
    position: static;
    flex: 1 0 100%;
    order: 3;
    transform: none;
    text-align: center;
  }
}

.command-activity-list a {
  color: var(--ops-text);
  text-decoration: none;
}

.command-activity-list time {
  margin-left: auto;
  min-width: 92px;
  white-space: nowrap;
  color: rgba(230, 247, 251, 0.52);
  font-size: 0.82rem;
  font-weight: 650;
  text-align: right;
}

@media (max-width: 1400px) {
  .dispatch-workflow-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kpi-filter-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .kpi-filter-actions,
  .kpi-filter-help {
    grid-column: auto;
  }
  .kpi-management-panels {
    grid-template-columns: 1fr;
  }
  .kpi-attention-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .command-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .command-bottom-grid { grid-template-columns: 1fr; }
  .command-header { flex-wrap: wrap; }
  .opportunity-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .opportunity-card-estimate { margin-left: 0; }
  .command-kpi-context {
    position: static;
    flex: 1 0 100%;
    order: 3;
    transform: none;
    text-align: center;
  }
}

@media (max-width: 992px) {
  .dispatch-dashboard-hero,
  .dispatch-dashboard-panel-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .dispatch-dashboard-main-grid { grid-template-columns: 1fr; }
  .dispatch-dashboard-workflow-heading { grid-template-columns: 1fr; }
  .dispatch-exception-grid { grid-template-columns: 1fr; }
  .dispatch-workflow-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-filter-form { grid-template-columns: 1fr 1fr; }
  .kpi-filter-actions,
  .kpi-filter-help { grid-column: 1 / -1; }
  .kpi-management-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-trend-note { align-items: flex-start; flex-direction: column; }
  .command-header { align-items: flex-start; flex-direction: column; }
  .command-actions, .command-date-form, .command-date-nav { width: 100%; }
  .command-actions { flex-wrap: wrap; }
  .command-date-nav { flex-wrap: wrap; }
  .command-date-nav .btn { flex: 1 1 80px; justify-content: center; }
  .command-refresh { flex: 1 1 auto; }
  .command-main-grid { grid-template-columns: 1fr; }
  .command-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .opportunity-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .command-map-legend { position: static; margin-bottom: 12px; }
  .command-service-map { min-height: 340px; }
}

@media (max-width: 640px) {
  .dispatch-dashboard-page { padding-inline: 0; }
  .dispatch-workflow-grid { grid-template-columns: 1fr; }
  .dispatch-dashboard-tabs a,
  .dispatch-dashboard-tabs span { flex: 1 1 auto; }
  .kpi-management-grid { grid-template-columns: 1fr; }
  .kpi-filter-form,
  .kpi-attention-grid { grid-template-columns: 1fr; }
  .kpi-outcome-bar { grid-template-columns: 1fr; }
  .kpi-outcome-bar strong { text-align: left; }
  .command-center { padding-inline: 0; }
  .command-kpi-grid { grid-template-columns: 1fr; }
  .opportunity-card-grid { grid-template-columns: 1fr; }
  .opportunity-card { min-height: 300px; }
  .opportunity-card-featured { min-height: 360px; }
  .command-kpi { min-height: 132px; }
  .command-coverage-content { grid-template-columns: 1fr; justify-items: center; }
.command-map-footer { align-items: flex-start; flex-direction: column; }
}

.platform-shell-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-right: 0.75rem;
}

.platform-shell-actions form {
  margin: 0;
}

.platform-current-company {
  max-width: 260px;
  overflow: hidden;
  color: var(--text-primary, #f1f5f9);
  font-size: 0.86rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-switcher {
  min-width: 190px;
}

.company-switcher-toggle {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 280px;
}

.company-switcher-label {
  color: var(--text-secondary, #89a8b3);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.company-switcher-name {
  overflow: hidden;
  color: var(--text-primary, #f1f5f9);
  font-size: 0.86rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-switcher-menu {
  min-width: 280px;
}

.company-switcher-option {
  display: grid;
  gap: 0.1rem;
  min-height: 46px;
}

.company-switcher-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-switcher-option small {
  color: var(--text-secondary, #89a8b3);
  font-size: 0.76rem;
  font-weight: 700;
}

.company-switcher-option.active small {
  color: rgba(2, 16, 20, 0.72);
}

.company-switcher-manage {
  font-weight: 800;
}

.shell-action-pill.active {
  color: #021014 !important;
  border-color: rgba(183, 251, 255, 1);
  background: linear-gradient(180deg, rgba(35, 230, 242, 0.92), rgba(45, 140, 255, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 0 18px rgba(40, 231, 255, 0.26);
}

.company-admin-context {
  min-width: 220px;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(118, 238, 255, 0.18);
  border-radius: 8px;
  background: rgba(7, 16, 22, 0.52);
}

.company-admin-context span {
  display: block;
  color: var(--text-secondary, #9fb7c3);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.company-admin-context strong {
  display: block;
  margin-top: 0.2rem;
}

.company-admin-context small {
  display: block;
  margin-top: 0.18rem;
  color: rgba(203, 213, 225, 0.62);
  font-size: 0.74rem;
}

.company-admin-dashboard .company-admin-company-identity {
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}

.company-admin-company-name {
  min-width: 0;
  overflow: hidden;
  color: #f8fafc;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
}

.company-admin-section-label {
  color: rgba(203, 213, 225, 0.78);
  font-size: 0.75rem;
  font-weight: 850;
  text-transform: uppercase;
}

.company-admin-module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.company-admin-card {
  min-height: 170px;
  padding: 1rem;
  border: 1px solid rgba(118, 238, 255, 0.18);
  border-radius: var(--panel-radius, 8px);
  background: linear-gradient(180deg, rgba(10, 27, 38, 0.92), rgba(6, 16, 23, 0.92));
}

.company-admin-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.company-admin-card p {
  color: var(--text-secondary, #9fb7c3);
  font-size: 0.9rem;
}

.company-admin-status {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.5rem;
  border: 1px solid rgba(118, 238, 255, 0.2);
  border-radius: 999px;
  color: rgba(118, 238, 255, 0.76);
  background: rgba(40, 231, 255, 0.06);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.company-admin-attention-card p {
  margin-bottom: 0.65rem;
  color: rgba(203, 213, 225, 0.72);
  font-size: 0.84rem;
}

.company-admin-attention-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}

.company-admin-attention-icon svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.company-admin-health-row {
  cursor: default;
}

.launch-readiness-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 1rem;
  align-items: stretch;
}

.launch-readiness-progress,
.launch-readiness-next {
  display: grid;
  gap: 0.85rem;
  align-content: start;
  min-height: 220px;
  padding: clamp(1rem, 1.8vw, 1.35rem);
  border: 1px solid rgba(118, 238, 255, 0.24);
  border-radius: 8px;
  background: rgba(3, 10, 21, 0.42);
}

.launch-readiness-progress {
  position: relative;
  overflow: hidden;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  background:
    radial-gradient(circle at 92% 8%, rgba(34, 197, 94, 0.14), transparent 38%),
    linear-gradient(135deg, rgba(14, 30, 54, 0.92), rgba(3, 10, 21, 0.48));
}

.launch-readiness-progress::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  border: 1px solid rgba(118, 238, 255, 0.08);
  border-radius: inherit;
}

.launch-readiness-progress-copy {
  position: relative;
  z-index: 1;
}

.launch-readiness-progress h2 {
  max-width: 18rem;
  margin: 0.2rem 0 0;
  font-size: clamp(1.9rem, 3vw, 3rem);
  line-height: 0.98;
}

.launch-readiness-next h3 {
  margin: 0.15rem 0 0;
  font-size: clamp(1.25rem, 1.8vw, 1.65rem);
  line-height: 1.12;
}

.launch-readiness-progress p,
.launch-readiness-next p {
  margin: 0;
  color: var(--text-secondary, #94a3b8);
}

.launch-readiness-score {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.3rem;
  justify-items: end;
  text-align: right;
}

.launch-readiness-score strong {
  color: #f8fafc;
  font-size: clamp(3.4rem, 6vw, 5.4rem);
  font-weight: 900;
  line-height: 1;
}

.launch-readiness-score span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 0.7rem;
  border: 1px solid rgba(34, 197, 94, 0.28);
  border-radius: 999px;
  color: #86efac;
  background: rgba(34, 197, 94, 0.12);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
  white-space: nowrap;
}

.launch-readiness-meter {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  overflow: hidden;
  height: 16px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
}

.launch-readiness-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #22c55e);
}

.launch-readiness-progress-detail {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  font-size: 0.86rem;
  font-weight: 850;
}

.launch-readiness-next {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-color: rgba(245, 158, 11, 0.24);
  background:
    linear-gradient(135deg, rgba(69, 43, 15, 0.28), rgba(3, 10, 21, 0.42)),
    rgba(3, 10, 21, 0.42);
}

.launch-readiness-next small {
  display: block;
  margin-top: 0.45rem;
  color: rgba(203, 213, 225, 0.72);
  font-size: 0.8rem;
  font-weight: 800;
}

.launch-readiness-next .btn {
  justify-self: end;
  min-width: 9rem;
}

.monday-morning-playbook {
  display: grid;
  gap: 1rem;
}

.monday-morning-heading h2 {
  margin-top: 0.15rem;
}

.monday-morning-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(14, 30, 54, 0.9), rgba(3, 10, 21, 0.54)),
    rgba(3, 10, 21, 0.42);
}

.monday-morning-summary > div {
  display: grid;
  gap: 0.1rem;
}

.monday-morning-summary strong {
  color: #f8fafc;
  font-size: clamp(1.65rem, 3vw, 2.3rem);
  line-height: 1;
}

.monday-morning-summary span {
  color: rgba(203, 213, 225, 0.72);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.monday-morning-summary p {
  margin: 0;
  color: var(--text-secondary, #94a3b8);
  font-size: 0.9rem;
}

.monday-morning-list {
  display: grid;
  gap: 0.75rem;
}

.monday-morning-step {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: start;
  padding: 0.95rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: rgba(3, 10, 21, 0.48);
}

.monday-morning-step-current {
  border-color: rgba(56, 189, 248, 0.36);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.08);
}

.monday-morning-step-complete {
  border-color: rgba(34, 197, 94, 0.2);
}

.monday-morning-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(118, 238, 255, 0.24);
  border-radius: 999px;
  color: #76eeff;
  background: rgba(40, 231, 255, 0.08);
  font-size: 0.85rem;
  font-weight: 900;
}

.monday-morning-step-complete .monday-morning-step-number {
  border-color: rgba(34, 197, 94, 0.28);
  color: #86efac;
  background: rgba(34, 197, 94, 0.12);
}

.monday-morning-step-title {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
}

.monday-morning-step-title h3 {
  margin: 0;
  font-size: 1rem;
}

.monday-morning-state {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 0.55rem;
  border-radius: 999px;
  color: rgba(203, 213, 225, 0.78);
  background: rgba(148, 163, 184, 0.14);
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
}

.monday-morning-step-current .monday-morning-state {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.14);
}

.monday-morning-step-complete .monday-morning-state {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.14);
}

.monday-morning-step-details {
  display: grid;
  gap: 0.45rem;
  margin: 0.7rem 0 0;
}

.monday-morning-step-details div {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 0.75rem;
}

.monday-morning-step-details dt {
  color: rgba(203, 213, 225, 0.68);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.monday-morning-step-details dd {
  margin: 0;
  color: var(--text-secondary, #94a3b8);
  font-size: 0.86rem;
  line-height: 1.45;
}

.monday-morning-step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  min-width: 9rem;
}

.launch-readiness-list {
  display: grid;
  gap: 0.7rem;
}

.launch-readiness-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: rgba(3, 10, 21, 0.48);
}

.launch-readiness-item-title {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  justify-content: space-between;
}

.launch-readiness-item h3 {
  margin: 0;
  font-size: 0.98rem;
}

.launch-readiness-item p {
  margin: 0.35rem 0 0;
  color: var(--text-secondary, #94a3b8);
  font-size: 0.87rem;
}

.launch-readiness-item small {
  display: block;
  margin-top: 0.32rem;
  color: rgba(203, 213, 225, 0.68);
  font-size: 0.76rem;
  font-weight: 800;
}

.launch-readiness-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.launch-readiness-pill,
.launch-readiness-owner {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 0.52rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
  white-space: nowrap;
}

.launch-readiness-pill-ready {
  background: rgba(34, 197, 94, 0.14);
  color: #22c55e;
}

.launch-readiness-pill-operator-verified {
  background: rgba(34, 211, 238, 0.14);
  color: #67e8f9;
}

.launch-readiness-pill-needs-attention {
  background: rgba(245, 158, 11, 0.14);
  color: #f59e0b;
}

.launch-readiness-pill-not-started {
  background: rgba(239, 68, 68, 0.14);
  color: #f87171;
}

.launch-readiness-pill-optional,
.launch-readiness-pill-deferred,
.launch-readiness-owner {
  background: rgba(148, 163, 184, 0.14);
  color: rgba(203, 213, 225, 0.78);
}

.launch-readiness-item-ready {
  border-color: rgba(34, 197, 94, 0.22);
}

.launch-readiness-item-needs-attention {
  border-color: rgba(245, 158, 11, 0.28);
}

.launch-readiness-item-not-started {
  border-color: rgba(239, 68, 68, 0.24);
}

.launch-readiness-item-action {
  display: flex;
  justify-content: flex-end;
}

.launch-readiness-decision {
  display: grid;
  gap: 0.85rem;
}

.company-operations-page .company-admin-hero,
.company-settings-hero {
  grid-template-columns: minmax(0, 1fr) minmax(290px, 370px);
}

.company-operations-page .company-admin-context {
  min-width: 0;
  padding: 0.7rem 0.8rem;
}

.company-admin-context-heading {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  justify-content: space-between;
}

.company-operations-page .company-admin-context-heading strong {
  overflow: hidden;
  margin-top: 0;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-operations-page .company-admin-context-heading .launch-readiness-status {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 0 0.58rem;
  font-size: 0.7rem;
}

.operations-summary-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) repeat(3, minmax(145px, 0.9fr));
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: var(--panel-radius);
  background: var(--panel-background);
}

.operations-summary-bar > div {
  display: grid;
  align-content: center;
  gap: 0.18rem;
  min-height: 94px;
  padding: 0.75rem 0.85rem;
  border-left: 1px solid var(--panel-border);
}

.operations-summary-bar > div:first-child {
  border-left: 0;
}

.operations-summary-bar span,
.operations-summary-bar small {
  color: var(--text-secondary);
  font-size: 0.68rem;
}

.operations-summary-bar span {
  font-weight: 850;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.operations-summary-bar strong {
  color: var(--text-primary);
  font-size: 1.35rem;
  line-height: 1.15;
}

.operations-summary-bar .operations-summary-primary strong {
  font-size: 1.55rem;
}

.operations-status-success strong,
.operations-summary-primary.operations-status-success strong {
  color: var(--ops-green);
}

.operations-status-warning strong,
.operations-summary-primary.operations-status-warning strong {
  color: var(--ops-amber);
}

.operations-status-critical strong,
.operations-summary-primary.operations-status-critical strong {
  color: var(--ops-red);
}

.platform-dashboard .platform-environment.operations-status-success {
  border-color: rgba(84, 241, 166, 0.38);
  background: rgba(84, 241, 166, 0.1);
  color: var(--ops-green);
}

.platform-dashboard .platform-environment.operations-status-warning {
  border-color: rgba(251, 191, 36, 0.42);
  background: rgba(251, 191, 36, 0.11);
  color: var(--ops-amber);
}

.platform-dashboard .platform-environment.operations-status-critical {
  border-color: rgba(255, 107, 122, 0.42);
  background: rgba(255, 107, 122, 0.11);
  color: var(--ops-red);
}

.platform-dashboard .platform-side-panel .operations-status-warning :is(strong, small) {
  color: var(--ops-amber);
}

.platform-dashboard .platform-side-panel .operations-status-critical :is(strong, small) {
  color: var(--ops-red);
}

.operations-workspace-section {
  display: grid;
  gap: 0.52rem;
  padding-top: 0.62rem;
  border-top: 1px solid var(--panel-border);
}

.operations-section-heading {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}

.operations-section-heading h2,
.operations-section-heading p {
  margin: 0;
}

.operations-section-heading h2 {
  font-size: 1.05rem;
}

.operations-section-heading p {
  margin-top: 0.1rem;
  color: var(--text-secondary);
  font-size: 0.76rem;
}

.launch-readiness-decision-summary {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.launch-readiness-decision-summary h2 {
  margin: 0.15rem 0 0;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
}

.launch-readiness-decision-summary p {
  margin: 0.2rem 0 0;
  color: var(--text-secondary);
}

.launch-readiness-compact-score {
  display: grid;
  justify-items: end;
  min-width: 108px;
}

.launch-readiness-compact-score strong {
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1;
}

.launch-readiness-compact-score span {
  color: var(--text-secondary);
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
}

.readiness-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 380px));
  gap: 0.52rem;
  align-items: start;
  justify-content: start;
}

.readiness-action-card {
  display: grid;
  gap: 0.45rem;
  align-content: start;
  padding: 0.65rem 0.7rem;
  border-left: 3px solid #f59e0b;
  background: rgba(245, 158, 11, 0.055);
  border-top: 1px solid var(--panel-border);
  border-right: 1px solid var(--panel-border);
  border-bottom: 1px solid var(--panel-border);
  border-radius: var(--panel-radius);
}

.readiness-action-card-recommended {
  border-left-color: #38bdf8;
  background: rgba(56, 189, 248, 0.045);
}

.readiness-action-card-heading {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  justify-content: space-between;
}

.readiness-action-card h3,
.readiness-planned-section h2 {
  margin: 0;
  font-size: 1rem;
}

.readiness-action-card ul {
  display: grid;
  gap: 0.3rem;
  margin: 0;
  padding-left: 1.1rem;
}

.readiness-action-card li strong,
.readiness-action-card li small {
  display: block;
}

.readiness-action-card li small {
  margin-top: 0.1rem;
  color: var(--text-secondary);
  font-size: 0.72rem;
}

.readiness-action-card .btn,
.readiness-action-card .company-admin-status {
  justify-self: start;
  margin-top: 0.15rem;
}

.readiness-missing-label,
.readiness-inline-recommended strong {
  color: #fbbf24;
  font-size: 0.68rem;
  text-transform: uppercase;
}

.readiness-inline-recommended {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.readiness-clear-state {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  align-items: baseline;
  padding: 0.75rem 0;
  color: var(--text-secondary);
}

.readiness-clear-state strong {
  color: #22c55e;
}

.readiness-recommended-list {
  display: grid;
  gap: 0.45rem;
}

.readiness-recommended-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-top: 1px solid var(--panel-border);
}

.readiness-recommended-row > div {
  display: grid;
  gap: 0.12rem;
}

.readiness-recommended-row span {
  color: var(--text-secondary);
  font-size: 0.78rem;
}

.readiness-compact-details summary {
  cursor: pointer;
  color: var(--text-primary);
  font-weight: 850;
}

.readiness-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 0.38rem;
}

.readiness-chip-grid > :is(span, .readiness-chip-action) {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  min-height: 46px;
  padding: 0.42rem 0.55rem;
  border: 1px solid var(--panel-border);
  border-radius: var(--panel-radius);
  color: var(--text-primary);
  font-size: 0.75rem;
  font-weight: 750;
}

.readiness-chip-grid > .readiness-chip-action {
  justify-content: center;
  border-color: rgba(40, 231, 255, 0.86);
  color: #021014;
  background: linear-gradient(180deg, #77e7f4, #18c9df);
  box-shadow: 0 7px 16px rgba(8, 151, 184, 0.2);
  text-decoration: none;
}

.readiness-chip-grid > .readiness-chip-action:hover,
.readiness-chip-grid > .readiness-chip-action:focus {
  border-color: rgba(183, 251, 255, 1);
  color: #021014;
  background: linear-gradient(180deg, #9af2fb, #22d7eb);
  box-shadow: 0 0 0 0.14rem var(--focus-ring), 0 9px 19px rgba(8, 151, 184, 0.28);
}

.readiness-chip-grid > :is(span, .readiness-chip-action) > b {
  color: #22c55e;
  font-size: 1rem;
}

.readiness-chip-grid > :is(span, .readiness-chip-action) > span,
.readiness-chip-grid > :is(span, .readiness-chip-action) strong,
.readiness-chip-grid > :is(span, .readiness-chip-action) small {
  display: block;
}

.readiness-chip-grid > :is(span, .readiness-chip-action) small {
  margin-top: 0.08rem;
  color: var(--text-secondary);
  font-size: 0.66rem;
}

.readiness-chip-grid > .readiness-chip-action :is(strong, small) {
  color: #021014;
}

.readiness-planned-section {
  display: grid;
  gap: 0.48rem;
}

.readiness-planned-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.52rem;
}

.readiness-planned-list > span {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 64px;
  padding: 0.56rem 0.62rem;
  border: 1px solid var(--panel-border);
  border-radius: var(--panel-radius);
  color: var(--text-primary);
}

.readiness-planned-list > span > span,
.readiness-planned-list strong,
.readiness-planned-list small {
  display: block;
}

.readiness-planned-list small {
  margin-top: 0.25rem;
  color: var(--text-secondary);
  font-size: 0.7rem;
  line-height: 1.35;
}

.readiness-planned-list b {
  padding: 0.15rem 0.42rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  color: var(--text-secondary);
  font-size: 0.62rem;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .launch-readiness-decision-summary,
  .readiness-recommended-row {
    align-items: flex-start;
  }

  .launch-readiness-compact-score {
    justify-items: start;
  }

  .launch-readiness-decision-summary,
  .readiness-recommended-row {
    flex-direction: column;
  }

  .company-operations-page .company-admin-hero,
  .company-settings-hero,
  .operations-summary-bar {
    grid-template-columns: 1fr;
  }

  .operations-summary-bar > div {
    min-height: 0;
    border-top: 1px solid var(--panel-border);
    border-left: 0;
  }

  .operations-summary-bar > div:first-child {
    border-top: 0;
  }

  .operations-summary-bar > div:not(.operations-summary-primary) {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .operations-summary-bar > div:not(.operations-summary-primary) small {
    grid-column: 1 / -1;
  }

  .readiness-planned-list {
    grid-template-columns: 1fr;
  }

  .readiness-action-grid {
    grid-template-columns: 1fr;
  }
}

.company-operations-page .platform-layout {
  gap: 0.72rem;
  margin-top: 0.68rem;
}

.company-operations-page .platform-main,
.company-operations-page .platform-sidebar {
  gap: 0.58rem;
  align-content: start;
}

.company-operations-page .platform-side-panel {
  gap: 0.28rem;
  padding: 0.72rem;
}

.company-operations-page .platform-side-panel h2 {
  padding-bottom: 0.48rem;
  margin-bottom: 0.08rem;
}

.platform-oversight-action {
  display: grid;
  gap: 0.12rem;
  justify-items: center;
  width: 100%;
  padding: 0.58rem 0.65rem;
  text-align: center;
}

.platform-oversight-action strong,
.platform-oversight-action small {
  display: block;
}

.platform-oversight-action small {
  color: inherit;
  font-size: 0.68rem;
  opacity: 0.78;
}

.platform-dashboard .platform-side-panel > .platform-oversight-action {
  grid-template-columns: minmax(0, 1fr);
  column-gap: 0;
}

.platform-dashboard .platform-side-panel > .platform-oversight-action > :is(strong, small) {
  grid-column: 1;
  width: 100%;
  text-align: center;
}

.platform-readiness-cockpit {
  display: grid;
  gap: 1rem;
}

.platform-readiness-hero {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border-color: rgba(56, 189, 248, 0.34) !important;
}

.platform-readiness-hero-title {
  display: inline-flex;
  gap: 0.65rem;
  align-items: center;
}

.platform-readiness-hero-title h2 {
  margin: 0;
  font-size: 1rem;
}

.platform-readiness-hero-grid {
  display: grid;
  grid-template-columns: minmax(150px, 0.62fr) minmax(230px, 1.2fr) repeat(3, minmax(150px, 0.82fr));
  gap: 1rem;
  align-items: center;
}

.platform-readiness-gauge {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.28rem;
  width: 148px;
  height: 148px;
  padding-top: 0.12rem;
  justify-self: center;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, rgba(6, 17, 31, 0.96) 0 51%, transparent 52%),
    conic-gradient(#22c55e var(--platform-readiness-progress, 0%), rgba(148, 163, 184, 0.2) 0);
  box-shadow: inset 0 0 0 1px rgba(118, 238, 255, 0.12);
}

.platform-readiness-gauge strong {
  display: block;
  color: #f8fafc;
  font-size: 2rem;
  line-height: 1;
  text-align: center;
}

.platform-readiness-gauge span {
  display: block;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
}

.platform-readiness-gauge-ready span {
  color: #86efac;
}

.platform-readiness-gauge-blocked span {
  color: #f59e0b;
}

.platform-readiness-primary {
  display: grid;
  gap: 0.5rem;
  align-content: center;
  min-height: 120px;
  padding-right: 1rem;
  border-right: 1px solid rgba(148, 163, 184, 0.2);
}

.platform-readiness-primary strong {
  color: #f8fafc;
  font-size: clamp(1.25rem, 2vw, 1.85rem);
  line-height: 1.1;
}

.platform-readiness-primary span {
  color: #f59e0b;
  font-size: 1.1rem;
  font-weight: 900;
}

.platform-readiness-metric {
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  min-height: 120px;
  align-content: center;
  padding: 0 1rem;
  border-right: 1px solid rgba(148, 163, 184, 0.16);
  text-align: center;
}

.platform-readiness-metric:last-child {
  border-right: 0;
}

.platform-readiness-metric-icon {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  font-weight: 950;
}

.platform-readiness-metric-verified .platform-readiness-metric-icon {
  color: #86efac;
  border: 2px solid rgba(34, 197, 94, 0.8);
}

.platform-readiness-metric-operator .platform-readiness-metric-icon {
  width: auto;
  height: auto;
  color: #f59e0b;
  background: transparent;
  font-size: 2rem;
  line-height: 1;
}

.platform-readiness-metric-deferred .platform-readiness-metric-icon {
  width: auto;
  height: auto;
  color: #facc15;
  background: transparent;
  font-size: 1.8rem;
  line-height: 1;
}

.platform-readiness-metric small {
  color: rgba(226, 232, 240, 0.9);
  font-size: 0.75rem;
  font-weight: 900;
}

.platform-readiness-metric strong {
  color: #f8fafc;
  font-size: 1.55rem;
  line-height: 1;
}

.platform-readiness-metric em {
  color: rgba(203, 213, 225, 0.72);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
}

.platform-advanced-details {
  gap: 0.8rem;
}

.platform-detail-box {
  display: grid;
  gap: 0.2rem;
  padding: 0.78rem;
  border: 1.5px solid rgba(118, 238, 255, 0.62);
  border-radius: 8px;
  background: rgba(3, 10, 21, 0.32);
  box-shadow:
    inset 0 0 0 1px rgba(118, 238, 255, 0.12),
    0 0 0 1px rgba(118, 238, 255, 0.08);
}

.platform-detail-box h2 {
  color: #f8fafc;
  font-size: 1rem !important;
  font-weight: 950;
  line-height: 1.2;
}

.platform-detail-box-count {
  justify-self: start;
  margin-bottom: 0.35rem;
  color: rgba(203, 213, 225, 0.86);
  font-size: 0.86rem;
  font-weight: 950;
}

.platform-detail-box-computed {
  border-color: rgba(34, 197, 94, 0.74);
}

.platform-dashboard .platform-side-panel .platform-detail-box-computed h2,
.platform-dashboard .platform-side-panel .platform-detail-box-computed .platform-detail-box-count {
  color: #4ade80 !important;
}

.platform-detail-box-operator {
  border-color: rgba(245, 158, 11, 0.82);
}

.platform-dashboard .platform-side-panel .platform-detail-box-operator h2,
.platform-dashboard .platform-side-panel .platform-detail-box-operator .platform-detail-box-count {
  color: #fbbf24 !important;
}

.platform-detail-box-deferred {
  border-color: rgba(250, 204, 21, 0.74);
}

.platform-dashboard .platform-side-panel .platform-detail-box-deferred h2,
.platform-dashboard .platform-side-panel .platform-detail-box-deferred .platform-detail-box-count {
  color: #facc15 !important;
}

.platform-detail-group {
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.platform-detail-group summary {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
  list-style: none;
}

.platform-detail-group summary::-webkit-details-marker {
  display: none;
}

.platform-detail-group summary strong {
  font-size: 0.86rem;
}

.platform-detail-group summary small {
  color: rgba(203, 213, 225, 0.82);
  text-align: right;
}

.platform-detail-status {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 950;
}

.platform-detail-status-ready {
  color: #86efac;
  border: 2px solid rgba(34, 197, 94, 0.8);
}

.platform-detail-status-operator,
.platform-detail-status-issue {
  color: #fff7ed;
  background: #f59e0b;
}

.platform-detail-status-deferred {
  color: #0f172a;
  background: #94a3b8;
}

.platform-detail-items {
  display: grid;
  gap: 0.4rem;
  padding: 0 0 0.7rem 1.75rem;
}

.platform-detail-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.35rem 0.5rem;
  align-items: center;
  padding: 0.45rem;
  border-radius: 7px;
  background: rgba(3, 10, 21, 0.36);
}

.platform-detail-item strong {
  font-size: 0.78rem;
}

.platform-detail-item small {
  grid-column: 1 / -1;
  color: rgba(203, 213, 225, 0.68);
  text-align: left;
}

.platform-detail-item-action {
  grid-column: 1 / -1;
  justify-self: start;
  color: var(--ops-cyan);
  font-size: 0.72rem;
  font-weight: 800;
  text-decoration: none;
}

.platform-detail-item-action:hover,
.platform-detail-item-action:focus {
  text-decoration: underline;
}

.platform-detail-item-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.28rem;
  margin: 0.08rem 0 0;
  padding-left: 1rem;
  color: rgba(226, 232, 240, 0.88);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.35;
}

.platform-detail-item-list li::marker {
  color: #fbbf24;
}

.platform-readiness-overview {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  border: 1px solid rgba(118, 238, 255, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(14, 30, 54, 0.72), rgba(3, 10, 21, 0.42)),
    rgba(3, 10, 21, 0.42);
}

.platform-readiness-overview strong,
.platform-readiness-overview span {
  display: block;
}

.platform-readiness-overview strong {
  color: #f8fafc;
  font-size: clamp(1.45rem, 2.2vw, 2.2rem);
  line-height: 1.05;
}

.platform-readiness-overview span,
.platform-readiness-next {
  color: var(--text-secondary, #94a3b8);
  font-size: 0.88rem;
  font-weight: 800;
}

.platform-readiness-next {
  margin: 0;
}

.platform-readiness-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.85rem;
}

.platform-readiness-section {
  display: grid;
  gap: 0.7rem;
  align-content: start;
  padding: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: rgba(3, 10, 21, 0.42);
}

.platform-readiness-section h3 {
  margin: 0;
  color: #f8fafc;
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1.25;
}

.platform-readiness-item-list {
  display: grid;
  gap: 0.55rem;
}

.platform-readiness-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  min-height: 96px;
  padding: 0.72rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  background: rgba(8, 18, 34, 0.58);
}

.platform-readiness-item-title {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  justify-content: space-between;
}

.platform-readiness-item p,
.platform-readiness-item small {
  display: block;
  margin: 0.3rem 0 0;
  color: rgba(203, 213, 225, 0.68);
  font-size: 0.78rem;
  line-height: 1.38;
}

.platform-readiness-item small {
  color: rgba(203, 213, 225, 0.82);
  font-weight: 850;
}

.platform-readiness-item-ready {
  border-color: rgba(34, 197, 94, 0.2);
}

.platform-readiness-item-needs-attention {
  border-color: rgba(245, 158, 11, 0.28);
}

.platform-readiness-item-not-started {
  border-color: rgba(239, 68, 68, 0.24);
}

.platform-readiness-item-optional,
.platform-readiness-item-deferred {
  border-color: rgba(148, 163, 184, 0.18);
}

.platform-main-shell {
  padding-right: clamp(0.75rem, 1.4vw, 1.5rem);
  padding-left: clamp(0.75rem, 1.4vw, 1.5rem);
}

.platform-dashboard {
  width: 100%;
  max-width: none;
  margin: 0;
  color: var(--text-primary, #f8fafc);
}

.platform-dashboard .platform-hero {
  display: grid;
  grid-template-columns: minmax(210px, 260px) minmax(260px, 1fr) minmax(360px, 620px) auto;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.1rem;
  padding: 0.85rem;
  border: 1px solid rgba(45, 140, 255, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(13, 20, 34, 0.96), rgba(8, 18, 34, 0.72)),
    var(--panel-background, rgba(15, 23, 42, 0.86));
  box-shadow: var(--panel-shadow, 0 14px 40px rgba(0, 0, 0, 0.22));
}

.platform-dashboard .platform-brand-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(45, 140, 255, 0.22);
  border-radius: 8px;
  background: rgba(4, 12, 24, 0.78);
}

.platform-dashboard .platform-brand-panel img {
  display: block;
  max-width: 168px;
  max-height: 46px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.platform-dashboard .platform-kicker,
.platform-dashboard .platform-section-heading p,
.platform-dashboard .platform-company-card p,
.platform-dashboard .platform-stat-card small {
  color: var(--text-secondary, #94a3b8);
}

.platform-dashboard .platform-kicker {
  margin: 0 0 0.2rem;
  color: #38bdf8;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.platform-dashboard .platform-hero h1,
.platform-dashboard .platform-section h2,
.platform-dashboard .platform-side-panel h2 {
  margin: 0;
}

.platform-dashboard .platform-hero h1 {
  font-size: 1.65rem;
  line-height: 1.15;
}

.platform-dashboard .platform-hero p {
  margin-bottom: 0;
  color: rgba(226, 232, 240, 0.78);
}

.platform-dashboard .platform-search .form-control {
  min-height: 48px;
  border-color: rgba(45, 140, 255, 0.32);
  border-radius: 8px;
  background: rgba(3, 10, 21, 0.74);
  color: var(--text-primary, #f8fafc);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.platform-dashboard .platform-search .form-control::placeholder {
  color: rgba(203, 213, 225, 0.56);
}

.platform-dashboard .platform-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.5rem;
  align-items: center;
}

.platform-dashboard .platform-search-submit,
.platform-dashboard .platform-search-clear {
  font-size: 0.78rem;
  font-weight: 850;
}

.platform-dashboard .platform-search-submit {
  min-height: 32px;
  padding: 0 0.7rem;
  border: 1px solid rgba(56, 189, 248, 0.36);
  border-radius: 7px;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
}

.platform-dashboard .platform-search-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 0.72rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.1);
  color: rgba(203, 213, 225, 0.72);
  text-decoration: none;
  white-space: nowrap;
}

.platform-dashboard .platform-search-clear:hover,
.platform-dashboard .platform-search-clear:focus {
  border-color: rgba(56, 189, 248, 0.36);
  background: rgba(56, 189, 248, 0.1);
  color: #e2e8f0;
}

.platform-hero-tools {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  justify-content: flex-end;
}

.platform-dashboard .platform-environment {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 0.75rem;
  border: 1px solid rgba(34, 197, 94, 0.38);
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  font-size: 0.8rem;
  font-weight: 800;
}

.platform-dashboard .platform-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
  gap: 1rem;
  align-items: start;
}

.platform-dashboard .platform-main,
.platform-dashboard .platform-sidebar {
  display: grid;
  gap: 1rem;
}

.platform-dashboard .platform-stat-grid,
.platform-dashboard .platform-company-card-grid,
.platform-dashboard .platform-attention-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
}

.platform-dashboard .platform-stat-card,
.platform-dashboard .platform-section,
.platform-dashboard .platform-side-panel {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(8, 18, 34, 0.78);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
}

.platform-dashboard .platform-stat-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.1rem;
  align-items: center;
  min-height: 116px;
  padding: 1rem;
}

.platform-dashboard .platform-stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 900;
}

.platform-dashboard .platform-stat-icon svg {
  width: 48px;
  height: 48px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.platform-dashboard .platform-stat-icon-blue {
  background: rgba(45, 140, 255, 0.14);
  color: #38bdf8;
}

.platform-dashboard .platform-stat-icon-warning {
  background: rgba(245, 158, 11, 0.14);
  color: #f59e0b;
}

.platform-dashboard .platform-stat-icon-green {
  background: rgba(34, 197, 94, 0.14);
  color: #22c55e;
}

.platform-dashboard .platform-stat-card span,
.platform-dashboard .platform-side-panel h2 {
  color: rgba(203, 213, 225, 0.78);
  font-size: 0.75rem;
  font-weight: 850;
  text-transform: uppercase;
}

.platform-dashboard .platform-stat-card strong {
  display: block;
  margin: 0.15rem 0;
  color: #f8fafc;
  font-size: 2rem;
  line-height: 1;
}

.platform-dashboard .platform-stat-warning strong {
  color: #f59e0b;
}

.platform-dashboard .platform-section,
.platform-dashboard .platform-side-panel {
  padding: 1rem;
}

.platform-dashboard .platform-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.platform-dashboard .platform-section-heading h2 {
  font-size: 1.12rem;
  line-height: 1.2;
}

.platform-dashboard .platform-section-heading p {
  margin: 0.18rem 0 0;
  font-size: 0.84rem;
}

.platform-dashboard .platform-section-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  min-height: 30px;
  padding: 0 0.55rem;
  border: 1px solid rgba(45, 140, 255, 0.24);
  border-radius: 999px;
  color: #38bdf8;
  font-weight: 850;
}

.platform-dashboard .platform-company-card,
.platform-dashboard .platform-attention-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
  min-height: 150px;
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(3, 10, 21, 0.58);
}

.platform-dashboard .platform-company-card-actions,
.platform-dashboard .platform-attention-card .platform-company-card-actions {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.platform-dashboard .platform-company-card .platform-company-card-actions {
  padding-bottom: 1.5rem;
}

.platform-dashboard .platform-company-card form,
.platform-dashboard .platform-attention-card form {
  margin: 0;
}

.platform-dashboard .platform-company-card h3,
.platform-dashboard .platform-attention-card h3 {
  margin: 0 0 0.3rem;
  font-size: 0.98rem;
  line-height: 1.25;
}

.platform-dashboard .platform-company-card p {
  margin-bottom: 0;
  font-size: 0.84rem;
}

.platform-dashboard .platform-card-status {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  color: #22c55e;
  font-size: 0.78rem;
  font-weight: 850;
}

.platform-legacy-inventory-card {
  align-content: start;
}

.platform-legacy-inventory-card p:last-child {
  margin-bottom: 0;
}

.platform-dashboard.platform-legacy-inventory-page .platform-legacy-inventory-card .platform-legacy-inventory-status {
  position: static;
  grid-column: 2;
  justify-self: start;
  margin-top: 0.25rem;
  color: #f59e0b !important;
}

.company-picker-page {
  max-width: 980px;
  margin: 0 auto;
}

.company-picker-hero {
  grid-template-columns: minmax(0, 1fr);
}

.company-picker-section {
  margin-top: 1rem;
}

.company-picker-list {
  display: grid;
  gap: 0.65rem;
}

.company-picker-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.9rem;
  align-items: center;
  min-height: 74px;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(3, 10, 21, 0.58);
}

.company-picker-row.active {
  border-color: rgba(40, 231, 255, 0.36);
  box-shadow: inset 3px 0 0 rgba(40, 231, 255, 0.74);
}

.company-picker-row h3 {
  margin: 0 0 0.16rem;
  color: var(--text-heading);
  font-size: 1rem;
}

.company-picker-row p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.84rem;
}

.company-picker-current {
  color: var(--status-scheduled);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.platform-dashboard .platform-company-card .btn,
.platform-dashboard .platform-attention-card .btn,
.platform-dashboard .platform-company-table .btn,
.company-picker-row .btn {
  border-color: rgba(56, 189, 248, 0.4);
  background: linear-gradient(180deg, #38dff8, #18a8d6);
  color: #06111f;
  font-weight: 850;
}

.platform-dashboard .platform-company-card .btn-outline-primary,
.platform-dashboard .platform-attention-card .btn-outline-primary,
.platform-dashboard .platform-company-table .btn-outline-primary {
  color: #9eefff;
  background: rgba(56, 189, 248, 0.08);
}

.platform-dashboard .platform-table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  justify-content: flex-end;
  min-width: max-content;
}

.platform-dashboard .platform-table-actions form {
  margin: 0;
}

.platform-company-form-page {
  max-width: 980px;
  margin: 0 auto;
}

.platform-company-form-hero {
  grid-template-columns: minmax(0, 1fr) auto;
}

.platform-company-form {
  margin-top: 1rem;
}

.platform-company-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.platform-company-form-wide {
  grid-column: 1 / -1;
}

.platform-company-active-field {
  display: grid;
  align-content: center;
  min-height: 76px;
  padding: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(3, 10, 21, 0.42);
}

.platform-company-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1.15rem;
}

.evaluation-evidence-details {
  min-width: 150px;
}

.evaluation-evidence-details summary {
  cursor: pointer;
  font-weight: 750;
}

.evaluation-evidence-text {
  width: min(520px, 70vw);
  margin: 0.75rem 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
}

.evaluation-evidence-hash {
  overflow-wrap: anywhere;
}

.company-settings-page {
  max-width: none;
}

.company-settings-hero {
  grid-template-columns: minmax(0, 1fr) auto;
}

.company-settings-layout {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 330px);
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.company-settings-form {
  margin-top: 0;
}

.company-settings-sections {
  display: grid;
  gap: 0.6rem;
}

.company-settings-sections .platform-company-form {
  margin-top: 0;
}

.company-settings-brand-preview {
  display: grid;
  align-content: center;
  justify-items: start;
  min-height: 78px;
}

.company-settings-brand-preview strong {
  color: var(--text-primary);
  font-size: 1.35rem;
  line-height: 1;
}

.company-settings-brand-preview span {
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.company-logo-preview img {
  display: block;
  max-width: 150px;
  max-height: 54px;
  margin: 0 auto;
  object-fit: contain;
}

.company-logo-editor {
  display: grid;
  grid-template-columns: 165px minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
}

.company-logo-preview {
  min-height: 78px;
  display: grid;
  place-items: center;
  gap: 0.38rem;
  padding: 0.55rem;
  border: 1px solid var(--panel-border);
  border-radius: var(--panel-radius);
  background: var(--panel-background);
  text-align: center;
}

.company-logo-preview small {
  color: var(--text-secondary);
  font-size: 0.68rem;
  font-weight: 750;
}

.company-settings-panel {
  display: grid;
  gap: 0.6rem;
  padding: 0;
}

.company-settings-group {
  padding: 0.72rem 0.82rem;
  border: 1px solid var(--panel-border);
  border-radius: var(--panel-radius);
  background: var(--panel-background);
}

.company-settings-group-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: baseline;
  margin-bottom: 0.52rem;
}

.company-settings-group-heading h2,
.company-settings-group-heading p {
  margin: 0;
}

.company-settings-group-heading h2 {
  font-size: 1rem;
}

.company-settings-group-heading p {
  color: var(--text-secondary);
  font-size: 0.78rem;
}

.company-settings-timezone > div:last-child {
  max-width: 420px;
}

.company-logo-remove {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  margin-top: 0.5rem;
}

.company-logo-remove span {
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.company-settings-locked-panel .platform-future-card {
  margin-top: 0.35rem;
}

.company-settings-page .platform-sidebar {
  gap: 0.65rem;
}

.company-settings-page .platform-side-panel {
  gap: 0.28rem;
  padding: 0.72rem;
}

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

  .company-logo-editor {
    grid-template-columns: 1fr;
  }
}

.platform-membership-page {
  max-width: 1180px;
  margin: 0 auto;
}

.company-permissions-page {
  max-width: 1650px;
}

.company-permissions-page > .platform-layout {
  grid-template-columns: minmax(0, 1fr) minmax(480px, 560px);
}

.company-permissions-member-filter {
  margin: 0 0 0.8rem;
}

.company-permissions-member-filter .form-control {
  max-width: 360px;
}

.company-permissions-member-row {
  cursor: pointer;
}

.company-permissions-member-row:is(:hover, :focus-visible) > * {
  background: rgba(56, 189, 248, 0.1);
}

.company-permissions-member-row.is-selected > * {
  color: #f8fafc;
  background: linear-gradient(90deg, rgba(14, 116, 144, 0.86), rgba(30, 41, 59, 0.92));
  box-shadow: inset 0 1px 0 rgba(186, 230, 253, 0.35), inset 0 -1px 0 rgba(8, 47, 73, 0.72);
}

.company-permissions-member-row.is-selected small {
  color: rgba(240, 249, 255, 0.82);
}

.company-permissions-member-row:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: -2px;
}

.company-permissions-detail-panel {
  position: sticky;
  top: 1rem;
  display: flex !important;
  flex-direction: column;
  max-height: calc(100vh - 2rem);
  overflow: hidden;
}

.company-permissions-detail-header {
  flex: 0 0 auto;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.company-permissions-detail-header h2,
.company-permissions-detail-header p {
  margin-bottom: 0.2rem;
}

.company-permissions-detail-form {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  padding-top: 0.75rem;
}

.company-permissions-save {
  flex: 0 0 auto;
  align-self: flex-start;
  margin-bottom: 0.75rem;
}

.company-permissions-detail-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.company-permissions-access-summary { color: rgba(203, 213, 225, 0.74); }
.company-permissions-access-summary.has-overrides { color: #c4b5fd; }

.company-permissions-role-explainer {
  margin: 0.65rem 0 0 !important;
  color: rgba(203, 213, 225, 0.72);
  font-size: 0.84rem;
  line-height: 1.45;
}

.company-permissions-group {
  width: 100%;
  margin: 0 0 0.6rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 6px;
  background: rgba(3, 10, 21, 0.24);
}

.company-permissions-group summary {
  display: flex;
  justify-content: space-between;
  cursor: pointer;
  padding: 0.7rem 0.75rem;
  color: #e2e8f0;
  font-weight: 800;
}

.company-permissions-group-body { padding: 0 0.75rem 0.75rem; }

.company-permissions-permission {
  display: grid;
  grid-template-columns: 1.1rem minmax(0, 1fr);
  gap: 0.55rem;
  align-items: start;
  margin: 0;
  padding: 0.5rem 0;
}

.company-permissions-permission .form-check-input {
  float: none;
  width: 1rem;
  height: 1rem;
  margin: 0.2rem 0 0;
}

.company-permissions-permission + .company-permissions-permission {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.company-permissions-permission small {
  color: rgba(203, 213, 225, 0.62);
  font-size: 0.78rem;
}

@media (max-width: 1100px) {
  .company-permissions-page > .platform-layout { grid-template-columns: 1fr; }
  .company-permissions-detail-panel { position: static; max-height: none; }
  .company-permissions-detail-scroll { overflow: visible; }
}

[data-p2p-theme="light"] .company-permissions-member-row:is(:hover, :focus-visible) > * {
  background: rgba(190, 244, 253, 0.72);
}

[data-p2p-theme="light"] .company-permissions-member-row.is-selected > * {
  color: #031f28;
  background: linear-gradient(90deg, #77e7f4, #dffbfe);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -1px 0 rgba(8, 151, 184, 0.34);
}

[data-p2p-theme="light"] .company-permissions-member-row.is-selected small {
  color: rgba(3, 31, 40, 0.72) !important;
}

[data-p2p-theme="light"] .company-permissions-group {
  border-color: rgba(8, 151, 184, 0.24);
  background: rgba(239, 252, 255, 0.72);
}

[data-p2p-theme="light"] .company-permissions-role-explainer,
[data-p2p-theme="light"] .company-permissions-permission small {
  color: var(--frost-text-muted);
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] .company-permissions-member-row:is(:hover, :focus-visible) > * {
    background: rgba(190, 244, 253, 0.72);
  }

  [data-p2p-theme="auto"] .company-permissions-member-row.is-selected > * {
    color: #031f28;
    background: linear-gradient(90deg, #77e7f4, #dffbfe);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -1px 0 rgba(8, 151, 184, 0.34);
  }

  [data-p2p-theme="auto"] .company-permissions-member-row.is-selected small {
    color: rgba(3, 31, 40, 0.72) !important;
  }

  [data-p2p-theme="auto"] .company-permissions-group {
    border-color: rgba(8, 151, 184, 0.24);
    background: rgba(239, 252, 255, 0.72);
  }

  [data-p2p-theme="auto"] .company-permissions-role-explainer,
  [data-p2p-theme="auto"] .company-permissions-permission small {
    color: var(--frost-text-muted);
  }
}

.platform-membership-add {
  margin-bottom: 1rem;
}

.platform-membership-add-form {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(180px, 0.36fr) minmax(120px, auto) auto;
  gap: 0.75rem;
  align-items: end;
}

.platform-membership-active-add {
  align-self: center;
  padding-top: 1.8rem;
}

.platform-membership-table td {
  vertical-align: middle;
}

.platform-membership-table td strong,
.platform-membership-table td small {
  display: block;
}

.platform-membership-table td small {
  margin-top: 0.12rem;
  color: var(--text-secondary, #94a3b8);
  font-weight: 700;
}

.platform-membership-row-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto auto;
  gap: 0.5rem;
  align-items: center;
}

.platform-membership-row-active {
  min-width: 86px;
}

@media (min-width: 992px) {
  .platform-membership-page .platform-membership-table {
    min-width: 0;
    width: 100%;
    table-layout: fixed;
  }

  .platform-membership-table th:nth-child(1) { width: 24%; }
  .platform-membership-table th:nth-child(2) { width: 14%; }
  .platform-membership-table th:nth-child(3) { width: 19%; }
  .platform-membership-table th:nth-child(4) { width: 29%; }
  .platform-membership-table th:nth-child(5) { width: 14%; }
  .platform-membership-table td { overflow-wrap: anywhere; }
  .platform-membership-row-form { grid-template-columns: minmax(0, 1fr) auto auto; }
  .platform-membership-row-form .form-select { min-width: 0; }
  .platform-membership-table td:last-child .btn { white-space: normal; }
}

.platform-dashboard .platform-company-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0d1422, #2d8cff);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.platform-dashboard .platform-company-mark-alert {
  background: linear-gradient(135deg, #7f1d1d, #f59e0b);
}

.platform-dashboard .platform-company-mark-sm {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 0.7rem;
}

.platform-dashboard .platform-attention-card {
  border-color: rgba(245, 158, 11, 0.34);
}

.platform-dashboard .platform-attention-card ul {
  margin: 0 0 0.75rem;
  padding-left: 1rem;
  color: rgba(203, 213, 225, 0.78);
  font-size: 0.84rem;
}

.platform-dashboard .platform-empty-state,
.platform-dashboard .platform-unavailable {
  color: rgba(203, 213, 225, 0.72);
}

.platform-dashboard .platform-empty-state {
  grid-column: 1 / -1;
  padding: 1rem;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: rgba(3, 10, 21, 0.44);
}

.platform-dashboard .platform-table-section {
  padding-bottom: 0.5rem;
}

.platform-dashboard .platform-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
}

.platform-dashboard .platform-company-table {
  min-width: 880px;
  margin: 0;
  color: var(--text-primary, #f8fafc);
  --bs-table-bg: transparent;
  --bs-table-color: var(--text-primary, #f8fafc);
  --bs-table-border-color: rgba(148, 163, 184, 0.14);
}

.platform-dashboard .platform-company-table thead th {
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(3, 10, 21, 0.66);
  color: rgba(203, 213, 225, 0.78);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.platform-dashboard .platform-company-table td,
.platform-dashboard .platform-company-table th {
  padding: 0.72rem 0.8rem;
  vertical-align: middle;
}

[data-p2p-theme="dark"] .audit-log-page .platform-section,
[data-p2p-theme="dark"] .audit-log-page .platform-side-panel,
[data-p2p-theme="dark"] .audit-log-page .platform-table-wrap {
  border-color: rgba(118, 238, 255, 0.2);
  background:
    linear-gradient(180deg, rgba(8, 21, 36, 0.92), rgba(5, 15, 28, 0.86)),
    rgba(7, 16, 28, 0.9);
}

[data-p2p-theme="dark"] .audit-log-page .platform-table-wrap {
  box-shadow:
    inset 0 0 0 1px rgba(118, 238, 255, 0.04),
    0 12px 28px rgba(0, 0, 0, 0.16);
}

[data-p2p-theme="dark"] .audit-log-page .platform-company-table {
  --bs-table-border-color: rgba(118, 238, 255, 0.16);
}

[data-p2p-theme="dark"] .audit-log-page .platform-company-table thead th {
  color: #c9d8e0;
  border-color: rgba(118, 238, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(8, 20, 34, 0.98), rgba(4, 11, 22, 0.94)),
    rgba(3, 10, 21, 0.92);
  font-weight: 900;
}

[data-p2p-theme="dark"] .audit-log-page .platform-company-table tbody tr {
  border-color: rgba(118, 238, 255, 0.12);
}

[data-p2p-theme="dark"] .audit-log-page .platform-company-table tbody td {
  border-color: rgba(118, 238, 255, 0.12);
}

[data-p2p-theme="dark"] .audit-log-page .platform-company-table tbody tr:hover > * {
  background: rgba(40, 231, 255, 0.045);
}

[data-p2p-theme="dark"] .audit-log-page .platform-company-table small {
  color: #9eb8c3 !important;
}

[data-p2p-theme="dark"] .audit-log-page .filter-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));
  gap: 0.52rem 0.55rem;
  align-items: end;
}

[data-p2p-theme="dark"] .audit-log-page .filter-stack .form-label,
[data-p2p-theme="dark"] .audit-log-page .platform-side-panel h2 {
  color: #c8e8f0;
  font-weight: 900;
}

[data-p2p-theme="dark"] .audit-log-page .filter-stack .form-label,
[data-p2p-theme="dark"] .audit-log-page .filter-stack :is(.form-control, .form-select) {
  grid-column: 1 / -1;
}

[data-p2p-theme="dark"] .audit-log-page .filter-stack :is(.form-control, .form-select) {
  border-color: rgba(118, 238, 255, 0.28);
  background:
    linear-gradient(180deg, rgba(9, 22, 34, 0.94), rgba(4, 14, 22, 0.92)),
    rgba(4, 12, 18, 0.92);
}

[data-p2p-theme="dark"] .audit-log-page .filter-stack :is(.form-control:focus, .form-select:focus) {
  border-color: rgba(40, 231, 255, 0.82);
  box-shadow: 0 0 0 0.18rem rgba(40, 231, 255, 0.12);
}

[data-p2p-theme="dark"] .audit-log-page .filter-stack .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 34px;
  padding-right: 0.8rem;
  padding-left: 0.8rem;
  border-radius: 7px;
  line-height: 1;
  text-align: center;
}

[data-p2p-theme="dark"] .audit-log-page .filter-stack .btn-outline-primary {
  color: #b9f4ff;
  border-color: rgba(40, 231, 255, 0.48);
  background: rgba(40, 231, 255, 0.06);
}

.platform-dashboard .platform-row-company {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 850;
}

.platform-dashboard .platform-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 0.55rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 850;
}

.platform-dashboard .platform-status-active {
  background: rgba(34, 197, 94, 0.14);
  color: #22c55e;
}

.platform-dashboard .platform-status-muted {
  background: rgba(148, 163, 184, 0.14);
  color: rgba(203, 213, 225, 0.72);
}

.platform-dashboard .platform-side-panel {
  display: grid;
  gap: 0.35rem;
}

.platform-dashboard .platform-side-panel h2 {
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.platform-dashboard .platform-recent-activity h2 {
  font-size: 0.96rem;
  font-weight: 950;
  line-height: 1.15;
}

.platform-dashboard .platform-recent-activity h2 {
  color: #f8fafc !important;
  border-bottom-color: rgba(248, 250, 252, 0.2);
}

.platform-dashboard .platform-side-panel > a,
.platform-dashboard .platform-side-panel > span {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  column-gap: 0.9rem;
  row-gap: 0.16rem;
  align-items: center;
  min-height: 48px;
  padding: 0.58rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  color: var(--text-primary, #f8fafc);
  text-decoration: none;
}

.platform-dashboard .platform-side-panel > a > .platform-side-icon,
.platform-dashboard .platform-side-panel > span > .platform-side-icon {
  grid-row: 1 / span 2;
}

.platform-dashboard .platform-side-panel > a > strong,
.platform-dashboard .platform-side-panel > span > strong {
  grid-column: 2;
  align-self: end;
  min-width: 0;
  line-height: 1.25;
}

.platform-dashboard .platform-side-panel > a > small,
.platform-dashboard .platform-side-panel > span > small {
  display: block;
  grid-column: 2;
  align-self: start;
  min-width: 0;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.platform-dashboard .platform-side-row-future {
  color: rgba(245, 158, 11, 0.96);
}

.platform-dashboard .platform-side-row-future strong,
.platform-dashboard .platform-side-row-future small {
  color: rgba(245, 158, 11, 0.86);
}

.platform-dashboard .platform-side-row-ok strong,
.platform-dashboard .platform-side-row-ok small {
  color: #22c55e;
}

.platform-dashboard .platform-panel-footer-link {
  display: inline-flex !important;
  grid-template-columns: none;
  align-items: center;
  justify-self: end;
  min-height: 0 !important;
  margin-top: 0.35rem;
  padding: 0.25rem 0 0 !important;
  border-bottom: 0 !important;
  color: #38bdf8;
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.platform-dashboard .platform-panel-footer-link:hover,
.platform-dashboard .platform-panel-footer-link:focus {
  color: #7dd3fc;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.launch-readiness-page .company-admin-health-row small {
  color: rgba(203, 213, 225, 0.68);
  font-size: 0.7rem;
  font-weight: 750;
  line-height: 1.32;
  text-align: left;
}

.launch-readiness-page .company-admin-health-row.platform-side-row-ok small {
  color: rgba(134, 239, 172, 0.74);
}

.launch-readiness-page .company-admin-health-row.platform-side-row-future small {
  color: rgba(245, 158, 11, 0.72);
}

.platform-dashboard .platform-side-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #38bdf8;
  font-size: 0.72rem;
  font-weight: 900;
}

.platform-dashboard .platform-side-icon svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.platform-dashboard .platform-side-icon-ok {
  color: #22c55e;
}

.platform-dashboard .platform-side-row-future .platform-side-icon {
  color: #f59e0b;
}

.platform-dashboard .platform-side-panel strong {
  font-size: 0.9rem;
}

.platform-dashboard .platform-side-panel small {
  color: rgba(203, 213, 225, 0.62);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: right;
}

[data-p2p-theme="dark"] .platform-dashboard .platform-side-panel .platform-oversight-action,
[data-p2p-theme="dark"] .platform-dashboard .platform-side-panel .platform-oversight-action:is(:hover, :focus),
[data-p2p-theme="dark"] .platform-dashboard .platform-side-panel .platform-oversight-action :is(strong, small) {
  color: #031014;
  text-shadow: none;
}

[data-p2p-theme="dark"] .platform-dashboard .platform-side-panel .platform-oversight-action small {
  opacity: 0.7;
}

.launch-readiness-page .platform-side-panel > .platform-side-row {
  row-gap: 0.28rem;
}

.launch-readiness-page .platform-side-panel > .platform-side-row > small {
  line-height: 1.42;
  text-align: left;
}

.platform-dashboard .platform-side-panel .platform-health-status {
  color: rgba(203, 213, 225, 0.62);
}

.platform-dashboard .platform-future-card {
  padding: 0.85rem;
  border: 1px dashed rgba(148, 163, 184, 0.26);
  border-radius: 8px;
  background: rgba(3, 10, 21, 0.44);
}

.platform-dashboard .platform-future-card strong {
  display: inline-flex;
  margin-bottom: 0.35rem;
  color: #38bdf8;
  font-size: 0.76rem;
  text-transform: uppercase;
}

.platform-dashboard .platform-future-card p {
  margin: 0;
  color: rgba(203, 213, 225, 0.68);
  font-size: 0.84rem;
  line-height: 1.45;
}

@media (max-width: 1100px) {
  .platform-dashboard .platform-hero,
  .platform-dashboard .platform-layout,
  .launch-readiness-overview,
  .platform-readiness-hero-grid {
    grid-template-columns: 1fr;
  }

  .platform-readiness-primary,
  .platform-readiness-metric {
    min-height: 0;
    padding: 0.8rem 0;
    border-right: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  }

  .platform-readiness-metric {
    justify-items: start;
    text-align: left;
  }

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

@media (max-width: 900px) {
  .platform-dashboard .platform-stat-grid,
  .platform-dashboard .platform-company-card-grid,
  .platform-dashboard .platform-attention-grid,
  .platform-dashboard .platform-sidebar {
    grid-template-columns: 1fr;
  }

  .platform-dashboard .platform-company-card,
  .platform-dashboard .platform-attention-card,
  .launch-readiness-progress,
  .launch-readiness-item,
  .launch-readiness-next,
  .monday-morning-summary,
  .monday-morning-step,
  .platform-readiness-item {
    grid-template-columns: 1fr;
  }

  .launch-readiness-score {
    justify-items: start;
    text-align: left;
  }

  .platform-dashboard .platform-company-card,
  .platform-dashboard .platform-attention-card,
  .launch-readiness-item,
  .platform-readiness-item {
    min-height: 0;
  }

  .launch-readiness-next .btn {
    justify-self: start;
  }

  .launch-readiness-item-action {
    justify-content: flex-start;
  }

  .monday-morning-step-actions {
    justify-content: flex-start;
  }

  .monday-morning-step-details div {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .company-picker-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .platform-company-form-hero,
  .platform-company-form-grid {
    grid-template-columns: 1fr;
  }

  .platform-membership-add-form,
  .platform-membership-row-form {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .company-picker-current {
    justify-self: start;
  }

  .platform-shell-actions {
    align-items: flex-start;
    flex-direction: column;
    margin: 0.5rem 0;
  }

  .company-switcher,
  .company-switcher-toggle {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 1399.98px) and (min-width: 992px) {
  .navbar .navbar-collapse {
    flex-wrap: wrap;
  }

  .app-navbar-collapse .app-domain-nav {
    flex: 1 1 auto;
    margin-right: 0 !important;
  }

  .global-service-order-actions {
    flex: 0 1 420px;
    order: 3;
    width: 100%;
    margin: 0.5rem auto 0;
  }

  .navbar-utility-actions {
    margin-left: auto;
  }
}

@media (min-width: 1400px) {
  .navbar-expand-lg .app-navbar-collapse {
    display: flex !important;
    flex: 1 1 auto;
    flex-wrap: wrap;
    width: 100%;
    align-items: center;
    column-gap: 0.75rem;
    row-gap: 0.5rem;
  }

  .app-navbar-collapse .app-domain-nav {
    flex: 0 1 auto;
    min-width: 0;
    margin-right: 0 !important;
  }

  .app-navbar-collapse .global-service-order-actions {
    flex: 1 1 260px;
    min-width: 180px;
    margin: 0;
  }

  .app-navbar-collapse .navbar-utility-actions {
    flex: 0 1 auto;
  }

  .app-navbar-collapse .platform-shell-actions {
    margin-right: 0;
  }
}

@media (max-width: 1399.98px) and (min-width: 992px) {
  .navbar-nav {
    gap: 0.35rem;
  }

  .navbar .app-domain-toggle {
    min-width: 0;
    gap: 0.2rem;
    padding-inline: 0.4rem;
  }

  .app-domain-icon {
    display: none;
  }

  .global-service-order-actions,
  .navbar-utility-actions,
  .platform-shell-actions {
    gap: 0.35rem;
  }

  .navbar-utility-actions {
    justify-content: flex-end;
  }

  .global-service-order-search {
    flex-basis: 182px;
    min-width: 150px;
  }
}

@media (max-width: 991.98px) {
  .global-service-order-actions {
    width: 100%;
    max-width: 420px;
    margin: 0.5rem 0;
  }

  .global-service-order-search {
    flex: 1 1 auto;
  }

  .navbar-utility-actions {
    flex-wrap: wrap;
    margin: 0.5rem 0;
  }
}

/* Frost usability layer: shared all-day work surfaces, not one-off page skins. */
[data-p2p-theme="light"] {
  --frost-surface: rgba(253, 254, 255, 0.96);
  --frost-surface-soft: rgba(244, 249, 252, 0.92);
  --frost-surface-tint: rgba(232, 244, 249, 0.82);
  --frost-line: rgba(67, 101, 119, 0.24);
  --frost-line-strong: rgba(42, 91, 113, 0.38);
  --frost-shadow: 0 14px 34px rgba(31, 58, 72, 0.11);
  --frost-dark-canvas: #102631;
  --frost-dark-canvas-2: #173744;
  --frost-dark-text: #eefbff;
  --frost-dark-muted: #b8d1db;
}

[data-p2p-theme="light"] :is(
  .accounting-queue-filter,
  .accounting-work-queue,
  .accounting-queue-main,
  .accounting-queue-kpi,
  .accounting-summary-panel,
  .accounting-summary-grid div,
  .accounting-queue-note,
  .command-attention-panel,
  .command-coverage-panel,
  .dispatch-schedule-group-header,
  .dispatch-schedule-row,
  .dispatch-schedule-suggestions,
  .dispatch-schedule-order,
  .tech-workday-sidebar,
  .tech-workday-tech-option,
  .tech-workday-summary,
  .tech-workday-summary-grid div,
  .workflow-age-pill,
  .schedule-summary-grid a,
  .dashboard-mini-grid a,
  .dashboard-mini-grid > span,
  .dispatch-edit-summary,
  .routing-selected-panel,
  .routing-selected-list-panel
) {
  color: var(--ops-text) !important;
  border-color: var(--frost-line) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(250, 253, 254, 0.66) 48%, rgba(235, 246, 250, 0.66)),
    var(--frost-surface) !important;
  box-shadow: var(--frost-shadow) !important;
}

[data-p2p-theme="light"] :is(
  .text-secondary,
  .form-text,
  .small.text-secondary,
  .command-alert small,
  .command-summary-list span,
  .command-activity-list .text-secondary,
  .accounting-work-queue-copy small + small,
  .accounting-queue-note,
  .accounting-queue-kpi small,
  .accounting-queue-kpi-copy span,
  .accounting-summary-panel summary span,
  .accounting-summary-grid dt,
  .workflow-age-pill span,
  .schedule-summary-grid span,
  .dashboard-mini-grid a span,
  .dashboard-mini-grid > span,
  .dispatch-schedule-address,
  .dispatch-schedule-row .text-secondary,
  .dispatch-schedule-group-header p,
  .routing-summary-inline,
  .routing-board-legend
) {
  color: var(--ops-muted) !important;
}

[data-p2p-theme="light"] :is(
  .table,
  .order-list-table,
  .dispatch-coverage-table,
  .import-preview-table
) {
  --bs-table-bg: rgba(253, 254, 255, 0.86);
  --bs-table-color: var(--ops-text);
  --bs-table-border-color: rgba(67, 101, 119, 0.22);
  --bs-table-hover-bg: rgba(40, 199, 225, 0.11);
  --bs-table-hover-color: var(--ops-text);
  color: var(--ops-text);
}

[data-p2p-theme="light"] :is(.table thead th, .table-light, .order-list-table thead th, .dispatch-coverage-table thead th, .import-preview-table thead th) {
  color: #284d60 !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(220, 237, 245, 0.84)),
    #e4f1f6 !important;
  border-color: rgba(67, 101, 119, 0.24) !important;
}

[data-p2p-theme="light"] :is(.table tbody td, .order-list-table tbody td, .dispatch-coverage-table tbody td, .import-preview-table tbody td) {
  color: var(--ops-text) !important;
  border-color: rgba(67, 101, 119, 0.18) !important;
}

[data-p2p-theme="light"] :is(.table-hover tbody tr:hover > *, .order-list-table tbody tr:hover > *, .dispatch-coverage-table tbody tr:hover > *, .import-preview-table tbody tr:hover > *) {
  color: #0e2835 !important;
  background: rgba(213, 247, 253, 0.62) !important;
}

[data-p2p-theme="light"] :is(.table-active, .table-active > *, .order-list-table tr.table-active > *, .order-list-table tr.selected > *) {
  --bs-table-bg: rgba(190, 244, 253, 0.72);
  color: #092532 !important;
  background: rgba(190, 244, 253, 0.72) !important;
  box-shadow: inset 4px 0 0 var(--ops-cyan);
}

[data-p2p-theme="light"] .command-alert {
  color: var(--ops-text);
  border-bottom-color: rgba(67, 101, 119, 0.14);
  background: transparent;
}

[data-p2p-theme="light"] .command-alert:hover,
[data-p2p-theme="light"] .command-alert:focus {
  color: var(--ops-text);
  background: rgba(218, 247, 252, 0.42);
}

[data-p2p-theme="light"] :is(.command-alert strong, .command-summary-list strong, .accounting-work-queue-row strong, .accounting-queue-kpi strong, .accounting-summary-grid dd, .dispatch-schedule-customer, .dispatch-schedule-order-number) {
  color: var(--ops-text) !important;
}

[data-p2p-theme="light"] .accounting-work-queue-header {
  border-bottom-color: rgba(67, 101, 119, 0.16);
}

[data-p2p-theme="light"] .accounting-work-queue-row {
  color: var(--ops-text);
  border-bottom-color: rgba(67, 101, 119, 0.14);
  background: transparent;
}

[data-p2p-theme="light"] .accounting-work-queue-row:hover,
[data-p2p-theme="light"] .accounting-work-queue-row:focus {
  color: var(--ops-text);
  border-color: rgba(40, 199, 225, 0.36);
  background: rgba(218, 247, 252, 0.48);
  box-shadow: inset 4px 0 0 var(--ops-cyan);
}

[data-p2p-theme="light"] .accounting-work-queue-row.active {
  color: #06313e;
  border-color: rgba(40, 199, 225, 0.82);
  background:
    linear-gradient(90deg, rgba(40, 231, 255, 0.2), rgba(40, 231, 255, 0.06)),
    rgba(231, 250, 253, 0.92);
  box-shadow: inset 4px 0 0 var(--ops-cyan), 0 10px 24px rgba(31, 58, 72, 0.12);
}

[data-p2p-theme="light"] .accounting-queue-history-link {
  border-bottom-color: rgba(67, 101, 119, 0.14);
}

[data-p2p-theme="light"] .accounting-open-folder-title .badge,
[data-p2p-theme="light"] .accounting-work-queue-title em {
  color: #0f5132 !important;
  border-color: rgba(36, 170, 105, 0.38);
  background: rgba(84, 241, 166, 0.2) !important;
}

[data-p2p-theme="light"] :is(.dispatch-schedule-suggestions, .dispatch-schedule-fields, .dispatch-schedule-notes, .dispatch-schedule-actions) {
  border-color: rgba(67, 101, 119, 0.16);
}

[data-p2p-theme="light"] .dispatch-schedule-suggestions {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(237, 246, 250, 0.78)),
    var(--frost-surface-soft) !important;
}

[data-p2p-theme="light"] .dispatch-schedule-suggestions .fw-semibold {
  color: var(--ops-text) !important;
}

/* Available Options is an operational decision panel; Frost keeps it light while capacity color remains semantic. */
[data-p2p-theme="light"] .dispatch-suggestion-box {
  border-color: rgba(67, 101, 119, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(225, 241, 247, 0.9)),
    var(--frost-surface-tint);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

[data-p2p-theme="light"] .dispatch-suggestion-box-empty {
  border-color: color-mix(in srgb, var(--status-capacity) 58%, var(--frost-line));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--status-capacity) 13%, rgba(255, 255, 255, 0.92)), rgba(255, 246, 247, 0.94)),
    var(--frost-surface);
  box-shadow: inset 4px 0 0 var(--status-capacity), 0 5px 12px rgba(159, 40, 57, 0.1);
}

[data-p2p-theme="light"] .dispatch-suggestion-box > .fw-semibold,
[data-p2p-theme="light"] .dispatch-suggestion-tech,
[data-p2p-theme="light"] .dispatch-suggestion-value {
  color: var(--frost-text-primary) !important;
}

[data-p2p-theme="light"] .dispatch-suggestion-card {
  border-color: rgba(67, 101, 119, 0.22);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.94), rgba(238, 248, 251, 0.92)),
    var(--frost-surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 4px 10px rgba(31, 58, 72, 0.06);
}

[data-p2p-theme="light"] .dispatch-suggestion-card-success,
[data-p2p-theme="light"] .dispatch-suggestion-card-warning,
[data-p2p-theme="light"] .dispatch-suggestion-card-danger {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 4px 10px rgba(31, 58, 72, 0.06), 0 0 12px color-mix(in srgb, var(--capacity-status-color) 10%, transparent);
}

[data-p2p-theme="light"] :is(.dispatch-suggestion-meta, .dispatch-suggestion-label) {
  color: var(--frost-text-secondary) !important;
}

[data-p2p-theme="light"] :is(.dispatch-dashboard-map-panel, .command-map-panel, .routing-board-panel, .tech-workday-calendar-panel) {
  color: var(--frost-dark-text) !important;
  border-color: rgba(34, 172, 201, 0.28) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 36%),
    linear-gradient(135deg, rgba(31, 63, 76, 0.95), rgba(12, 29, 38, 0.98)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 18px 42px rgba(31, 58, 72, 0.18) !important;
}

[data-p2p-theme="light"] :is(.command-map-panel .command-panel-header h2, .dispatch-dashboard-map-panel h2, .routing-board-panel h2, .tech-workday-calendar-panel h2) {
  color: var(--frost-dark-text) !important;
}

/* Keep the Command Center legend within the Frost surface instead of a competing dark banner. */
[data-p2p-theme="light"] .command-map-legend {
  border-color: rgba(67, 101, 119, 0.3) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(225, 241, 247, 0.84)),
    var(--frost-surface) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 4px 10px rgba(31, 58, 72, 0.08) !important;
}

[data-p2p-theme="light"] .command-map-legend span {
  color: var(--frost-text-primary) !important;
}

/* Frost uses dark text on the light Command Center activity surface. */
[data-p2p-theme="light"] :is(.command-activity-list a, .command-activity-list span, .command-activity-list time) {
  color: var(--frost-text-primary) !important;
}

[data-p2p-theme="light"] :is(.command-map-panel p, .command-map-footer span, .dispatch-dashboard-map-status, .routing-board-legend, .tech-workday-calendar-panel .text-secondary) {
  color: var(--frost-dark-muted) !important;
}

[data-p2p-theme="light"] :is(.routing-board-scroll, .tech-workday-calendar-grid) {
  border-color: rgba(101, 221, 240, 0.28) !important;
  background: rgba(8, 23, 31, 0.62) !important;
}

[data-p2p-theme="light"] :is(.routing-tech-heading, .routing-day-heading, .routing-tech-card, .routing-cell, .tech-workday-corner, .tech-workday-column-heading, .tech-workday-tech-cell, .tech-workday-day-cell) {
  color: var(--frost-dark-text) !important;
  border-color: rgba(101, 221, 240, 0.26) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 44%),
    var(--frost-dark-canvas) !important;
}

[data-p2p-theme="light"] :is(.routing-empty-cell, .routing-day-total, .tech-workday-day-count, .tech-workday-empty-cell, .tech-workday-empty-workspace, .tech-workday-tech-cell small) {
  color: var(--frost-dark-muted) !important;
}

[data-p2p-theme="light"] :is(.routing-cell-selected, .tech-workday-day-selected) {
  border-color: rgba(40, 231, 255, 0.96) !important;
  background:
    linear-gradient(180deg, rgba(40, 231, 255, 0.2), rgba(40, 231, 255, 0.08)),
    var(--frost-dark-canvas-2) !important;
  box-shadow: inset 0 0 0 2px rgba(40, 231, 255, 0.82), 0 0 18px rgba(40, 231, 255, 0.24) !important;
}

[data-p2p-theme="light"] :is(.badge, .routing-status-chip, .dispatch-availability-badge, .dispatch-zip-badge, .import-status-badge) {
  font-weight: 900;
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] {
    --frost-surface: rgba(253, 254, 255, 0.96);
    --frost-surface-soft: rgba(244, 249, 252, 0.92);
    --frost-surface-tint: rgba(232, 244, 249, 0.82);
    --frost-line: rgba(67, 101, 119, 0.24);
    --frost-line-strong: rgba(42, 91, 113, 0.38);
    --frost-shadow: 0 14px 34px rgba(31, 58, 72, 0.11);
    --frost-dark-canvas: #102631;
    --frost-dark-canvas-2: #173744;
    --frost-dark-text: #eefbff;
    --frost-dark-muted: #b8d1db;
  }

  [data-p2p-theme="auto"] :is(
    .accounting-queue-filter,
    .accounting-work-queue,
    .accounting-queue-main,
    .accounting-queue-kpi,
    .accounting-summary-panel,
    .accounting-summary-grid div,
    .accounting-queue-note,
    .command-attention-panel,
    .command-coverage-panel,
    .dispatch-schedule-group-header,
    .dispatch-schedule-row,
    .dispatch-schedule-suggestions,
    .dispatch-schedule-order,
    .tech-workday-sidebar,
    .tech-workday-tech-option,
    .tech-workday-summary,
    .tech-workday-summary-grid div,
    .workflow-age-pill,
    .schedule-summary-grid a,
    .dashboard-mini-grid a,
    .dashboard-mini-grid > span,
    .dispatch-edit-summary,
    .routing-selected-panel,
    .routing-selected-list-panel
  ) {
    color: var(--ops-text) !important;
    border-color: var(--frost-line) !important;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(250, 253, 254, 0.66) 48%, rgba(235, 246, 250, 0.66)),
      var(--frost-surface) !important;
    box-shadow: var(--frost-shadow) !important;
  }

  [data-p2p-theme="auto"] :is(
    .text-secondary,
    .form-text,
    .small.text-secondary,
    .command-alert small,
    .command-summary-list span,
    .command-activity-list .text-secondary,
    .accounting-work-queue-copy small + small,
    .accounting-queue-note,
    .accounting-queue-kpi small,
    .accounting-queue-kpi-copy span,
    .accounting-summary-panel summary span,
    .accounting-summary-grid dt,
    .workflow-age-pill span,
    .schedule-summary-grid span,
    .dashboard-mini-grid a span,
    .dashboard-mini-grid > span,
    .dispatch-schedule-address,
    .dispatch-schedule-row .text-secondary,
    .dispatch-schedule-group-header p,
    .routing-summary-inline,
    .routing-board-legend
  ) {
    color: var(--ops-muted) !important;
  }

  [data-p2p-theme="auto"] :is(
    .table,
    .order-list-table,
    .dispatch-coverage-table,
    .import-preview-table
  ) {
    --bs-table-bg: rgba(253, 254, 255, 0.86);
    --bs-table-color: var(--ops-text);
    --bs-table-border-color: rgba(67, 101, 119, 0.22);
    --bs-table-hover-bg: rgba(40, 199, 225, 0.11);
    --bs-table-hover-color: var(--ops-text);
    color: var(--ops-text);
  }

  [data-p2p-theme="auto"] :is(.table thead th, .table-light, .order-list-table thead th, .dispatch-coverage-table thead th, .import-preview-table thead th) {
    color: #284d60 !important;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(220, 237, 245, 0.84)),
      #e4f1f6 !important;
    border-color: rgba(67, 101, 119, 0.24) !important;
  }

  [data-p2p-theme="auto"] :is(.table tbody td, .order-list-table tbody td, .dispatch-coverage-table tbody td, .import-preview-table tbody td) {
    color: var(--ops-text) !important;
    border-color: rgba(67, 101, 119, 0.18) !important;
  }

  [data-p2p-theme="auto"] :is(.table-hover tbody tr:hover > *, .order-list-table tbody tr:hover > *, .dispatch-coverage-table tbody tr:hover > *, .import-preview-table tbody tr:hover > *) {
    color: #0e2835 !important;
    background: rgba(213, 247, 253, 0.62) !important;
  }

  [data-p2p-theme="auto"] :is(.table-active, .table-active > *, .order-list-table tr.table-active > *, .order-list-table tr.selected > *) {
    --bs-table-bg: rgba(190, 244, 253, 0.72);
    color: #092532 !important;
    background: rgba(190, 244, 253, 0.72) !important;
    box-shadow: inset 4px 0 0 var(--ops-cyan);
  }

  [data-p2p-theme="auto"] .command-alert {
    color: var(--ops-text);
    border-bottom-color: rgba(67, 101, 119, 0.14);
    background: transparent;
  }

  [data-p2p-theme="auto"] .command-alert:hover,
  [data-p2p-theme="auto"] .command-alert:focus {
    color: var(--ops-text);
    background: rgba(218, 247, 252, 0.42);
  }

  [data-p2p-theme="auto"] :is(.command-alert strong, .command-summary-list strong, .accounting-work-queue-row strong, .accounting-queue-kpi strong, .accounting-summary-grid dd, .dispatch-schedule-customer, .dispatch-schedule-order-number) {
    color: var(--ops-text) !important;
  }

  [data-p2p-theme="auto"] .accounting-work-queue-header {
    border-bottom-color: rgba(67, 101, 119, 0.16);
  }

  [data-p2p-theme="auto"] .accounting-work-queue-row {
    color: var(--ops-text);
    border-bottom-color: rgba(67, 101, 119, 0.14);
    background: transparent;
  }

  [data-p2p-theme="auto"] .accounting-work-queue-row:hover,
  [data-p2p-theme="auto"] .accounting-work-queue-row:focus {
    color: var(--ops-text);
    border-color: rgba(40, 199, 225, 0.36);
    background: rgba(218, 247, 252, 0.48);
    box-shadow: inset 4px 0 0 var(--ops-cyan);
  }

  [data-p2p-theme="auto"] .accounting-work-queue-row.active {
    color: #06313e;
    border-color: rgba(40, 199, 225, 0.82);
    background:
      linear-gradient(90deg, rgba(40, 231, 255, 0.2), rgba(40, 231, 255, 0.06)),
      rgba(231, 250, 253, 0.92);
    box-shadow: inset 4px 0 0 var(--ops-cyan), 0 10px 24px rgba(31, 58, 72, 0.12);
  }

  [data-p2p-theme="auto"] .accounting-queue-history-link {
    border-bottom-color: rgba(67, 101, 119, 0.14);
  }

  [data-p2p-theme="auto"] .accounting-open-folder-title .badge,
  [data-p2p-theme="auto"] .accounting-work-queue-title em {
    color: #0f5132 !important;
    border-color: rgba(36, 170, 105, 0.38);
    background: rgba(84, 241, 166, 0.2) !important;
  }

  [data-p2p-theme="auto"] :is(.dispatch-schedule-suggestions, .dispatch-schedule-fields, .dispatch-schedule-notes, .dispatch-schedule-actions) {
    border-color: rgba(67, 101, 119, 0.16);
  }

  [data-p2p-theme="auto"] .dispatch-schedule-suggestions {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(237, 246, 250, 0.78)),
      var(--frost-surface-soft) !important;
  }

  [data-p2p-theme="auto"] .dispatch-schedule-suggestions .fw-semibold {
    color: var(--ops-text) !important;
  }

  [data-p2p-theme="auto"] .dispatch-suggestion-box {
    border-color: rgba(67, 101, 119, 0.28);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(225, 241, 247, 0.9)),
      var(--frost-surface-tint);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }

  [data-p2p-theme="auto"] .dispatch-suggestion-box-empty {
    border-color: color-mix(in srgb, var(--status-capacity) 58%, var(--frost-line));
    background:
      linear-gradient(135deg, color-mix(in srgb, var(--status-capacity) 13%, rgba(255, 255, 255, 0.92)), rgba(255, 246, 247, 0.94)),
      var(--frost-surface);
    box-shadow: inset 4px 0 0 var(--status-capacity), 0 5px 12px rgba(159, 40, 57, 0.1);
  }

  [data-p2p-theme="auto"] .dispatch-suggestion-box > .fw-semibold,
  [data-p2p-theme="auto"] .dispatch-suggestion-tech,
  [data-p2p-theme="auto"] .dispatch-suggestion-value {
    color: var(--frost-text-primary) !important;
  }

  [data-p2p-theme="auto"] .dispatch-suggestion-card {
    border-color: rgba(67, 101, 119, 0.22);
    background:
      linear-gradient(90deg, rgba(255, 255, 255, 0.94), rgba(238, 248, 251, 0.92)),
      var(--frost-surface);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 4px 10px rgba(31, 58, 72, 0.06);
  }

  [data-p2p-theme="auto"] .dispatch-suggestion-card-success,
  [data-p2p-theme="auto"] .dispatch-suggestion-card-warning,
  [data-p2p-theme="auto"] .dispatch-suggestion-card-danger {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 4px 10px rgba(31, 58, 72, 0.06), 0 0 12px color-mix(in srgb, var(--capacity-status-color) 10%, transparent);
  }

  [data-p2p-theme="auto"] :is(.dispatch-suggestion-meta, .dispatch-suggestion-label) {
    color: var(--frost-text-secondary) !important;
  }

  [data-p2p-theme="auto"] :is(.dispatch-dashboard-map-panel, .command-map-panel, .routing-board-panel, .tech-workday-calendar-panel) {
    color: var(--frost-dark-text) !important;
    border-color: rgba(34, 172, 201, 0.28) !important;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 36%),
      linear-gradient(135deg, rgba(31, 63, 76, 0.95), rgba(12, 29, 38, 0.98)) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 18px 42px rgba(31, 58, 72, 0.18) !important;
  }

  [data-p2p-theme="auto"] :is(.command-map-panel .command-panel-header h2, .dispatch-dashboard-map-panel h2, .routing-board-panel h2, .tech-workday-calendar-panel h2) {
    color: var(--frost-dark-text) !important;
  }

  [data-p2p-theme="auto"] .command-map-legend {
    border-color: rgba(67, 101, 119, 0.3) !important;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(225, 241, 247, 0.84)),
      var(--frost-surface) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 4px 10px rgba(31, 58, 72, 0.08) !important;
  }

  [data-p2p-theme="auto"] .command-map-legend span {
    color: var(--frost-text-primary) !important;
  }

  [data-p2p-theme="auto"] :is(.command-map-panel p, .command-map-footer span, .dispatch-dashboard-map-status, .routing-board-legend, .tech-workday-calendar-panel .text-secondary) {
    color: var(--frost-dark-muted) !important;
  }

  [data-p2p-theme="auto"] :is(.routing-board-scroll, .tech-workday-calendar-grid) {
    border-color: rgba(101, 221, 240, 0.28) !important;
    background: rgba(8, 23, 31, 0.62) !important;
  }

  [data-p2p-theme="auto"] :is(.routing-tech-heading, .routing-day-heading, .routing-tech-card, .routing-cell, .tech-workday-corner, .tech-workday-column-heading, .tech-workday-tech-cell, .tech-workday-day-cell) {
    color: var(--frost-dark-text) !important;
    border-color: rgba(101, 221, 240, 0.26) !important;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 44%),
      var(--frost-dark-canvas) !important;
  }

  [data-p2p-theme="auto"] :is(.routing-empty-cell, .routing-day-total, .tech-workday-day-count, .tech-workday-empty-cell, .tech-workday-empty-workspace, .tech-workday-tech-cell small) {
    color: var(--frost-dark-muted) !important;
  }

  [data-p2p-theme="auto"] :is(.routing-cell-selected, .tech-workday-day-selected) {
    border-color: rgba(40, 231, 255, 0.96) !important;
    background:
      linear-gradient(180deg, rgba(40, 231, 255, 0.2), rgba(40, 231, 255, 0.08)),
      var(--frost-dark-canvas-2) !important;
    box-shadow: inset 0 0 0 2px rgba(40, 231, 255, 0.82), 0 0 18px rgba(40, 231, 255, 0.24) !important;
  }

  [data-p2p-theme="auto"] :is(.badge, .routing-status-chip, .dispatch-availability-badge, .dispatch-zip-badge, .import-status-badge) {
    font-weight: 900;
  }
}

/* Frost semantic color polish: reserve cyan for real action and identity. */
[data-p2p-theme="light"] {
  --frost-text-primary: #102838;
  --frost-text-secondary: #34596b;
  --frost-text-muted: #536f7d;
  --frost-text-subtle: #667f8a;
  --frost-placeholder: #748d99;
  --frost-disabled-text: #8fa4ae;
  --frost-disabled-border: #c8d7de;
  --frost-disabled-bg: #edf3f6;
  --frost-action: #0897b8;
  --frost-action-strong: #047d9d;
  --frost-outline-border: #98c2cf;
  --frost-table-header-text: #284e61;
  --frost-table-header-bg: #dfedf3;
  --frost-selected-row: #c9f2f8;
  --frost-empty-text: #607985;
  --frost-dark-muted-readable: #c4d8e1;
}

[data-p2p-theme="light"] :is(
  body,
  p,
  li,
  dd,
  .table td,
  .form-control,
  .form-select,
  .command-alert strong,
  .command-summary-list strong,
  .accounting-work-queue-row strong,
  .accounting-queue-kpi strong,
  .dispatch-schedule-order-number,
  .dispatch-schedule-customer,
  .routing-stop-card,
  .tech-workday-stop-row
) {
  color: var(--frost-text-primary) !important;
}

[data-p2p-theme="light"] :is(
  .text-secondary,
  .form-text,
  figcaption,
  caption,
  .small.text-secondary,
  .command-alert small,
  .command-summary-list span,
  .command-activity-list .text-secondary,
  .command-map-footer span,
  .dispatch-dashboard-map-status,
  .dispatch-card-description,
  .dispatch-schedule-row .text-secondary,
  .dispatch-schedule-address,
  .dispatch-dashboard-panel-header p,
  .kpi-trend-note,
  .kpi-refresh-stamp,
  .accounting-queue-kpi-copy span,
  .accounting-queue-kpi small,
  .accounting-summary-grid dt,
  .accounting-summary-panel summary span,
  .export-side-panel p,
  .export-title-line .text-secondary,
  .import-title-file,
  .import-file-name,
  .workflow-age-pill span,
  .schedule-summary-grid span,
  .dashboard-mini-grid a span,
  .routing-day-total,
  .routing-summary-inline,
  .routing-board-legend,
  .tech-workday-day-count,
  .tech-workday-panel-heading span,
  .tech-workday-summary-grid span,
  .platform-dashboard .platform-stat-card small,
  .platform-dashboard .platform-company-card p
) {
  color: var(--frost-text-muted) !important;
}

[data-p2p-theme="light"] :is(
  .routing-empty-cell,
  .tech-workday-empty-cell,
  .tech-workday-empty-panel,
  .tech-workday-empty-workspace,
  .dispatch-schedule-suggestions .text-secondary,
  .import-empty-state,
  .empty-state,
  [data-empty-state]
) {
  color: var(--frost-empty-text) !important;
}

[data-p2p-theme="light"] :is(.form-control::placeholder, textarea::placeholder, input::placeholder) {
  color: var(--frost-placeholder) !important;
  opacity: 1;
}

[data-p2p-theme="light"] :is(
  .form-control:disabled,
  .form-select:disabled,
  .btn:disabled,
  .btn.disabled,
  .disabled,
  [aria-disabled="true"],
  .dispatch-dashboard-tabs .disabled,
  .import-steps span:not(.active),
  .btn-check:not(:checked) + .btn-outline-secondary
) {
  color: var(--frost-disabled-text) !important;
  border-color: var(--frost-disabled-border) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(231, 239, 243, 0.72)),
    var(--frost-disabled-bg) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

[data-p2p-theme="light"] :is(.btn:disabled, .btn.disabled, [aria-disabled="true"]) :is(svg, i, span) {
  color: inherit !important;
}

[data-p2p-theme="light"] :is(a:not(.btn):not(.command-kpi):not(.dispatch-exception-card):not(.dispatch-workflow-card):not(.qa-queue-card):not(.opportunity-card), .table-sort-link, .command-map-footer a, .command-panel-header-link a, .accounting-queue-history-link) {
  color: var(--frost-action-strong);
}

[data-p2p-theme="light"] :is(a:not(.btn):not(.command-kpi):not(.dispatch-exception-card):not(.dispatch-workflow-card):not(.qa-queue-card):not(.opportunity-card), .table-sort-link, .command-map-footer a, .command-panel-header-link a, .accounting-queue-history-link):hover,
[data-p2p-theme="light"] :is(a:not(.btn):not(.command-kpi):not(.dispatch-exception-card):not(.dispatch-workflow-card):not(.qa-queue-card):not(.opportunity-card), .table-sort-link, .command-map-footer a, .command-panel-header-link a, .accounting-queue-history-link):focus {
  color: #05647f;
}

[data-p2p-theme="light"] :is(.btn-outline-primary, .btn-outline-info) {
  color: var(--frost-action-strong);
  border-color: rgba(8, 151, 184, 0.46);
  background: rgba(248, 253, 254, 0.72);
  box-shadow: none;
}

[data-p2p-theme="light"] :is(.btn-outline-primary, .btn-outline-info):hover,
[data-p2p-theme="light"] :is(.btn-outline-primary, .btn-outline-info):focus {
  color: #052c38;
  border-color: rgba(8, 151, 184, 0.7);
  background: rgba(190, 244, 253, 0.72);
  box-shadow: 0 0 0 0.18rem rgba(8, 151, 184, 0.14);
}

[data-p2p-theme="light"] :is(.btn-outline-secondary, .btn-secondary) {
  color: var(--frost-text-secondary);
  border-color: var(--frost-outline-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(232, 242, 247, 0.82)),
    #f5f9fb;
  box-shadow: none;
}

[data-p2p-theme="light"] :is(.btn-outline-secondary, .btn-secondary):hover,
[data-p2p-theme="light"] :is(.btn-outline-secondary, .btn-secondary):focus {
  color: var(--frost-text-primary);
  border-color: rgba(83, 117, 133, 0.52);
  background: #e6f1f6;
}

[data-p2p-theme="light"] :is(.dispatch-dashboard-tabs .btn:not(.active), .nav-tabs .nav-link:not(.active), .app-domain-menu .dropdown-item.disabled) {
  color: var(--frost-text-secondary) !important;
}

[data-p2p-theme="light"] :is(.dispatch-dashboard-tabs .btn.active, .nav-tabs .nav-link.active, .btn-check:checked + .btn-outline-secondary) {
  color: #031f28 !important;
  border-color: rgba(8, 151, 184, 0.7) !important;
  background: linear-gradient(180deg, #77e7f4, #18c9df) !important;
  box-shadow: 0 8px 20px rgba(8, 151, 184, 0.18) !important;
}

[data-p2p-theme="light"] :is(.table thead th, .table-light, .order-list-table thead th, .dispatch-coverage-table thead th, .import-preview-table thead th, .accounting-ledger-table th, .platform-dashboard .platform-company-table thead th) {
  --bs-table-bg: var(--frost-table-header-bg);
  --bs-table-color: var(--frost-table-header-text);
  color: var(--frost-table-header-text) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(212, 231, 239, 0.9)),
    var(--frost-table-header-bg) !important;
  border-color: rgba(67, 101, 119, 0.28) !important;
}

/* Keep the import review surfaces in the same Frost language as Upload and Match Columns. */
[data-p2p-theme="light"] .import-health-item,
[data-p2p-theme="light"] .import-health-score,
[data-p2p-theme="light"] .import-review-actions-launch {
  color: var(--frost-text-primary);
  border-color: var(--frost-line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(236, 247, 251, 0.76)),
    var(--frost-surface);
  box-shadow: var(--frost-shadow);
}

[data-p2p-theme="light"] .import-health-item-good,
[data-p2p-theme="light"] .import-health-score-ready {
  border-color: rgba(36, 145, 91, 0.34);
  background: linear-gradient(180deg, rgba(245, 255, 249, 0.94), rgba(220, 245, 230, 0.82)), var(--frost-surface);
}

[data-p2p-theme="light"] .import-health-item-warning,
[data-p2p-theme="light"] .import-health-score.needs-attention {
  border-color: rgba(190, 66, 85, 0.34);
  background: linear-gradient(180deg, rgba(255, 248, 249, 0.94), rgba(251, 228, 232, 0.84)), var(--frost-surface);
}

[data-p2p-theme="light"] .import-order-preview .table-responsive {
  background: var(--frost-surface);
  scrollbar-color: rgba(8, 151, 184, 0.7) rgba(226, 241, 246, 0.9);
}

[data-p2p-theme="light"] .import-preview-table th:first-child,
[data-p2p-theme="light"] .import-preview-table td:first-child {
  background: var(--frost-surface-soft);
  border-left-color: rgba(67, 101, 119, 0.24);
  border-right-color: rgba(67, 101, 119, 0.3);
  box-shadow: 1px 0 0 rgba(67, 101, 119, 0.18);
}

[data-p2p-theme="light"] .import-preview-table thead th:first-child {
  background: #e4f1f6;
}

[data-p2p-theme="light"] .import-preview-status-ready {
  color: #24915b;
}

[data-p2p-theme="light"] .import-preview-status-warnings {
  color: var(--frost-text-secondary);
}

[data-p2p-theme="light"] .import-preview-table td.import-preview-value-warning :is(.import-preview-detail-cell strong, .import-preview-detail-cell span, .import-preview-item-cell strong, .import-preview-item-cell span, .import-preview-empty-item) {
  color: #a96f08;
}

[data-p2p-theme="light"] .import-review-actions-launch span,
[data-p2p-theme="light"] .import-preview-items span,
[data-p2p-theme="light"] .import-grouping-items span {
  color: var(--frost-text-secondary);
}

[data-p2p-theme="light"] :is(.import-preview-item strong, .import-preview-item-cell strong, .import-preview-detail-cell strong, .import-grouping-items strong) {
  color: var(--frost-text-primary);
}

[data-p2p-theme="light"] :is(.import-preview-detail-cell span, .import-preview-empty-item) {
  color: var(--frost-text-secondary);
}

[data-p2p-theme="light"] .import-exit-modal {
  background: rgba(26, 51, 63, 0.38);
}

[data-p2p-theme="light"] .import-exit-dialog {
  border-color: var(--frost-line-strong);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(230, 244, 249, 0.9)),
    var(--frost-surface);
  box-shadow: 0 24px 70px rgba(31, 58, 72, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

[data-p2p-theme="light"] .import-exit-dialog h2 {
  color: var(--frost-text-primary);
}

[data-p2p-theme="light"] .import-exit-dialog p {
  color: var(--frost-text-secondary);
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] .import-preview-table th:first-child,
  [data-p2p-theme="auto"] .import-preview-table td:first-child {
    background: var(--frost-surface-soft);
    border-left-color: rgba(67, 101, 119, 0.24);
    border-right-color: rgba(67, 101, 119, 0.3);
    box-shadow: 1px 0 0 rgba(67, 101, 119, 0.18);
  }

  [data-p2p-theme="auto"] .import-preview-table thead th:first-child {
    background: #e4f1f6;
  }

  [data-p2p-theme="auto"] .import-preview-status-ready {
    color: #24915b;
  }

  [data-p2p-theme="auto"] .import-preview-status-warnings {
    color: var(--frost-text-secondary);
  }

  [data-p2p-theme="auto"] .import-preview-table td.import-preview-value-warning :is(.import-preview-detail-cell strong, .import-preview-detail-cell span, .import-preview-item-cell strong, .import-preview-item-cell span, .import-preview-empty-item) {
    color: #a96f08;
  }

  [data-p2p-theme="auto"] .import-exit-modal {
    background: rgba(26, 51, 63, 0.38);
  }

  [data-p2p-theme="auto"] .import-exit-dialog {
    border-color: var(--frost-line-strong);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(230, 244, 249, 0.9)),
      var(--frost-surface);
    box-shadow: 0 24px 70px rgba(31, 58, 72, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.96);
  }

  [data-p2p-theme="auto"] .import-exit-dialog h2 {
    color: var(--frost-text-primary);
  }

  [data-p2p-theme="auto"] .import-exit-dialog p {
    color: var(--frost-text-secondary);
  }
}

[data-p2p-theme="light"] :is(.table tbody td .text-secondary, .order-list-table tbody td .text-secondary, .dispatch-coverage-table tbody td .text-secondary) {
  color: var(--frost-text-muted) !important;
}

[data-p2p-theme="light"] :is(.table-active, .table-active > *, .order-list-table tr.table-active > *, .order-list-table tr.selected > *) {
  --bs-table-bg: var(--frost-selected-row);
  color: var(--frost-text-primary) !important;
  background: var(--frost-selected-row) !important;
}

[data-p2p-theme="light"] .address-suggestions {
  border-color: rgba(8, 151, 184, 0.32);
  background: var(--frost-surface);
  box-shadow: 0 8px 18px rgba(31, 58, 72, 0.13);
}

[data-p2p-theme="light"] .address-suggestions .list-group-item {
  color: var(--frost-text-primary) !important;
  border-color: rgba(67, 101, 119, 0.18);
  background: rgba(247, 252, 254, 0.98) !important;
}

[data-p2p-theme="light"] .address-suggestions .list-group-item .text-secondary {
  color: var(--frost-text-secondary) !important;
}

[data-p2p-theme="light"] .address-suggestions .list-group-item:hover,
[data-p2p-theme="light"] .address-suggestions .list-group-item:focus,
[data-p2p-theme="light"] .address-suggestions .list-group-item:active {
  color: var(--frost-text-primary) !important;
  border-color: rgba(8, 151, 184, 0.38);
  background: rgba(213, 247, 253, 0.82) !important;
}

[data-p2p-theme="light"] .service-order-history-modal #customer-history-list > .list-group-item:not(:hover):not(:focus):not(:focus-within) {
  color: var(--frost-text-primary) !important;
  border-color: rgba(67, 101, 119, 0.18);
  background: var(--frost-surface) !important;
}

[data-p2p-theme="light"] .service-order-history-modal #customer-history-list > .list-group-item:is(:hover, :focus, :focus-within) {
  color: var(--frost-text-primary) !important;
  border-color: rgba(8, 151, 184, 0.38);
  background: rgba(213, 247, 253, 0.82) !important;
}

[data-p2p-theme="light"] .service-order-history-modal .btn-close {
  filter: none;
  opacity: 0.7;
}

[data-p2p-theme="light"] :is(.badge.text-bg-success, .badge.bg-success, .dispatch-availability-badge.active, .import-status-badge-good) {
  color: #06351f !important;
  background-color: #56dfa0 !important;
  border-color: rgba(14, 128, 75, 0.28) !important;
}

[data-p2p-theme="light"] :is(.badge.text-bg-danger, .badge.bg-danger, .badge.text-bg-red) {
  color: #ffffff !important;
  background-color: #d83a4e !important;
  border-color: rgba(126, 24, 40, 0.32) !important;
}

[data-p2p-theme="light"] :is(.badge.text-bg-warning, .badge.bg-warning, .routing-status-warning) {
  color: #3a2900 !important;
  background-color: #f3c438 !important;
  border-color: rgba(158, 110, 0, 0.34) !important;
}

[data-p2p-theme="light"] :is(.badge.text-bg-info, .badge.bg-info, .badge.text-bg-primary, .badge.bg-primary, .import-status-badge) {
  color: #042f3b !important;
  background-color: #5fd4e8 !important;
  border-color: rgba(8, 125, 157, 0.28) !important;
}

[data-p2p-theme="light"] :is(.badge.text-bg-secondary, .badge.bg-secondary, .dispatch-availability-badge.inactive) {
  color: #243f4c !important;
  background-color: #d9e6ec !important;
  border-color: rgba(86, 117, 132, 0.3) !important;
}

.semantic-pill-success { --semantic-pill-color: var(--status-scheduled); }
.semantic-pill-warning { --semantic-pill-color: var(--status-unscheduled); }
.semantic-pill-danger { --semantic-pill-color: var(--status-capacity); }
.semantic-pill-routing { --semantic-pill-color: var(--status-routing); }

[data-p2p-theme="light"] .semantic-pill:not(.is-muted) {
  color: #142b38 !important;
  border-color: color-mix(in srgb, var(--semantic-pill-color) 48%, rgba(42, 91, 113, 0.26)) !important;
  background: color-mix(in srgb, var(--semantic-pill-color) 34%, #ffffff) !important;
  box-shadow: none;
}

[data-p2p-theme="light"] :is(.routing-status-routing, .tech-workday-route-routing) {
  color: #142b38 !important;
  border-color: color-mix(in srgb, var(--status-routing) 52%, rgba(42, 91, 113, 0.26)) !important;
  background: color-mix(in srgb, var(--status-routing) 38%, #ffffff) !important;
}

[data-p2p-theme="light"] :is(.command-util-ring strong, .command-coverage-stats strong, .kpi-management-value, .kpi-attention-card strong, .dispatch-workflow-card strong, .dispatch-exception-card strong) {
  color: var(--frost-text-primary) !important;
}

[data-p2p-theme="light"] :is(.command-util-ring span, .command-coverage-stats div:last-child span, .command-coverage-stats div:last-child strong, .kpi-management-body span, .kpi-management-goal, .kpi-management-trend) {
  color: var(--frost-text-muted) !important;
}

[data-p2p-theme="light"] :is(.command-map-panel, .dispatch-dashboard-map-panel, .routing-board-panel, .tech-workday-calendar-panel) :is(
  .text-secondary,
  .command-map-footer span,
  .dispatch-dashboard-map-status,
  .routing-empty-cell,
  .routing-day-total,
  .routing-board-legend,
  .tech-workday-empty-cell,
  .tech-workday-empty-workspace,
  .tech-workday-day-count,
  .tech-workday-tech-cell small
) {
  color: var(--frost-dark-muted-readable) !important;
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] {
    --frost-text-primary: #102838;
    --frost-text-secondary: #34596b;
    --frost-text-muted: #536f7d;
    --frost-text-subtle: #667f8a;
    --frost-placeholder: #748d99;
    --frost-disabled-text: #8fa4ae;
    --frost-disabled-border: #c8d7de;
    --frost-disabled-bg: #edf3f6;
    --frost-action: #0897b8;
    --frost-action-strong: #047d9d;
    --frost-outline-border: #98c2cf;
    --frost-table-header-text: #284e61;
    --frost-table-header-bg: #dfedf3;
    --frost-selected-row: #c9f2f8;
    --frost-empty-text: #607985;
    --frost-dark-muted-readable: #c4d8e1;
  }

  [data-p2p-theme="auto"] :is(
    body,
    p,
    li,
    dd,
    .table td,
    .form-control,
    .form-select,
    .command-alert strong,
    .command-summary-list strong,
    .accounting-work-queue-row strong,
    .accounting-queue-kpi strong,
    .dispatch-schedule-order-number,
    .dispatch-schedule-customer,
    .routing-stop-card,
    .tech-workday-stop-row
  ) {
    color: var(--frost-text-primary) !important;
  }

  [data-p2p-theme="auto"] :is(
    .text-secondary,
    .form-text,
    figcaption,
    caption,
    .small.text-secondary,
    .command-alert small,
    .command-summary-list span,
    .command-activity-list .text-secondary,
    .command-map-footer span,
    .dispatch-dashboard-map-status,
    .dispatch-card-description,
    .dispatch-schedule-row .text-secondary,
    .dispatch-schedule-address,
    .dispatch-dashboard-panel-header p,
    .kpi-trend-note,
    .kpi-refresh-stamp,
    .accounting-queue-kpi-copy span,
    .accounting-queue-kpi small,
    .accounting-summary-grid dt,
    .accounting-summary-panel summary span,
    .export-side-panel p,
    .export-title-line .text-secondary,
    .import-title-file,
    .import-file-name,
    .workflow-age-pill span,
    .schedule-summary-grid span,
    .dashboard-mini-grid a span,
    .routing-day-total,
    .routing-summary-inline,
    .routing-board-legend,
    .tech-workday-day-count,
    .tech-workday-panel-heading span,
    .tech-workday-summary-grid span,
    .platform-dashboard .platform-stat-card small,
    .platform-dashboard .platform-company-card p
  ) {
    color: var(--frost-text-muted) !important;
  }

  [data-p2p-theme="auto"] :is(
    .routing-empty-cell,
    .tech-workday-empty-cell,
    .tech-workday-empty-panel,
    .tech-workday-empty-workspace,
    .dispatch-schedule-suggestions .text-secondary,
    .import-empty-state,
    .empty-state,
    [data-empty-state]
  ) {
    color: var(--frost-empty-text) !important;
  }

  [data-p2p-theme="auto"] :is(.form-control::placeholder, textarea::placeholder, input::placeholder) {
    color: var(--frost-placeholder) !important;
    opacity: 1;
  }

  [data-p2p-theme="auto"] :is(
    .form-control:disabled,
    .form-select:disabled,
    .btn:disabled,
    .btn.disabled,
    .disabled,
    [aria-disabled="true"],
    .dispatch-dashboard-tabs .disabled,
    .import-steps span:not(.active),
    .btn-check:not(:checked) + .btn-outline-secondary
  ) {
    color: var(--frost-disabled-text) !important;
    border-color: var(--frost-disabled-border) !important;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(231, 239, 243, 0.72)),
      var(--frost-disabled-bg) !important;
    box-shadow: none !important;
    text-shadow: none !important;
    opacity: 1 !important;
  }

  [data-p2p-theme="auto"] :is(.btn:disabled, .btn.disabled, [aria-disabled="true"]) :is(svg, i, span) {
    color: inherit !important;
  }

  [data-p2p-theme="auto"] :is(a:not(.btn):not(.command-kpi):not(.dispatch-exception-card):not(.dispatch-workflow-card):not(.qa-queue-card):not(.opportunity-card), .table-sort-link, .command-map-footer a, .command-panel-header-link a, .accounting-queue-history-link) {
    color: var(--frost-action-strong);
  }

  [data-p2p-theme="auto"] :is(a:not(.btn):not(.command-kpi):not(.dispatch-exception-card):not(.dispatch-workflow-card):not(.qa-queue-card):not(.opportunity-card), .table-sort-link, .command-map-footer a, .command-panel-header-link a, .accounting-queue-history-link):hover,
  [data-p2p-theme="auto"] :is(a:not(.btn):not(.command-kpi):not(.dispatch-exception-card):not(.dispatch-workflow-card):not(.qa-queue-card):not(.opportunity-card), .table-sort-link, .command-map-footer a, .command-panel-header-link a, .accounting-queue-history-link):focus {
    color: #05647f;
  }

  [data-p2p-theme="auto"] :is(.btn-outline-primary, .btn-outline-info) {
    color: var(--frost-action-strong);
    border-color: rgba(8, 151, 184, 0.46);
    background: rgba(248, 253, 254, 0.72);
    box-shadow: none;
  }

  [data-p2p-theme="auto"] :is(.btn-outline-primary, .btn-outline-info):hover,
  [data-p2p-theme="auto"] :is(.btn-outline-primary, .btn-outline-info):focus {
    color: #052c38;
    border-color: rgba(8, 151, 184, 0.7);
    background: rgba(190, 244, 253, 0.72);
    box-shadow: 0 0 0 0.18rem rgba(8, 151, 184, 0.14);
  }

  [data-p2p-theme="auto"] :is(.btn-outline-secondary, .btn-secondary) {
    color: var(--frost-text-secondary);
    border-color: var(--frost-outline-border);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(232, 242, 247, 0.82)),
      #f5f9fb;
    box-shadow: none;
  }

  [data-p2p-theme="auto"] :is(.btn-outline-secondary, .btn-secondary):hover,
  [data-p2p-theme="auto"] :is(.btn-outline-secondary, .btn-secondary):focus {
    color: var(--frost-text-primary);
    border-color: rgba(83, 117, 133, 0.52);
    background: #e6f1f6;
  }

  [data-p2p-theme="auto"] :is(.dispatch-dashboard-tabs .btn:not(.active), .nav-tabs .nav-link:not(.active), .app-domain-menu .dropdown-item.disabled) {
    color: var(--frost-text-secondary) !important;
  }

  [data-p2p-theme="auto"] :is(.dispatch-dashboard-tabs .btn.active, .nav-tabs .nav-link.active, .btn-check:checked + .btn-outline-secondary) {
    color: #031f28 !important;
    border-color: rgba(8, 151, 184, 0.7) !important;
    background: linear-gradient(180deg, #77e7f4, #18c9df) !important;
    box-shadow: 0 8px 20px rgba(8, 151, 184, 0.18) !important;
  }

  [data-p2p-theme="auto"] :is(.table thead th, .table-light, .order-list-table thead th, .dispatch-coverage-table thead th, .import-preview-table thead th, .accounting-ledger-table th, .platform-dashboard .platform-company-table thead th) {
    --bs-table-bg: var(--frost-table-header-bg);
    --bs-table-color: var(--frost-table-header-text);
    color: var(--frost-table-header-text) !important;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(212, 231, 239, 0.9)),
      var(--frost-table-header-bg) !important;
    border-color: rgba(67, 101, 119, 0.28) !important;
  }

  [data-p2p-theme="auto"] :is(.table tbody td .text-secondary, .order-list-table tbody td .text-secondary, .dispatch-coverage-table tbody td .text-secondary) {
    color: var(--frost-text-muted) !important;
  }

  [data-p2p-theme="auto"] :is(.table-active, .table-active > *, .order-list-table tr.table-active > *, .order-list-table tr.selected > *) {
    --bs-table-bg: var(--frost-selected-row);
    color: var(--frost-text-primary) !important;
    background: var(--frost-selected-row) !important;
  }

  [data-p2p-theme="auto"] .address-suggestions {
    border-color: rgba(8, 151, 184, 0.32);
    background: var(--frost-surface);
    box-shadow: 0 8px 18px rgba(31, 58, 72, 0.13);
  }

  [data-p2p-theme="auto"] .address-suggestions .list-group-item {
    color: var(--frost-text-primary) !important;
    border-color: rgba(67, 101, 119, 0.18);
    background: rgba(247, 252, 254, 0.98) !important;
  }

  [data-p2p-theme="auto"] .address-suggestions .list-group-item .text-secondary {
    color: var(--frost-text-secondary) !important;
  }

  [data-p2p-theme="auto"] .address-suggestions .list-group-item:hover,
  [data-p2p-theme="auto"] .address-suggestions .list-group-item:focus,
  [data-p2p-theme="auto"] .address-suggestions .list-group-item:active {
    color: var(--frost-text-primary) !important;
    border-color: rgba(8, 151, 184, 0.38);
    background: rgba(213, 247, 253, 0.82) !important;
  }

  [data-p2p-theme="auto"] .service-order-history-modal #customer-history-list > .list-group-item:not(:hover):not(:focus):not(:focus-within) {
    color: var(--frost-text-primary) !important;
    border-color: rgba(67, 101, 119, 0.18);
    background: var(--frost-surface) !important;
  }

  [data-p2p-theme="auto"] .service-order-history-modal #customer-history-list > .list-group-item:is(:hover, :focus, :focus-within) {
    color: var(--frost-text-primary) !important;
    border-color: rgba(8, 151, 184, 0.38);
    background: rgba(213, 247, 253, 0.82) !important;
  }

  [data-p2p-theme="auto"] .service-order-history-modal .btn-close {
    filter: none;
    opacity: 0.7;
  }

  [data-p2p-theme="auto"] :is(.badge.text-bg-success, .badge.bg-success, .dispatch-availability-badge.active, .import-status-badge-good) {
    color: #06351f !important;
    background-color: #56dfa0 !important;
    border-color: rgba(14, 128, 75, 0.28) !important;
  }

  [data-p2p-theme="auto"] :is(.badge.text-bg-danger, .badge.bg-danger, .badge.text-bg-red) {
    color: #ffffff !important;
    background-color: #d83a4e !important;
    border-color: rgba(126, 24, 40, 0.32) !important;
  }

  [data-p2p-theme="auto"] :is(.badge.text-bg-warning, .badge.bg-warning, .routing-status-warning) {
    color: #3a2900 !important;
    background-color: #f3c438 !important;
    border-color: rgba(158, 110, 0, 0.34) !important;
  }

  [data-p2p-theme="auto"] :is(.badge.text-bg-info, .badge.bg-info, .badge.text-bg-primary, .badge.bg-primary, .import-status-badge) {
    color: #042f3b !important;
    background-color: #5fd4e8 !important;
    border-color: rgba(8, 125, 157, 0.28) !important;
  }

  [data-p2p-theme="auto"] :is(.badge.text-bg-secondary, .badge.bg-secondary, .dispatch-availability-badge.inactive) {
    color: #243f4c !important;
    background-color: #d9e6ec !important;
    border-color: rgba(86, 117, 132, 0.3) !important;
  }

  .semantic-pill-success { --semantic-pill-color: var(--status-scheduled); }
  .semantic-pill-warning { --semantic-pill-color: var(--status-unscheduled); }
  .semantic-pill-danger { --semantic-pill-color: var(--status-capacity); }
  .semantic-pill-routing { --semantic-pill-color: var(--status-routing); }

  [data-p2p-theme="auto"] .semantic-pill:not(.is-muted) {
    color: #142b38 !important;
    border-color: color-mix(in srgb, var(--semantic-pill-color) 48%, rgba(42, 91, 113, 0.26)) !important;
    background: color-mix(in srgb, var(--semantic-pill-color) 34%, #ffffff) !important;
    box-shadow: none;
  }

  [data-p2p-theme="auto"] :is(.routing-status-routing, .tech-workday-route-routing) {
    color: #142b38 !important;
    border-color: color-mix(in srgb, var(--status-routing) 52%, rgba(42, 91, 113, 0.26)) !important;
    background: color-mix(in srgb, var(--status-routing) 38%, #ffffff) !important;
  }

  [data-p2p-theme="auto"] :is(.command-util-ring strong, .command-coverage-stats strong, .kpi-management-value, .kpi-attention-card strong, .dispatch-workflow-card strong, .dispatch-exception-card strong) {
    color: var(--frost-text-primary) !important;
  }

  [data-p2p-theme="auto"] :is(.command-util-ring span, .command-coverage-stats div:last-child span, .command-coverage-stats div:last-child strong, .kpi-management-body span, .kpi-management-goal, .kpi-management-trend) {
    color: var(--frost-text-muted) !important;
  }

  [data-p2p-theme="auto"] :is(.command-map-panel, .dispatch-dashboard-map-panel, .routing-board-panel, .tech-workday-calendar-panel) :is(
    .text-secondary,
    .command-map-footer span,
    .dispatch-dashboard-map-status,
    .routing-empty-cell,
    .routing-day-total,
    .routing-board-legend,
    .tech-workday-empty-cell,
    .tech-workday-empty-workspace,
    .tech-workday-day-count,
    .tech-workday-tech-cell small
  ) {
    color: var(--frost-dark-muted-readable) !important;
  }
}

[data-p2p-theme="light"] .dispatch-dashboard-tabs a:not(.active) {
  color: var(--frost-action-strong) !important;
  border-color: rgba(8, 151, 184, 0.42) !important;
  background: rgba(248, 253, 254, 0.78) !important;
  box-shadow: none !important;
}

[data-p2p-theme="light"] .dispatch-dashboard-tabs a:not(.active):hover,
[data-p2p-theme="light"] .dispatch-dashboard-tabs a:not(.active):focus {
  color: #052c38 !important;
  border-color: rgba(8, 151, 184, 0.7) !important;
  background: rgba(190, 244, 253, 0.72) !important;
  box-shadow: 0 0 0 0.18rem rgba(8, 151, 184, 0.14) !important;
  transform: none;
}

[data-p2p-theme="light"] .dispatch-dashboard-tabs .active {
  color: #031f28 !important;
  border-color: rgba(8, 151, 184, 0.7) !important;
  background: linear-gradient(180deg, #77e7f4, #18c9df) !important;
  box-shadow: 0 8px 20px rgba(8, 151, 184, 0.18) !important;
}

[data-p2p-theme="light"] .dispatch-dashboard-tabs span.disabled {
  color: var(--frost-disabled-text) !important;
  border-color: var(--frost-disabled-border) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(231, 239, 243, 0.72)),
    var(--frost-disabled-bg) !important;
  box-shadow: none !important;
  opacity: 1 !important;
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] .dispatch-dashboard-tabs a:not(.active) {
    color: var(--frost-action-strong) !important;
    border-color: rgba(8, 151, 184, 0.42) !important;
    background: rgba(248, 253, 254, 0.78) !important;
    box-shadow: none !important;
  }

  [data-p2p-theme="auto"] .dispatch-dashboard-tabs a:not(.active):hover,
  [data-p2p-theme="auto"] .dispatch-dashboard-tabs a:not(.active):focus {
    color: #052c38 !important;
    border-color: rgba(8, 151, 184, 0.7) !important;
    background: rgba(190, 244, 253, 0.72) !important;
    box-shadow: 0 0 0 0.18rem rgba(8, 151, 184, 0.14) !important;
    transform: none;
  }

  [data-p2p-theme="auto"] .dispatch-dashboard-tabs .active {
    color: #031f28 !important;
    border-color: rgba(8, 151, 184, 0.7) !important;
    background: linear-gradient(180deg, #77e7f4, #18c9df) !important;
    box-shadow: 0 8px 20px rgba(8, 151, 184, 0.18) !important;
  }

  [data-p2p-theme="auto"] .dispatch-dashboard-tabs span.disabled {
    color: var(--frost-disabled-text) !important;
    border-color: var(--frost-disabled-border) !important;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(231, 239, 243, 0.72)),
      var(--frost-disabled-bg) !important;
    box-shadow: none !important;
    opacity: 1 !important;
  }
}

[data-p2p-theme="light"] .routing-summary-inline {
  color: var(--frost-text-muted) !important;
}

[data-p2p-theme="light"] .routing-summary-inline span {
  color: var(--frost-text-secondary) !important;
  border-color: rgba(83, 117, 133, 0.32) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(226, 239, 245, 0.86)),
    #eef6f9 !important;
}

[data-p2p-theme="light"] .routing-summary-inline strong {
  color: var(--frost-text-primary) !important;
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] .routing-summary-inline {
    color: var(--frost-text-muted) !important;
  }

  [data-p2p-theme="auto"] .routing-summary-inline span {
    color: var(--frost-text-secondary) !important;
    border-color: rgba(83, 117, 133, 0.32) !important;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(226, 239, 245, 0.86)),
      #eef6f9 !important;
  }

  [data-p2p-theme="auto"] .routing-summary-inline strong {
    color: var(--frost-text-primary) !important;
  }
}

[data-p2p-theme="light"] .import-progress-meter {
  border-color: rgba(36, 170, 105, 0.34) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(232, 246, 240, 0.78)),
    #f3fbf7 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86) !important;
}

[data-p2p-theme="light"] .import-progress-meter > div {
  border-color: rgba(67, 101, 119, 0.28) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(219, 233, 239, 0.84)),
    #dceaf0 !important;
  box-shadow: inset 0 1px 2px rgba(31, 58, 72, 0.14) !important;
}

[data-p2p-theme="light"] .import-progress-meter span {
  opacity: 1 !important;
  background: linear-gradient(90deg, #2ebf78, #54d999) !important;
  box-shadow: none !important;
}

[data-p2p-theme="light"] .import-progress-meter.progress-0 span {
  background: transparent !important;
}

[data-p2p-theme="light"] .import-progress-meter strong {
  color: #168256 !important;
  font-weight: 900;
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] .import-progress-meter {
    border-color: rgba(36, 170, 105, 0.34) !important;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(232, 246, 240, 0.78)),
      #f3fbf7 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86) !important;
  }

  [data-p2p-theme="auto"] .import-progress-meter > div {
    border-color: rgba(67, 101, 119, 0.28) !important;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(219, 233, 239, 0.84)),
      #dceaf0 !important;
    box-shadow: inset 0 1px 2px rgba(31, 58, 72, 0.14) !important;
  }

  [data-p2p-theme="auto"] .import-progress-meter span {
    opacity: 1 !important;
    background: linear-gradient(90deg, #2ebf78, #54d999) !important;
    box-shadow: none !important;
  }

  [data-p2p-theme="auto"] .import-progress-meter.progress-0 span {
    background: transparent !important;
  }

  [data-p2p-theme="auto"] .import-progress-meter strong {
    color: #168256 !important;
    font-weight: 900;
  }
}

[data-p2p-theme="light"] #accountingTabs {
  border-bottom-color: rgba(8, 151, 184, 0.22) !important;
}

[data-p2p-theme="light"] #accountingTabs .nav-link:not(.active):not(.border-danger) {
  color: var(--frost-action-strong) !important;
  border-color: rgba(8, 151, 184, 0.42) !important;
  background: rgba(248, 253, 254, 0.78) !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

[data-p2p-theme="light"] #accountingTabs .nav-link:not(.active):not(.border-danger):hover,
[data-p2p-theme="light"] #accountingTabs .nav-link:not(.active):not(.border-danger):focus {
  color: #052c38 !important;
  border-color: rgba(8, 151, 184, 0.7) !important;
  background: rgba(190, 244, 253, 0.72) !important;
  box-shadow: 0 0 0 0.18rem rgba(8, 151, 184, 0.14) !important;
}

[data-p2p-theme="light"] #accountingTabs .nav-link.active:not(.border-danger) {
  color: #031f28 !important;
  border-color: rgba(8, 151, 184, 0.7) !important;
  background: linear-gradient(180deg, #77e7f4, #18c9df) !important;
  box-shadow: 0 8px 20px rgba(8, 151, 184, 0.18) !important;
  text-shadow: none !important;
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] #accountingTabs {
    border-bottom-color: rgba(8, 151, 184, 0.22) !important;
  }

  [data-p2p-theme="auto"] #accountingTabs .nav-link:not(.active):not(.border-danger) {
    color: var(--frost-action-strong) !important;
    border-color: rgba(8, 151, 184, 0.42) !important;
    background: rgba(248, 253, 254, 0.78) !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  [data-p2p-theme="auto"] #accountingTabs .nav-link:not(.active):not(.border-danger):hover,
  [data-p2p-theme="auto"] #accountingTabs .nav-link:not(.active):not(.border-danger):focus {
    color: #052c38 !important;
    border-color: rgba(8, 151, 184, 0.7) !important;
    background: rgba(190, 244, 253, 0.72) !important;
    box-shadow: 0 0 0 0.18rem rgba(8, 151, 184, 0.14) !important;
  }

  [data-p2p-theme="auto"] #accountingTabs .nav-link.active:not(.border-danger) {
    color: #031f28 !important;
    border-color: rgba(8, 151, 184, 0.7) !important;
    background: linear-gradient(180deg, #77e7f4, #18c9df) !important;
    box-shadow: 0 8px 20px rgba(8, 151, 184, 0.18) !important;
    text-shadow: none !important;
  }
}

[data-p2p-theme="light"] .command-util-ring > div {
  background:
    radial-gradient(circle at 50% 8%, rgba(40, 231, 255, 0.08), transparent 44%),
    #071821 !important;
  box-shadow: inset 0 0 0 1px rgba(174, 229, 239, 0.12);
}

[data-p2p-theme="light"] .command-util-ring strong {
  color: #c9f3ff !important;
  text-shadow: none;
}

[data-p2p-theme="light"] .command-util-ring span {
  color: #d3e6ee !important;
}

[data-p2p-theme="light"] .command-alert-count {
  color: #ffffff !important;
  border: 1px solid color-mix(in srgb, var(--command-tone-color, #607985) 48%, rgba(31, 58, 72, 0.22)) !important;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--command-tone-color, #607985) 70%, #ffffff 8%), color-mix(in srgb, var(--command-tone-color, #607985) 62%, #102838 28%)) !important;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--command-tone-color, #607985) 18%, transparent) !important;
}

[data-p2p-theme="light"] .command-alert-count-zero {
  color: #075437 !important;
  border-color: rgba(36, 170, 105, 0.32) !important;
  background:
    linear-gradient(180deg, rgba(225, 255, 242, 0.96), rgba(177, 247, 215, 0.92)) !important;
  box-shadow: 0 6px 14px rgba(36, 170, 105, 0.14) !important;
}

[data-p2p-theme="light"] .command-alert-chevron {
  color: #8fb9c6 !important;
  opacity: 1;
}

[data-p2p-theme="light"] .command-alert:hover .command-alert-chevron,
[data-p2p-theme="light"] .command-alert:focus .command-alert-chevron {
  color: var(--frost-action-strong) !important;
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] .command-util-ring > div {
    background:
      radial-gradient(circle at 50% 8%, rgba(40, 231, 255, 0.08), transparent 44%),
      #071821 !important;
    box-shadow: inset 0 0 0 1px rgba(174, 229, 239, 0.12);
  }

  [data-p2p-theme="auto"] .command-util-ring strong {
    color: #c9f3ff !important;
    text-shadow: none;
  }

  [data-p2p-theme="auto"] .command-util-ring span {
    color: #d3e6ee !important;
  }

  [data-p2p-theme="auto"] .command-alert-count {
    color: #ffffff !important;
    border: 1px solid color-mix(in srgb, var(--command-tone-color, #607985) 48%, rgba(31, 58, 72, 0.22)) !important;
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--command-tone-color, #607985) 70%, #ffffff 8%), color-mix(in srgb, var(--command-tone-color, #607985) 62%, #102838 28%)) !important;
    box-shadow: 0 8px 18px color-mix(in srgb, var(--command-tone-color, #607985) 18%, transparent) !important;
  }

  [data-p2p-theme="auto"] .command-alert-count-zero {
    color: #075437 !important;
    border-color: rgba(36, 170, 105, 0.32) !important;
    background:
      linear-gradient(180deg, rgba(225, 255, 242, 0.96), rgba(177, 247, 215, 0.92)) !important;
    box-shadow: 0 6px 14px rgba(36, 170, 105, 0.14) !important;
  }

  [data-p2p-theme="auto"] .command-alert-chevron {
    color: #8fb9c6 !important;
    opacity: 1;
  }

  [data-p2p-theme="auto"] .command-alert:hover .command-alert-chevron,
  [data-p2p-theme="auto"] .command-alert:focus .command-alert-chevron {
    color: var(--frost-action-strong) !important;
  }
}

[data-p2p-theme="light"] .dispatch-dashboard-section-heading span {
  color: var(--frost-action-strong) !important;
  text-shadow: none !important;
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] .dispatch-dashboard-section-heading span {
    color: var(--frost-action-strong) !important;
    text-shadow: none !important;
  }
}

[data-p2p-theme="light"] .routing-board-legend,
[data-p2p-theme="light"] .routing-board-legend span {
  color: var(--frost-text-secondary) !important;
  font-weight: 800;
}

[data-p2p-theme="light"] .routing-legend-dot,
[data-p2p-theme="light"] .routing-pref-dot {
  width: 10px;
  height: 10px;
  box-shadow: none !important;
}

[data-p2p-theme="light"] .routing-legend-pref,
[data-p2p-theme="light"] .routing-pref-dot {
  background: #c88a00 !important;
}

[data-p2p-theme="light"] .routing-legend-routed {
  background: #2dbf7f !important;
}

[data-p2p-theme="light"] .routing-legend-needs {
  background: #fff7df !important;
  border: 2px solid #c88a00 !important;
}

[data-p2p-theme="light"] .routing-legend-unsaved {
  background: #d83b4f !important;
}

[data-p2p-theme="light"] .routing-global-save-button.btn:disabled {
  color: var(--frost-disabled-text) !important;
  border-color: var(--frost-disabled-border) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(222, 234, 239, 0.72)),
    var(--frost-disabled-bg) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] .routing-board-legend,
  [data-p2p-theme="auto"] .routing-board-legend span {
    color: var(--frost-text-secondary) !important;
    font-weight: 800;
  }

  [data-p2p-theme="auto"] .routing-legend-dot,
  [data-p2p-theme="auto"] .routing-pref-dot {
    width: 10px;
    height: 10px;
    box-shadow: none !important;
  }

  [data-p2p-theme="auto"] .routing-legend-pref,
  [data-p2p-theme="auto"] .routing-pref-dot {
    background: #c88a00 !important;
  }

  [data-p2p-theme="auto"] .routing-legend-routed {
    background: #2dbf7f !important;
  }

  [data-p2p-theme="auto"] .routing-legend-needs {
    background: #fff7df !important;
    border: 2px solid #c88a00 !important;
  }

  [data-p2p-theme="auto"] .routing-legend-unsaved {
    background: #d83b4f !important;
  }

  [data-p2p-theme="auto"] .routing-global-save-button.btn:disabled {
    color: var(--frost-disabled-text) !important;
    border-color: var(--frost-disabled-border) !important;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(222, 234, 239, 0.72)),
      var(--frost-disabled-bg) !important;
    box-shadow: none !important;
    text-shadow: none !important;
    opacity: 1 !important;
  }
}

/* Frost polish for the company context and Platform Company MVP screens. */
[data-p2p-theme="light"] :is(.company-picker-page, .platform-company-form-page) .platform-hero {
  color: var(--frost-text-primary) !important;
  border-color: var(--frost-line) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(250, 253, 254, 0.68) 52%, rgba(234, 245, 249, 0.78)),
    var(--frost-surface) !important;
  box-shadow: var(--frost-shadow) !important;
}

[data-p2p-theme="light"] :is(.company-picker-page, .platform-company-form-page) .platform-hero :is(h1, p) {
  color: var(--frost-text-primary) !important;
}

[data-p2p-theme="light"] :is(.company-picker-page, .platform-company-form-page) .platform-hero > div > p:not(.platform-kicker) {
  color: var(--frost-text-muted) !important;
}

[data-p2p-theme="light"] :is(.company-picker-page, .platform-company-form-page) .platform-kicker {
  color: var(--frost-action-strong) !important;
}

[data-p2p-theme="light"] :is(.company-picker-section, .platform-company-form, .platform-company-active-field, .company-picker-row) {
  color: var(--frost-text-primary) !important;
  border-color: var(--frost-line) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(250, 253, 254, 0.62) 52%, rgba(236, 246, 250, 0.7)),
    var(--frost-surface) !important;
  box-shadow: var(--frost-shadow) !important;
}

[data-p2p-theme="light"] .company-picker-row {
  box-shadow: none !important;
}

[data-p2p-theme="light"] .company-picker-row:is(:hover, :focus-within) {
  border-color: rgba(8, 151, 184, 0.42) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(231, 248, 252, 0.76)),
    var(--frost-surface-tint) !important;
}

[data-p2p-theme="light"] .company-picker-row.active {
  border-color: rgba(8, 151, 184, 0.58) !important;
  background:
    linear-gradient(90deg, rgba(40, 231, 255, 0.16), rgba(255, 255, 255, 0.76)),
    var(--frost-surface) !important;
  box-shadow: inset 3px 0 0 var(--frost-action) !important;
}

[data-p2p-theme="light"] .company-picker-row h3,
[data-p2p-theme="light"] .platform-company-form :is(.form-label, .form-check-label) {
  color: var(--frost-text-primary) !important;
}

[data-p2p-theme="light"] .company-picker-row p,
[data-p2p-theme="light"] .platform-company-form .form-text {
  color: var(--frost-text-muted) !important;
}

[data-p2p-theme="light"] .company-picker-current {
  color: var(--frost-action-strong) !important;
}

[data-p2p-theme="light"] .company-switcher-menu {
  border: 1px solid rgba(118, 238, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(16, 38, 49, 0.98), rgba(7, 18, 25, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 24px 56px rgba(13, 35, 45, 0.32);
}

[data-p2p-theme="light"] .company-switcher-menu .dropdown-divider {
  border-color: rgba(118, 238, 255, 0.16);
}

[data-p2p-theme="light"] :is(.company-switcher-option, .company-switcher-manage) {
  color: var(--frost-dark-text) !important;
  background: transparent !important;
}

[data-p2p-theme="light"] .company-switcher-option small {
  color: var(--frost-dark-muted) !important;
}

[data-p2p-theme="light"] :is(.company-switcher-option, .company-switcher-manage):is(:hover, :focus),
[data-p2p-theme="light"] .company-switcher-option.active {
  color: #effdff !important;
  background: rgba(40, 231, 255, 0.14) !important;
}

[data-p2p-theme="light"] .company-switcher-option.active {
  box-shadow: inset 3px 0 0 var(--ops-cyan);
}

[data-p2p-theme="light"] .company-switcher-option.active small {
  color: var(--frost-dark-muted-readable) !important;
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] :is(.company-picker-page, .platform-company-form-page) .platform-hero {
    color: var(--frost-text-primary) !important;
    border-color: var(--frost-line) !important;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(250, 253, 254, 0.68) 52%, rgba(234, 245, 249, 0.78)),
      var(--frost-surface) !important;
    box-shadow: var(--frost-shadow) !important;
  }

  [data-p2p-theme="auto"] :is(.company-picker-page, .platform-company-form-page) .platform-hero :is(h1, p) {
    color: var(--frost-text-primary) !important;
  }

  [data-p2p-theme="auto"] :is(.company-picker-page, .platform-company-form-page) .platform-hero > div > p:not(.platform-kicker) {
    color: var(--frost-text-muted) !important;
  }

  [data-p2p-theme="auto"] :is(.company-picker-page, .platform-company-form-page) .platform-kicker {
    color: var(--frost-action-strong) !important;
  }

  [data-p2p-theme="auto"] :is(.company-picker-section, .platform-company-form, .platform-company-active-field, .company-picker-row) {
    color: var(--frost-text-primary) !important;
    border-color: var(--frost-line) !important;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(250, 253, 254, 0.62) 52%, rgba(236, 246, 250, 0.7)),
      var(--frost-surface) !important;
    box-shadow: var(--frost-shadow) !important;
  }

  [data-p2p-theme="auto"] .company-picker-row {
    box-shadow: none !important;
  }

  [data-p2p-theme="auto"] .company-picker-row:is(:hover, :focus-within) {
    border-color: rgba(8, 151, 184, 0.42) !important;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(231, 248, 252, 0.76)),
      var(--frost-surface-tint) !important;
  }

  [data-p2p-theme="auto"] .company-picker-row.active {
    border-color: rgba(8, 151, 184, 0.58) !important;
    background:
      linear-gradient(90deg, rgba(40, 231, 255, 0.16), rgba(255, 255, 255, 0.76)),
      var(--frost-surface) !important;
    box-shadow: inset 3px 0 0 var(--frost-action) !important;
  }

  [data-p2p-theme="auto"] .company-picker-row h3,
  [data-p2p-theme="auto"] .platform-company-form :is(.form-label, .form-check-label) {
    color: var(--frost-text-primary) !important;
  }

  [data-p2p-theme="auto"] .company-picker-row p,
  [data-p2p-theme="auto"] .platform-company-form .form-text {
    color: var(--frost-text-muted) !important;
  }

  [data-p2p-theme="auto"] .company-picker-current {
    color: var(--frost-action-strong) !important;
  }

  [data-p2p-theme="auto"] .company-switcher-menu {
    border: 1px solid rgba(118, 238, 255, 0.22);
    background:
      linear-gradient(180deg, rgba(16, 38, 49, 0.98), rgba(7, 18, 25, 0.98));
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      0 24px 56px rgba(13, 35, 45, 0.32);
  }

  [data-p2p-theme="auto"] .company-switcher-menu .dropdown-divider {
    border-color: rgba(118, 238, 255, 0.16);
  }

  [data-p2p-theme="auto"] :is(.company-switcher-option, .company-switcher-manage) {
    color: var(--frost-dark-text) !important;
    background: transparent !important;
  }

  [data-p2p-theme="auto"] .company-switcher-option small {
    color: var(--frost-dark-muted) !important;
  }

  [data-p2p-theme="auto"] :is(.company-switcher-option, .company-switcher-manage):is(:hover, :focus),
  [data-p2p-theme="auto"] .company-switcher-option.active {
    color: #effdff !important;
    background: rgba(40, 231, 255, 0.14) !important;
  }

  [data-p2p-theme="auto"] .company-switcher-option.active {
    box-shadow: inset 3px 0 0 var(--ops-cyan);
  }

  [data-p2p-theme="auto"] .company-switcher-option.active small {
    color: var(--frost-dark-muted-readable) !important;
  }
}

/* Frost company polish: match the Accounting tab palette instead of Midnight panels. */
[data-p2p-theme="light"] :is(
  .company-picker-page .platform-hero,
  .platform-company-form-page .platform-hero,
  .platform-membership-page .platform-hero,
  .company-picker-section,
  .platform-company-form,
  .platform-membership-add,
  .platform-membership-section,
  .platform-company-active-field,
  .company-picker-row
) {
  color: var(--frost-text-primary) !important;
  border-color: rgba(8, 151, 184, 0.42) !important;
  background: rgba(248, 253, 254, 0.78) !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

[data-p2p-theme="light"] :is(.company-picker-page, .platform-company-form-page) .platform-hero :is(h1, p),
[data-p2p-theme="light"] .platform-membership-page .platform-hero :is(h1, p),
[data-p2p-theme="light"] .company-picker-section :is(h2, h3, p),
[data-p2p-theme="light"] .company-picker-row :is(h3, p),
[data-p2p-theme="light"] .platform-company-form :is(.form-label, .form-check-label, .form-text),
[data-p2p-theme="light"] .platform-membership-page :is(.form-label, .form-check-label, h2, p, td, th, strong) {
  color: var(--frost-text-primary) !important;
  text-shadow: none !important;
}

[data-p2p-theme="light"] :is(.company-picker-page, .platform-company-form-page) .platform-kicker,
[data-p2p-theme="light"] .platform-membership-page .platform-kicker,
[data-p2p-theme="light"] .company-picker-current {
  color: var(--frost-action-strong) !important;
}

[data-p2p-theme="light"] .company-picker-section .platform-section-heading p,
[data-p2p-theme="light"] .company-picker-row p,
[data-p2p-theme="light"] .platform-company-form .form-text,
[data-p2p-theme="light"] .platform-membership-page :is(.platform-section-heading p, .form-text, td small) {
  color: var(--frost-text-muted) !important;
}

[data-p2p-theme="light"] .company-picker-row:is(:hover, :focus-within),
[data-p2p-theme="light"] .company-picker-row.active {
  color: #052c38 !important;
  border-color: rgba(8, 151, 184, 0.7) !important;
  background: rgba(190, 244, 253, 0.72) !important;
  box-shadow: 0 0 0 0.18rem rgba(8, 151, 184, 0.14) !important;
}

[data-p2p-theme="light"] .company-picker-row.active {
  box-shadow:
    inset 3px 0 0 var(--frost-action),
    0 0 0 0.18rem rgba(8, 151, 184, 0.14) !important;
}

[data-p2p-theme="light"] :is(.app-domain-menu, .company-switcher-menu) {
  border-color: rgba(8, 151, 184, 0.42) !important;
  background: rgba(248, 253, 254, 0.98) !important;
  box-shadow: 0 12px 28px rgba(8, 151, 184, 0.16) !important;
}

[data-p2p-theme="light"] :is(.app-domain-menu .dropdown-item, .company-switcher-option, .company-switcher-manage) {
  color: var(--frost-action-strong) !important;
  background: transparent !important;
  text-shadow: none !important;
}

[data-p2p-theme="light"] .company-switcher-option small {
  color: var(--frost-text-muted) !important;
}

[data-p2p-theme="light"] :is(
  .app-domain-menu .dropdown-item:hover,
  .app-domain-menu .dropdown-item:focus,
  .company-switcher-option:hover,
  .company-switcher-option:focus,
  .company-switcher-manage:hover,
  .company-switcher-manage:focus
) {
  color: #052c38 !important;
  border-color: rgba(8, 151, 184, 0.7) !important;
  background: rgba(190, 244, 253, 0.72) !important;
  box-shadow: 0 0 0 0.18rem rgba(8, 151, 184, 0.14) !important;
}

[data-p2p-theme="light"] :is(.app-domain-menu .dropdown-item.active, .company-switcher-option.active) {
  color: #031f28 !important;
  border-color: rgba(8, 151, 184, 0.7) !important;
  background: linear-gradient(180deg, #77e7f4, #18c9df) !important;
  box-shadow: 0 8px 20px rgba(8, 151, 184, 0.18) !important;
  text-shadow: none !important;
}

[data-p2p-theme="light"] .company-switcher-option.active small {
  color: rgba(3, 31, 40, 0.72) !important;
}

[data-p2p-theme="light"] :is(.app-domain-menu .dropdown-divider, .company-switcher-menu .dropdown-divider) {
  border-color: rgba(8, 151, 184, 0.22) !important;
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] :is(
    .company-picker-page .platform-hero,
    .platform-company-form-page .platform-hero,
    .platform-membership-page .platform-hero,
    .company-picker-section,
    .platform-company-form,
    .platform-membership-add,
    .platform-membership-section,
    .platform-company-active-field,
    .company-picker-row
  ) {
    color: var(--frost-text-primary) !important;
    border-color: rgba(8, 151, 184, 0.42) !important;
    background: rgba(248, 253, 254, 0.78) !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  [data-p2p-theme="auto"] :is(.company-picker-page, .platform-company-form-page) .platform-hero :is(h1, p),
  [data-p2p-theme="auto"] .platform-membership-page .platform-hero :is(h1, p),
  [data-p2p-theme="auto"] .company-picker-section :is(h2, h3, p),
  [data-p2p-theme="auto"] .company-picker-row :is(h3, p),
  [data-p2p-theme="auto"] .platform-company-form :is(.form-label, .form-check-label, .form-text),
  [data-p2p-theme="auto"] .platform-membership-page :is(.form-label, .form-check-label, h2, p, td, th, strong) {
    color: var(--frost-text-primary) !important;
    text-shadow: none !important;
  }

  [data-p2p-theme="auto"] :is(.company-picker-page, .platform-company-form-page) .platform-kicker,
  [data-p2p-theme="auto"] .platform-membership-page .platform-kicker,
  [data-p2p-theme="auto"] .company-picker-current {
    color: var(--frost-action-strong) !important;
  }

  [data-p2p-theme="auto"] .company-picker-section .platform-section-heading p,
  [data-p2p-theme="auto"] .company-picker-row p,
  [data-p2p-theme="auto"] .platform-company-form .form-text,
  [data-p2p-theme="auto"] .platform-membership-page :is(.platform-section-heading p, .form-text, td small) {
    color: var(--frost-text-muted) !important;
  }

  [data-p2p-theme="auto"] .company-picker-row:is(:hover, :focus-within),
  [data-p2p-theme="auto"] .company-picker-row.active {
    color: #052c38 !important;
    border-color: rgba(8, 151, 184, 0.7) !important;
    background: rgba(190, 244, 253, 0.72) !important;
    box-shadow: 0 0 0 0.18rem rgba(8, 151, 184, 0.14) !important;
  }

  [data-p2p-theme="auto"] .company-picker-row.active {
    box-shadow:
      inset 3px 0 0 var(--frost-action),
      0 0 0 0.18rem rgba(8, 151, 184, 0.14) !important;
  }

  [data-p2p-theme="auto"] :is(.app-domain-menu, .company-switcher-menu) {
    border-color: rgba(8, 151, 184, 0.42) !important;
    background: rgba(248, 253, 254, 0.98) !important;
    box-shadow: 0 12px 28px rgba(8, 151, 184, 0.16) !important;
  }

  [data-p2p-theme="auto"] :is(.app-domain-menu .dropdown-item, .company-switcher-option, .company-switcher-manage) {
    color: var(--frost-action-strong) !important;
    background: transparent !important;
    text-shadow: none !important;
  }

  [data-p2p-theme="auto"] .company-switcher-option small {
    color: var(--frost-text-muted) !important;
  }

  [data-p2p-theme="auto"] :is(
    .app-domain-menu .dropdown-item:hover,
    .app-domain-menu .dropdown-item:focus,
    .company-switcher-option:hover,
    .company-switcher-option:focus,
    .company-switcher-manage:hover,
    .company-switcher-manage:focus
  ) {
    color: #052c38 !important;
    border-color: rgba(8, 151, 184, 0.7) !important;
    background: rgba(190, 244, 253, 0.72) !important;
    box-shadow: 0 0 0 0.18rem rgba(8, 151, 184, 0.14) !important;
  }

  [data-p2p-theme="auto"] :is(.app-domain-menu .dropdown-item.active, .company-switcher-option.active) {
    color: #031f28 !important;
    border-color: rgba(8, 151, 184, 0.7) !important;
    background: linear-gradient(180deg, #77e7f4, #18c9df) !important;
    box-shadow: 0 8px 20px rgba(8, 151, 184, 0.18) !important;
    text-shadow: none !important;
  }

  [data-p2p-theme="auto"] .company-switcher-option.active small {
    color: rgba(3, 31, 40, 0.72) !important;
  }

  [data-p2p-theme="auto"] :is(.app-domain-menu .dropdown-divider, .company-switcher-menu .dropdown-divider) {
    border-color: rgba(8, 151, 184, 0.22) !important;
  }
}

/* Frost status labels use a restrained tint: the label leads, the color supports it. */
[data-p2p-theme="light"] :is(
  .accounting-ledger-type-pill,
  .accounting-ledger-status,
  .badge,
  .blocked-date-chip,
  .blocked-date-chip button,
  .capacity-status-badge,
  .contact-chip,
  .dispatch-availability-badge,
  .dispatch-capacity-badge,
  .dispatch-repair-pill,
  .dispatch-unschedule-pill,
  .dispatch-zip-badge,
  .import-status-badge,
  .launch-readiness-pill,
  .order-status-pill,
  .qa-outcome-pill,
  .qa-status-pill,
  .routing-capacity-chip,
  .routing-status-chip,
  .routing-unsaved-badge,
  .scheduling-queue-pill,
  .semantic-pill,
  .shell-action-pill,
  .tech-workday-preference-pill,
  .tech-workday-route-pill,
  .tech-workday-window-pill,
  .vip-priority-badge,
  .workflow-age-pill
) {
  --frost-pill-tint: #6b8795;
  --frost-pill-fill: 10%;
  color: #142b38 !important;
  border-color: color-mix(in srgb, var(--frost-pill-tint) 46%, #b8cbd3) !important;
  background: color-mix(in srgb, var(--frost-pill-tint) var(--frost-pill-fill), #ffffff) !important;
  background-color: color-mix(in srgb, var(--frost-pill-tint) var(--frost-pill-fill), #ffffff) !important;
  box-shadow: none !important;
}

[data-p2p-theme="light"] :is(.order-status-pill, .capacity-status-badge, .dispatch-capacity-badge, .semantic-pill) {
  --frost-pill-tint: var(--status-pill-color, var(--capacity-status-color, var(--semantic-pill-color, #6b8795))) !important;
  --frost-pill-fill: 20% !important;
}

[data-p2p-theme="light"] :is(
  .badge.text-bg-success,
  .badge.bg-success,
  .blocked-date-chip-success,
  .blocked-date-chip-success button,
  .contact-chip-success,
  .dispatch-availability-badge.active,
  .import-status-badge-good,
  .accounting-ledger-status-finalized,
  .launch-readiness-pill-ready,
  .qa-outcome-pill-green,
  .qa-status-success,
  .routing-capacity-chip.semantic-pill-success,
  .routing-status-success,
  .tech-workday-route-success,
  .status-pill-scheduled
) { --frost-pill-tint: #24915b !important; --frost-pill-fill: 20% !important; }

[data-p2p-theme="light"] :is(
  .badge.text-bg-warning,
  .badge.bg-warning,
  .contact-chip-warning,
  .dispatch-repair-pill,
  .dispatch-unschedule-pill,
  .import-status-badge-warning,
  .accounting-ledger-status-pending,
  .accounting-ledger-status-error,
  .launch-readiness-pill-needs-attention,
  .qa-outcome-pill-orange,
  .qa-status-warning,
  .routing-capacity-chip.semantic-pill-warning,
  .routing-status-warning,
  .routing-unsaved-badge,
  .tech-workday-route-warning,
  .status-pill-pending-report,
  .status-pill-unscheduled
) { --frost-pill-tint: #b97809 !important; --frost-pill-fill: 20% !important; }

[data-p2p-theme="light"] :is(
  .badge.text-bg-danger,
  .badge.bg-danger,
  .badge.text-bg-red,
  .accounting-ledger-status-void,
  .accounting-ledger-status-reversed,
  .contact-chip-danger,
  .launch-readiness-pill-not-started,
  .qa-outcome-pill-red,
  .qa-status-danger,
  .routing-capacity-chip.semantic-pill-danger,
  .routing-status-danger,
  .status-pill-canceled
) { --frost-pill-tint: #be4255 !important; --frost-pill-fill: 20% !important; }

[data-p2p-theme="light"] :is(
  .badge.text-bg-info,
  .badge.bg-info,
  .badge.text-bg-primary,
  .badge.bg-primary,
  .dispatch-zip-badge,
  .import-status-badge,
  .status-pill-new,
  .status-pill-assigned,
  .tech-workday-window-pill
) { --frost-pill-tint: #168ca8 !important; --frost-pill-fill: 20% !important; }

[data-p2p-theme="light"] :is(
  .qa-outcome-pill-neutral,
  .qa-status-primary,
  .routing-status-routing,
  .tech-workday-preference-pill,
  .tech-workday-route-routing,
  .vip-priority-badge,
  .accounting-ledger-status-exported,
  .status-pill-routed,
  .status-pill-report-submitted,
  .status-pill-qa-review
) { --frost-pill-tint: #7166c8 !important; --frost-pill-fill: 20% !important; }

[data-p2p-theme="light"] .status-pill-complete { --frost-pill-tint: #64748b !important; --frost-pill-fill: 20% !important; }

/* Override the older, more-specific Bootstrap Frost badge palette with the shared soft semantic treatment. */
[data-p2p-theme="light"] :is(
  .badge.text-bg-success,
  .badge.bg-success,
  .badge.text-bg-warning,
  .badge.bg-warning,
  .badge.text-bg-danger,
  .badge.bg-danger,
  .badge.text-bg-red,
  .badge.text-bg-info,
  .badge.bg-info,
  .badge.text-bg-primary,
  .badge.bg-primary,
  .badge.text-bg-secondary,
  .badge.bg-secondary,
  .dispatch-availability-badge.active,
  .dispatch-availability-badge.inactive,
  .import-status-badge,
  .import-status-badge-good,
  .routing-status-warning
) {
  color: #142b38 !important;
  border-color: color-mix(in srgb, var(--frost-pill-tint) 46%, #b8cbd3) !important;
  background-color: color-mix(in srgb, var(--frost-pill-tint) var(--frost-pill-fill), #ffffff) !important;
}

[data-p2p-theme="light"] .semantic-pill:not(.is-muted) {
  color: #142b38 !important;
  border-color: color-mix(in srgb, var(--frost-pill-tint) 46%, #b8cbd3) !important;
  background: color-mix(in srgb, var(--frost-pill-tint) var(--frost-pill-fill), #ffffff) !important;
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] :is(
    .accounting-ledger-type-pill,
    .accounting-ledger-status,
    .badge,
    .blocked-date-chip,
    .blocked-date-chip button,
    .capacity-status-badge,
    .contact-chip,
    .dispatch-availability-badge,
    .dispatch-capacity-badge,
    .dispatch-repair-pill,
    .dispatch-unschedule-pill,
    .dispatch-zip-badge,
    .import-status-badge,
    .launch-readiness-pill,
    .order-status-pill,
    .qa-outcome-pill,
    .qa-status-pill,
    .routing-capacity-chip,
    .routing-status-chip,
    .routing-unsaved-badge,
    .scheduling-queue-pill,
    .semantic-pill,
    .shell-action-pill,
    .tech-workday-preference-pill,
    .tech-workday-route-pill,
    .tech-workday-window-pill,
    .vip-priority-badge,
    .workflow-age-pill
  ) {
    --frost-pill-tint: #6b8795;
    --frost-pill-fill: 10%;
  color: #142b38 !important;
  border-color: color-mix(in srgb, var(--frost-pill-tint) 46%, #b8cbd3) !important;
  background: color-mix(in srgb, var(--frost-pill-tint) var(--frost-pill-fill), #ffffff) !important;
  background-color: color-mix(in srgb, var(--frost-pill-tint) var(--frost-pill-fill), #ffffff) !important;
  box-shadow: none !important;
  }

  [data-p2p-theme="auto"] :is(.order-status-pill, .capacity-status-badge, .dispatch-capacity-badge, .semantic-pill) {
    --frost-pill-tint: var(--status-pill-color, var(--capacity-status-color, var(--semantic-pill-color, #6b8795))) !important;
    --frost-pill-fill: 20% !important;
  }

  [data-p2p-theme="auto"] :is(.badge.text-bg-success, .badge.bg-success, .blocked-date-chip-success, .blocked-date-chip-success button, .contact-chip-success, .dispatch-availability-badge.active, .import-status-badge-good, .accounting-ledger-status-finalized, .launch-readiness-pill-ready, .qa-outcome-pill-green, .qa-status-success, .routing-capacity-chip.semantic-pill-success, .routing-status-success, .tech-workday-route-success, .status-pill-scheduled) { --frost-pill-tint: #24915b !important; --frost-pill-fill: 20% !important; }
  [data-p2p-theme="auto"] :is(.badge.text-bg-warning, .badge.bg-warning, .contact-chip-warning, .dispatch-repair-pill, .dispatch-unschedule-pill, .import-status-badge-warning, .accounting-ledger-status-pending, .accounting-ledger-status-error, .launch-readiness-pill-needs-attention, .qa-outcome-pill-orange, .qa-status-warning, .routing-capacity-chip.semantic-pill-warning, .routing-status-warning, .routing-unsaved-badge, .tech-workday-route-warning, .status-pill-pending-report, .status-pill-unscheduled) { --frost-pill-tint: #b97809 !important; --frost-pill-fill: 20% !important; }
  [data-p2p-theme="auto"] :is(.badge.text-bg-danger, .badge.bg-danger, .badge.text-bg-red, .accounting-ledger-status-void, .accounting-ledger-status-reversed, .contact-chip-danger, .launch-readiness-pill-not-started, .qa-outcome-pill-red, .qa-status-danger, .routing-capacity-chip.semantic-pill-danger, .routing-status-danger, .status-pill-canceled) { --frost-pill-tint: #be4255 !important; --frost-pill-fill: 20% !important; }
  [data-p2p-theme="auto"] :is(.badge.text-bg-info, .badge.bg-info, .badge.text-bg-primary, .badge.bg-primary, .dispatch-zip-badge, .import-status-badge, .status-pill-new, .status-pill-assigned, .tech-workday-window-pill) { --frost-pill-tint: #168ca8 !important; --frost-pill-fill: 20% !important; }
  [data-p2p-theme="auto"] :is(.qa-outcome-pill-neutral, .qa-status-primary, .routing-status-routing, .tech-workday-preference-pill, .tech-workday-route-routing, .vip-priority-badge, .accounting-ledger-status-exported, .status-pill-routed, .status-pill-report-submitted, .status-pill-qa-review) { --frost-pill-tint: #7166c8 !important; --frost-pill-fill: 20% !important; }
  [data-p2p-theme="auto"] .status-pill-complete { --frost-pill-tint: #64748b !important; --frost-pill-fill: 20% !important; }

  /* Match the explicit Bootstrap badge selectors above so legacy Frost rules cannot restore solid fills. */
  [data-p2p-theme="auto"] :is(
    .badge.text-bg-success,
    .badge.bg-success,
    .badge.text-bg-warning,
    .badge.bg-warning,
    .badge.text-bg-danger,
    .badge.bg-danger,
    .badge.text-bg-red,
    .badge.text-bg-info,
    .badge.bg-info,
    .badge.text-bg-primary,
    .badge.bg-primary,
    .badge.text-bg-secondary,
    .badge.bg-secondary,
    .dispatch-availability-badge.active,
    .dispatch-availability-badge.inactive,
    .import-status-badge,
    .import-status-badge-good,
    .routing-status-warning
  ) {
    color: #142b38 !important;
    border-color: color-mix(in srgb, var(--frost-pill-tint) 46%, #b8cbd3) !important;
    background-color: color-mix(in srgb, var(--frost-pill-tint) var(--frost-pill-fill), #ffffff) !important;
  }

  [data-p2p-theme="auto"] .semantic-pill:not(.is-muted) {
    color: #142b38 !important;
    border-color: color-mix(in srgb, var(--frost-pill-tint) 46%, #b8cbd3) !important;
    background: color-mix(in srgb, var(--frost-pill-tint) var(--frost-pill-fill), #ffffff) !important;
  }
}

/* Frost pill labels stay deliberately light enough for fast human scanning. */
[data-p2p-theme="light"] :is(
  .accounting-ledger-type-pill,
  .accounting-ledger-status,
  .badge,
  .blocked-date-chip,
  .blocked-date-chip button,
  .capacity-status-badge,
  .contact-chip,
  .dispatch-availability-badge,
  .dispatch-capacity-badge,
  .dispatch-repair-pill,
  .dispatch-unschedule-pill,
  .dispatch-zip-badge,
  .import-status-badge,
  .launch-readiness-pill,
  .order-status-pill,
  .qa-outcome-pill,
  .qa-status-pill,
  .routing-capacity-chip,
  .routing-status-chip,
  .routing-unsaved-badge,
  .scheduling-queue-pill,
  .semantic-pill,
  .shell-action-pill,
  .tech-workday-preference-pill,
  .tech-workday-route-pill,
  .tech-workday-window-pill,
  .vip-priority-badge,
  .workflow-age-pill
) {
  font-weight: 500 !important;
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] :is(
    .accounting-ledger-type-pill,
    .accounting-ledger-status,
    .badge,
    .blocked-date-chip,
    .blocked-date-chip button,
    .capacity-status-badge,
    .contact-chip,
    .dispatch-availability-badge,
    .dispatch-capacity-badge,
    .dispatch-repair-pill,
    .dispatch-unschedule-pill,
    .dispatch-zip-badge,
    .import-status-badge,
    .launch-readiness-pill,
    .order-status-pill,
    .qa-outcome-pill,
    .qa-status-pill,
    .routing-capacity-chip,
    .routing-status-chip,
    .routing-unsaved-badge,
    .scheduling-queue-pill,
    .semantic-pill,
    .shell-action-pill,
    .tech-workday-preference-pill,
    .tech-workday-route-pill,
    .tech-workday-window-pill,
    .vip-priority-badge,
    .workflow-age-pill
  ) {
    font-weight: 500 !important;
  }
}

/* QA Review is an all-day work surface: give its dense review controls the same
   Frost treatment as the shell rather than carrying Midnight panels into light mode. */
[data-p2p-theme="light"] .qa-workspace-page,
[data-p2p-theme="light"] .qa-standalone-page {
  color: #173744;
}

[data-p2p-theme="light"] :is(.qa-kpi-card, .qa-queue-panel, .qa-review-workspace, .qa-review-card) {
  border-color: rgba(55, 111, 136, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(238, 248, 251, 0.78)),
    #f8fcfd;
  box-shadow: 0 10px 26px rgba(31, 58, 72, 0.12);
}

[data-p2p-theme="light"] .qa-kpi-card:hover,
[data-p2p-theme="light"] .qa-kpi-card:focus-within {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), color-mix(in srgb, currentColor 10%, #eef9fb)),
    #f8fcfd;
  box-shadow: 0 12px 28px rgba(31, 58, 72, 0.16), 0 0 0 1px color-mix(in srgb, currentColor 34%, transparent);
}

[data-p2p-theme="light"] :is(.qa-kpi-copy span, .qa-sort-control, .qa-card-detail-line, .qa-card-main span:not(.qa-status-pill), .qa-readiness-row, .qa-action small) {
  color: #456574;
}

[data-p2p-theme="light"] :is(.qa-kpi-icon-clipboard, .qa-kpi-icon-camera)::before,
[data-p2p-theme="light"] :is(.qa-kpi-icon-clipboard, .qa-kpi-icon-camera)::after {
  background-color: #f8fcfd;
}

[data-p2p-theme="light"] .qa-workspace-layout::before {
  background: linear-gradient(180deg, transparent, rgba(8, 151, 184, 0.4), rgba(120, 83, 196, 0.24), transparent);
  box-shadow: 0 0 18px rgba(8, 151, 184, 0.18);
}

[data-p2p-theme="light"] :is(.qa-queue-header h2, .qa-review-card h3, .qa-empty-workspace h2, .qa-card-tech, .qa-card-customer) {
  color: #173744;
}

[data-p2p-theme="light"] .qa-filter-tabs a {
  color: #345969;
  border-color: rgba(67, 101, 119, 0.2);
  background: rgba(231, 243, 247, 0.74);
}

[data-p2p-theme="light"] .qa-filter-tabs a:hover,
[data-p2p-theme="light"] .qa-filter-tabs a:focus,
[data-p2p-theme="light"] .qa-filter-tabs a.active {
  color: #063543;
  border-color: rgba(8, 151, 184, 0.76);
  background: linear-gradient(180deg, #effdff, #bfeff7);
  box-shadow: 0 5px 14px rgba(8, 151, 184, 0.18);
}

[data-p2p-theme="light"] .qa-queue-card {
  color: #173744;
  background:
    radial-gradient(circle at 12% 18%, color-mix(in srgb, currentColor 9%, transparent), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(239, 248, 251, 0.76));
  box-shadow: 0 5px 12px rgba(31, 58, 72, 0.08);
}

[data-p2p-theme="light"] .qa-queue-card:hover,
[data-p2p-theme="light"] .qa-queue-card:focus {
  color: #173744;
  background:
    radial-gradient(circle at 12% 18%, color-mix(in srgb, currentColor 14%, transparent), transparent 42%),
    linear-gradient(180deg, #ffffff, #e6f5f8);
  box-shadow: 0 8px 18px rgba(31, 58, 72, 0.14), 0 0 0 1px color-mix(in srgb, currentColor 24%, transparent);
}

[data-p2p-theme="light"] .qa-card-separator,
[data-p2p-theme="light"] .qa-card-date {
  color: #66828e;
}

[data-p2p-theme="light"] .qa-queue-card.selected :is(.qa-card-main strong, .qa-card-customer, .qa-card-tech, .text-secondary, .qa-card-main span:not(.qa-status-pill), .qa-card-detail-line) {
  color: #173744 !important;
}

[data-p2p-theme="light"] .qa-queue-outcome-green.selected {
  background: linear-gradient(135deg, rgba(222, 250, 233, 0.98), rgba(239, 253, 245, 0.96));
  box-shadow: inset 6px 0 0 rgba(36, 145, 91, 0.88), 0 7px 16px rgba(36, 145, 91, 0.15);
}

[data-p2p-theme="light"] .qa-queue-outcome-orange.selected {
  background: linear-gradient(135deg, rgba(255, 242, 214, 0.98), rgba(255, 250, 239, 0.96));
  box-shadow: inset 6px 0 0 rgba(196, 125, 20, 0.88), 0 7px 16px rgba(196, 125, 20, 0.15);
}

[data-p2p-theme="light"] .qa-queue-outcome-red.selected {
  background: linear-gradient(135deg, rgba(255, 229, 232, 0.98), rgba(255, 246, 247, 0.96));
  box-shadow: inset 6px 0 0 rgba(190, 66, 85, 0.88), 0 7px 16px rgba(190, 66, 85, 0.14);
}

[data-p2p-theme="light"] .qa-queue-outcome-neutral.selected {
  background: linear-gradient(135deg, rgba(218, 246, 250, 0.98), rgba(241, 252, 253, 0.96));
  box-shadow: inset 6px 0 0 rgba(8, 151, 184, 0.88), 0 7px 16px rgba(8, 151, 184, 0.14);
}

[data-p2p-theme="light"] :is(.qa-workspace-header, .qa-instructions-block, .qa-action-bar, .qa-photo-modal-frame) {
  border-color: rgba(67, 101, 119, 0.24);
  background: rgba(246, 251, 253, 0.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

[data-p2p-theme="light"] .qa-action-approve {
  color: #23754b;
  border-color: rgba(36, 145, 91, 0.48);
  background: rgba(210, 241, 222, 0.72);
}

[data-p2p-theme="light"] .qa-action.btn-outline-danger {
  color: #8a5817;
  border-color: rgba(185, 120, 9, 0.46);
  background: rgba(255, 242, 214, 0.76);
}

[data-p2p-theme="light"] .qa-action.btn-outline-secondary,
[data-p2p-theme="light"] .qa-reopen-item {
  color: #456574;
  border-color: rgba(67, 101, 119, 0.44);
  background: rgba(231, 243, 247, 0.78);
}

[data-p2p-theme="light"] .qa-workspace-title-row h2 {
  color: #173744;
}

[data-p2p-theme="light"] .qa-so-link {
  color: #087f9d;
  text-shadow: none;
}

[data-p2p-theme="light"] :is(.qa-photo-card, .qa-file-card, .qa-photo-dropzone) {
  color: #173744;
  border-color: rgba(67, 101, 119, 0.3);
  background: rgba(247, 252, 253, 0.92);
}

[data-p2p-theme="light"] :is(.qa-workspace-page, .qa-standalone-page) .btn-outline-primary:not(.qa-action) {
  color: #087f9d;
  border-color: rgba(8, 127, 157, 0.54);
  background: rgba(240, 251, 253, 0.94);
  box-shadow: none;
}

[data-p2p-theme="light"] :is(.qa-workspace-page, .qa-standalone-page) .btn-outline-secondary:not(.qa-action) {
  color: #385c6b;
  border-color: rgba(67, 101, 119, 0.4);
  background: rgba(247, 251, 252, 0.94);
}

[data-p2p-theme="light"] :is(.qa-workspace-page, .qa-standalone-page) .btn-outline-danger:not(.qa-action) {
  color: #ad3046;
  border-color: rgba(190, 66, 85, 0.5);
  background: rgba(255, 245, 246, 0.94);
  box-shadow: none;
}

[data-p2p-theme="light"] .qa-action {
  background: linear-gradient(90deg, color-mix(in srgb, currentColor 11%, #ffffff), #f8fcfd);
  box-shadow: 0 5px 13px rgba(31, 58, 72, 0.1);
}

[data-p2p-theme="light"] .qa-action:hover,
[data-p2p-theme="light"] .qa-action:focus {
  background: linear-gradient(90deg, color-mix(in srgb, currentColor 16%, #ffffff), #ffffff);
  box-shadow: 0 8px 18px rgba(31, 58, 72, 0.15), 0 0 0 1px color-mix(in srgb, currentColor 28%, transparent);
}

/* Bright QA status backgrounds need dark text in Frost for dependable contrast. */
[data-p2p-theme="light"] :is(.qa-workspace-page, .qa-standalone-page) :is(.qa-status-pill, .qa-outcome-pill) {
  color: #111827 !important;
}

/* Midnight QA Review: keep the review surface calm. Outcome categories provide
   context, but only a blocker, a warning, or the final approval action needs
   a strong semantic color. Frost keeps its established treatment above. */
[data-p2p-theme="dark"] .qa-kpi-card {
  color: #91b8c4;
  border-color: rgba(145, 184, 196, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 52%),
    rgba(7, 18, 25, 0.82);
}

[data-p2p-theme="dark"] .qa-kpi-warning {
  color: #e5ad58;
  border-color: rgba(229, 173, 88, 0.52);
}

[data-p2p-theme="dark"] .qa-kpi-danger {
  color: #df7885;
  border-color: rgba(223, 120, 133, 0.56);
}

[data-p2p-theme="dark"] .qa-kpi-card:hover,
[data-p2p-theme="dark"] .qa-kpi-card:focus-within {
  border-color: rgba(137, 210, 225, 0.6);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 52%),
    rgba(7, 18, 25, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 30px rgba(0, 0, 0, 0.26);
}

[data-p2p-theme="dark"] .qa-workspace-layout::before {
  background: linear-gradient(180deg, transparent, rgba(126, 180, 194, 0.26), transparent);
  box-shadow: none;
}

[data-p2p-theme="dark"] .qa-queue-card,
[data-p2p-theme="dark"] .qa-queue-outcome-green,
[data-p2p-theme="dark"] .qa-queue-outcome-orange,
[data-p2p-theme="dark"] .qa-queue-outcome-red,
[data-p2p-theme="dark"] .qa-queue-outcome-neutral {
  color: #b4d1d9;
  border-color: rgba(132, 177, 189, 0.36);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 58%),
    rgba(7, 18, 25, 0.82);
}

[data-p2p-theme="dark"] .qa-queue-card:hover,
[data-p2p-theme="dark"] .qa-queue-card:focus {
  color: #c9e5ec;
  border-color: rgba(137, 210, 225, 0.62);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 58%),
    rgba(7, 18, 25, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 28px rgba(0, 0, 0, 0.24);
}

[data-p2p-theme="dark"] .qa-queue-outcome-green.selected,
[data-p2p-theme="dark"] .qa-queue-outcome-orange.selected,
[data-p2p-theme="dark"] .qa-queue-outcome-red.selected,
[data-p2p-theme="dark"] .qa-queue-outcome-neutral.selected {
  border-color: rgba(124, 211, 228, 0.8);
  background:
    linear-gradient(90deg, rgba(49, 126, 144, 0.22), rgba(7, 18, 25, 0.9) 62%),
    rgba(7, 18, 25, 0.9);
  box-shadow:
    inset 4px 0 0 rgba(87, 205, 226, 0.84),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 28px rgba(0, 0, 0, 0.28);
}

[data-p2p-theme="dark"] .qa-readiness-row .is-complete,
[data-p2p-theme="dark"] .qa-checklist-row.is-complete {
  color: #a9c6ce;
}

[data-p2p-theme="dark"] .qa-readiness-row .is-missing,
[data-p2p-theme="dark"] .qa-checklist-row.is-missing {
  color: #e3aa55;
}

[data-p2p-theme="dark"] .qa-status-success {
  color: #d8edf2;
  background: rgba(109, 153, 165, 0.34);
}

[data-p2p-theme="dark"] .qa-status-warning {
  color: #ffdda0;
  background: rgba(145, 99, 31, 0.5);
}

[data-p2p-theme="dark"] .qa-status-danger {
  color: #ffd8dd;
  background: rgba(145, 51, 65, 0.62);
}

[data-p2p-theme="dark"] .qa-status-primary {
  color: #d8edf2;
  background: rgba(66, 111, 126, 0.44);
}

[data-p2p-theme="dark"] .qa-review-tone-green,
[data-p2p-theme="dark"] .qa-review-tone-orange,
[data-p2p-theme="dark"] .qa-review-tone-red,
[data-p2p-theme="dark"] .qa-review-tone-neutral {
  border-color: rgba(118, 238, 255, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 34%),
    rgba(8, 20, 27, 0.76);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 20px 50px rgba(0, 0, 0, 0.28);
}

[data-p2p-theme="dark"] .qa-review-tone-green::before,
[data-p2p-theme="dark"] .qa-review-tone-orange::before,
[data-p2p-theme="dark"] .qa-review-tone-red::before,
[data-p2p-theme="dark"] .qa-review-tone-neutral::before {
  border-color: transparent;
  box-shadow: none;
  opacity: 0;
}

[data-p2p-theme="dark"] .qa-outcome-pill-green,
[data-p2p-theme="dark"] .qa-outcome-pill-orange,
[data-p2p-theme="dark"] .qa-outcome-pill-red,
[data-p2p-theme="dark"] .qa-outcome-pill-neutral {
  color: #c9e0e6;
  border-color: rgba(135, 178, 190, 0.42);
  background: rgba(12, 31, 40, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

[data-p2p-theme="dark"] .qa-outcome-pill-orange {
  color: #f0c37c;
  border-color: rgba(217, 157, 70, 0.54);
}

[data-p2p-theme="dark"] .qa-outcome-pill-red {
  color: #ef9ba7;
  border-color: rgba(210, 91, 107, 0.58);
}

[data-p2p-theme="dark"] .qa-action.btn-outline-danger {
  color: #e7b26a;
  border-color: rgba(216, 157, 72, 0.62);
  background:
    linear-gradient(90deg, rgba(148, 96, 25, 0.2), rgba(7, 18, 25, 0.76)),
    rgba(7, 18, 25, 0.82);
}

[data-p2p-theme="dark"] .qa-action.btn-outline-danger:hover,
[data-p2p-theme="dark"] .qa-action.btn-outline-danger:focus {
  color: #f2c27b;
  background:
    linear-gradient(90deg, rgba(148, 96, 25, 0.28), rgba(7, 18, 25, 0.78)),
    rgba(7, 18, 25, 0.82);
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] .qa-progress-rail {
    color: #456574;
    border-color: rgba(55, 111, 136, 0.42);
    background: #dce5e8;
    box-shadow:
      inset 0 -1px 0 rgba(8, 127, 157, 0.12),
      0 9px 16px rgba(31, 58, 72, 0.14);
  }
  [data-p2p-theme="auto"] .qa-progress-rail-summary strong,
  [data-p2p-theme="auto"] .qa-progress-milestone.is-current { color: #087f98; }
  [data-p2p-theme="auto"] .qa-progress-milestones::before { background: rgba(55, 111, 136, 0.28); }
  [data-p2p-theme="auto"] .qa-progress-milestones::after { background: rgba(36, 145, 91, 0.76); }
  [data-p2p-theme="auto"] .qa-progress-milestone { color: #66828e; }
  [data-p2p-theme="auto"] .qa-progress-dot { border-color: #66828e; background: #f7fbfc; }
  [data-p2p-theme="auto"] .qa-progress-milestone.is-complete { color: #23754b; }
  [data-p2p-theme="auto"] .qa-progress-milestone.is-complete .qa-progress-dot { border-color: #258752; color: #f5fff8; background: #2fa866; }
  [data-p2p-theme="auto"] .qa-progress-milestone.is-attention { color: #8a5817; }
  [data-p2p-theme="auto"] .qa-progress-milestone.is-blocked { color: #a9374a; }
  [data-p2p-theme="auto"] .qa-progress-rail.is-complete .qa-progress-rail-summary strong { color: #23754b; }

  [data-p2p-theme="auto"] .qa-workspace-page,
  [data-p2p-theme="auto"] .qa-standalone-page {
    color: #173744;
  }

  [data-p2p-theme="auto"] :is(.qa-kpi-card, .qa-queue-panel, .qa-review-workspace, .qa-review-card) {
    border-color: rgba(55, 111, 136, 0.34);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(238, 248, 251, 0.78)), #f8fcfd;
    box-shadow: 0 10px 26px rgba(31, 58, 72, 0.12);
  }

  [data-p2p-theme="auto"] :is(.qa-kpi-copy span, .qa-sort-control, .qa-card-detail-line, .qa-card-main span:not(.qa-status-pill), .qa-readiness-row, .qa-action small) { color: #456574; }
  [data-p2p-theme="auto"] :is(.qa-kpi-icon-clipboard, .qa-kpi-icon-camera)::before,
  [data-p2p-theme="auto"] :is(.qa-kpi-icon-clipboard, .qa-kpi-icon-camera)::after { background-color: #f8fcfd; }
  [data-p2p-theme="auto"] .qa-workspace-layout::before { background: linear-gradient(180deg, transparent, rgba(8, 151, 184, 0.4), rgba(120, 83, 196, 0.24), transparent); box-shadow: 0 0 18px rgba(8, 151, 184, 0.18); }
  [data-p2p-theme="auto"] :is(.qa-queue-header h2, .qa-review-card h3, .qa-empty-workspace h2, .qa-card-tech, .qa-card-customer, .qa-workspace-title-row h2) { color: #173744; }
  [data-p2p-theme="auto"] .qa-filter-tabs a { color: #345969; border-color: rgba(67, 101, 119, 0.2); background: rgba(231, 243, 247, 0.74); }
  [data-p2p-theme="auto"] :is(.qa-filter-tabs a:hover, .qa-filter-tabs a:focus, .qa-filter-tabs a.active) { color: #063543; border-color: rgba(8, 151, 184, 0.76); background: linear-gradient(180deg, #effdff, #bfeff7); box-shadow: 0 5px 14px rgba(8, 151, 184, 0.18); }
  [data-p2p-theme="auto"] .qa-queue-card { color: #173744; background: radial-gradient(circle at 12% 18%, color-mix(in srgb, currentColor 9%, transparent), transparent 42%), linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(239, 248, 251, 0.76)); box-shadow: 0 5px 12px rgba(31, 58, 72, 0.08); }
  [data-p2p-theme="auto"] :is(.qa-card-separator, .qa-card-date) { color: #66828e; }
  [data-p2p-theme="auto"] .qa-queue-card.selected :is(.qa-card-main strong, .qa-card-customer, .qa-card-tech, .text-secondary, .qa-card-main span:not(.qa-status-pill), .qa-card-detail-line) { color: #173744 !important; }
  [data-p2p-theme="auto"] .qa-queue-outcome-green.selected { background: linear-gradient(135deg, rgba(222, 250, 233, 0.98), rgba(239, 253, 245, 0.96)); box-shadow: inset 6px 0 0 rgba(36, 145, 91, 0.88), 0 7px 16px rgba(36, 145, 91, 0.15); }
  [data-p2p-theme="auto"] .qa-queue-outcome-orange.selected { background: linear-gradient(135deg, rgba(255, 242, 214, 0.98), rgba(255, 250, 239, 0.96)); box-shadow: inset 6px 0 0 rgba(196, 125, 20, 0.88), 0 7px 16px rgba(196, 125, 20, 0.15); }
  [data-p2p-theme="auto"] .qa-queue-outcome-red.selected { background: linear-gradient(135deg, rgba(255, 229, 232, 0.98), rgba(255, 246, 247, 0.96)); box-shadow: inset 6px 0 0 rgba(190, 66, 85, 0.88), 0 7px 16px rgba(190, 66, 85, 0.14); }
  [data-p2p-theme="auto"] .qa-queue-outcome-neutral.selected { background: linear-gradient(135deg, rgba(218, 246, 250, 0.98), rgba(241, 252, 253, 0.96)); box-shadow: inset 6px 0 0 rgba(8, 151, 184, 0.88), 0 7px 16px rgba(8, 151, 184, 0.14); }
  [data-p2p-theme="auto"] :is(.qa-workspace-header, .qa-instructions-block, .qa-action-bar, .qa-photo-modal-frame) { border-color: rgba(67, 101, 119, 0.24); background: rgba(246, 251, 253, 0.94); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86); }
  [data-p2p-theme="auto"] .qa-so-link { color: #087f9d; text-shadow: none; }
  [data-p2p-theme="auto"] :is(.qa-photo-card, .qa-file-card, .qa-photo-dropzone) { color: #173744; border-color: rgba(67, 101, 119, 0.3); background: rgba(247, 252, 253, 0.92); }
  [data-p2p-theme="auto"] :is(.qa-workspace-page, .qa-standalone-page) .btn-outline-primary:not(.qa-action) { color: #087f9d; border-color: rgba(8, 127, 157, 0.54); background: rgba(240, 251, 253, 0.94); box-shadow: none; }
  [data-p2p-theme="auto"] :is(.qa-workspace-page, .qa-standalone-page) .btn-outline-secondary:not(.qa-action) { color: #385c6b; border-color: rgba(67, 101, 119, 0.4); background: rgba(247, 251, 252, 0.94); }
  [data-p2p-theme="auto"] :is(.qa-workspace-page, .qa-standalone-page) .btn-outline-danger:not(.qa-action) { color: #ad3046; border-color: rgba(190, 66, 85, 0.5); background: rgba(255, 245, 246, 0.94); box-shadow: none; }
  [data-p2p-theme="auto"] .qa-action { box-shadow: 0 3px 8px rgba(31, 58, 72, 0.08); }
  [data-p2p-theme="auto"] .qa-action-approve { color: #23754b; border-color: rgba(36, 145, 91, 0.48); background: rgba(210, 241, 222, 0.72); }
  [data-p2p-theme="auto"] .qa-action.btn-outline-danger { color: #8a5817; border-color: rgba(185, 120, 9, 0.46); background: rgba(255, 242, 214, 0.76); }
  [data-p2p-theme="auto"] .qa-action.btn-outline-secondary,
  [data-p2p-theme="auto"] .qa-reopen-item { color: #456574; border-color: rgba(67, 101, 119, 0.44); background: rgba(231, 243, 247, 0.78); }
  [data-p2p-theme="auto"] .qa-action:hover,
  [data-p2p-theme="auto"] .qa-action:focus { box-shadow: 0 5px 12px rgba(31, 58, 72, 0.14), 0 0 0 1px color-mix(in srgb, currentColor 28%, transparent); }
  [data-p2p-theme="auto"] :is(.qa-workspace-page, .qa-standalone-page) :is(.qa-status-pill, .qa-outcome-pill) { color: #111827 !important; }
}

/* Frost notification banners use the same pale operational surface as tabs. */
[data-p2p-theme="light"] .alert {
  color: var(--frost-text-primary) !important;
  border-color: rgba(8, 151, 184, 0.42) !important;
  background: rgba(248, 253, 254, 0.92) !important;
  box-shadow:
    inset 4px 0 0 var(--frost-action),
    0 10px 24px rgba(8, 151, 184, 0.12) !important;
  text-shadow: none !important;
}

[data-p2p-theme="light"] .alert-success {
  color: #06351f !important;
  border-color: rgba(36, 170, 105, 0.34) !important;
  background: rgba(239, 253, 246, 0.94) !important;
  box-shadow:
    inset 4px 0 0 #2dbf7f,
    0 10px 24px rgba(36, 170, 105, 0.12) !important;
}

[data-p2p-theme="light"] .alert-danger {
  color: #6e1725 !important;
  border-color: rgba(216, 58, 78, 0.34) !important;
  background: rgba(255, 245, 247, 0.94) !important;
  box-shadow:
    inset 4px 0 0 #d83a4e,
    0 10px 24px rgba(216, 58, 78, 0.12) !important;
}

[data-p2p-theme="light"] #client-reference-status.client-reference-required {
  color: var(--status-capacity) !important;
}

[data-p2p-theme="light"] .alert .btn-close {
  filter: none !important;
  opacity: 0.58;
}

[data-p2p-theme="light"] .alert .btn-close:hover,
[data-p2p-theme="light"] .alert .btn-close:focus {
  opacity: 0.82;
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] .alert {
    color: var(--frost-text-primary) !important;
    border-color: rgba(8, 151, 184, 0.42) !important;
    background: rgba(248, 253, 254, 0.92) !important;
    box-shadow:
      inset 4px 0 0 var(--frost-action),
      0 10px 24px rgba(8, 151, 184, 0.12) !important;
    text-shadow: none !important;
  }

  [data-p2p-theme="auto"] .alert-success {
    color: #06351f !important;
    border-color: rgba(36, 170, 105, 0.34) !important;
    background: rgba(239, 253, 246, 0.94) !important;
    box-shadow:
      inset 4px 0 0 #2dbf7f,
      0 10px 24px rgba(36, 170, 105, 0.12) !important;
  }

  [data-p2p-theme="auto"] .alert-danger {
    color: #6e1725 !important;
    border-color: rgba(216, 58, 78, 0.34) !important;
    background: rgba(255, 245, 247, 0.94) !important;
    box-shadow:
      inset 4px 0 0 #d83a4e,
      0 10px 24px rgba(216, 58, 78, 0.12) !important;
  }

  [data-p2p-theme="auto"] #client-reference-status.client-reference-required {
    color: var(--status-capacity) !important;
  }

  [data-p2p-theme="auto"] .alert .btn-close {
    filter: none !important;
    opacity: 0.58;
  }

  [data-p2p-theme="auto"] .alert .btn-close:hover,
  [data-p2p-theme="auto"] .alert .btn-close:focus {
    opacity: 0.82;
  }
}

/* Frost platform/admin polish: keep operational density without Midnight panels. */
[data-p2p-theme="light"] .navbar {
  border-color: rgba(8, 151, 184, 0.3) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(231, 242, 247, 0.92)),
    #eef7fa !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 1px 0 rgba(8, 151, 184, 0.22),
    0 12px 28px rgba(31, 58, 72, 0.12) !important;
}

[data-p2p-theme="light"] :is(.navbar .nav-link, .navbar .btn-outline-secondary, .navbar .btn-outline-primary, .shell-action-pill, .company-switcher-toggle) {
  color: var(--frost-action-strong) !important;
  border-color: rgba(8, 151, 184, 0.42) !important;
  background: rgba(248, 253, 254, 0.78) !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

[data-p2p-theme="light"] .global-service-order-search .form-control {
  border-color: rgba(8, 151, 184, 0.42);
  background: rgba(248, 253, 254, 0.9);
  color: var(--frost-text-primary);
}

[data-p2p-theme="light"] .global-service-order-search .form-control::placeholder {
  color: var(--frost-text-secondary);
}

[data-p2p-theme="light"] :is(.navbar .nav-link:hover, .navbar .nav-link:focus, .navbar .btn-outline-secondary:hover, .navbar .btn-outline-secondary:focus, .navbar .btn-outline-primary:hover, .navbar .btn-outline-primary:focus, .shell-action-pill:hover, .shell-action-pill:focus, .company-switcher-toggle:hover, .company-switcher-toggle:focus) {
  color: #052c38 !important;
  border-color: rgba(8, 151, 184, 0.7) !important;
  background: rgba(190, 244, 253, 0.72) !important;
  box-shadow: 0 0 0 0.18rem rgba(8, 151, 184, 0.14) !important;
}

[data-p2p-theme="light"] :is(.navbar .nav-link.active, .navbar .app-domain-toggle.active, .shell-action-pill.active) {
  color: #031f28 !important;
  border-color: rgba(8, 151, 184, 0.7) !important;
  background: linear-gradient(180deg, #77e7f4, #18c9df) !important;
  box-shadow: 0 8px 20px rgba(8, 151, 184, 0.18) !important;
}

[data-p2p-theme="light"] :is(.company-switcher-label, .company-switcher-name, .navbar .text-secondary) {
  color: var(--frost-text-primary) !important;
}

[data-p2p-theme="light"] :is(
  .platform-dashboard .platform-hero,
  .platform-dashboard .platform-brand-panel,
  .company-admin-context,
  .platform-dashboard .platform-stat-card,
  .platform-dashboard .platform-section,
  .platform-dashboard .platform-side-panel,
  .platform-dashboard .platform-company-card,
  .platform-dashboard .platform-attention-card,
  .company-admin-card,
  .platform-dashboard .platform-empty-state,
  .platform-dashboard .platform-future-card,
  .platform-dashboard .platform-table-wrap,
  .launch-readiness-progress,
  .launch-readiness-next,
  .launch-readiness-item,
  .platform-readiness-overview,
  .platform-readiness-section,
  .platform-readiness-item,
  .platform-readiness-hero,
  .platform-detail-box,
  .platform-detail-item
) {
  color: var(--frost-text-primary) !important;
  border-color: rgba(8, 151, 184, 0.24) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 253, 254, 0.72)),
    rgba(248, 253, 254, 0.86) !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

[data-p2p-theme="light"] .platform-dashboard .platform-hero {
  border-color: rgba(8, 151, 184, 0.42) !important;
}

[data-p2p-theme="light"] .platform-detail-box-computed {
  border-color: rgba(22, 163, 74, 0.58) !important;
  box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.08) !important;
}

[data-p2p-theme="light"] .platform-detail-box-computed :is(h2, .platform-detail-box-count) {
  color: #15803d !important;
}

[data-p2p-theme="light"] .platform-detail-box-operator {
  border-color: rgba(217, 119, 6, 0.68) !important;
  box-shadow: inset 0 0 0 1px rgba(217, 119, 6, 0.1) !important;
}

[data-p2p-theme="light"] .platform-detail-box-operator :is(h2, .platform-detail-box-count) {
  color: #b45309 !important;
}

[data-p2p-theme="light"] .platform-detail-box-deferred {
  border-color: rgba(202, 138, 4, 0.58) !important;
  box-shadow: inset 0 0 0 1px rgba(202, 138, 4, 0.08) !important;
}

[data-p2p-theme="light"] .platform-detail-box-deferred :is(h2, .platform-detail-box-count) {
  color: #a16207 !important;
}

[data-p2p-theme="light"] .platform-dashboard :is(h1, h2, h3, strong, td, th, .platform-row-company, .company-admin-company-name, .company-admin-context strong, .launch-readiness-score strong, .platform-readiness-overview strong, .platform-readiness-gauge strong, .platform-readiness-primary strong, .platform-readiness-metric strong, .platform-detail-box h2, .platform-detail-box-count, .platform-detail-group summary strong, .platform-detail-item strong) {
  color: var(--frost-text-primary) !important;
  text-shadow: none !important;
}

[data-p2p-theme="light"] .platform-dashboard :is(p, small, li, em, .platform-section-heading p, .platform-company-card p, .platform-stat-card small, .company-admin-card p, .company-admin-context small, .platform-future-card p, .launch-readiness-item p, .launch-readiness-item small, .launch-readiness-next small, .launch-readiness-progress-detail, .platform-readiness-overview span, .platform-readiness-next, .platform-readiness-item p, .platform-readiness-item small, .platform-readiness-metric em, .platform-detail-item small) {
  color: var(--frost-text-muted) !important;
}

[data-p2p-theme="light"] .platform-dashboard :is(.platform-kicker, .company-admin-section-label, .platform-section-count) {
  color: var(--frost-action-strong) !important;
}

[data-p2p-theme="light"] .platform-dashboard .platform-stat-card span,
[data-p2p-theme="light"] .company-admin-context span,
[data-p2p-theme="light"] .platform-dashboard .platform-side-panel h2 {
  color: var(--frost-text-secondary) !important;
}

[data-p2p-theme="light"] .platform-dashboard .platform-search .form-control {
  color: var(--frost-text-primary) !important;
  border-color: rgba(8, 151, 184, 0.42) !important;
  background: rgba(255, 255, 255, 0.92) !important;
}

[data-p2p-theme="light"] .platform-dashboard .platform-search .form-control::placeholder {
  color: var(--frost-placeholder) !important;
}

[data-p2p-theme="light"] :is(.platform-dashboard .platform-search-submit, .platform-dashboard .platform-search-clear, .platform-dashboard .platform-company-card .btn-outline-primary, .platform-dashboard .platform-attention-card .btn-outline-primary, .platform-dashboard .platform-company-table .btn-outline-primary, .launch-readiness-item .btn-outline-primary) {
  color: var(--frost-action-strong) !important;
  border-color: rgba(8, 151, 184, 0.42) !important;
  background: rgba(248, 253, 254, 0.78) !important;
  box-shadow: none !important;
}

[data-p2p-theme="light"] :is(.platform-dashboard .platform-search-submit:hover, .platform-dashboard .platform-search-submit:focus, .platform-dashboard .platform-search-clear:hover, .platform-dashboard .platform-search-clear:focus, .platform-dashboard .platform-company-card .btn-outline-primary:hover, .platform-dashboard .platform-company-card .btn-outline-primary:focus, .platform-dashboard .platform-attention-card .btn-outline-primary:hover, .platform-dashboard .platform-attention-card .btn-outline-primary:focus, .platform-dashboard .platform-company-table .btn-outline-primary:hover, .platform-dashboard .platform-company-table .btn-outline-primary:focus, .launch-readiness-item .btn-outline-primary:hover, .launch-readiness-item .btn-outline-primary:focus) {
  color: #052c38 !important;
  border-color: rgba(8, 151, 184, 0.7) !important;
  background: rgba(190, 244, 253, 0.72) !important;
  box-shadow: 0 0 0 0.18rem rgba(8, 151, 184, 0.14) !important;
}

[data-p2p-theme="light"] .platform-dashboard .platform-panel-footer-link {
  color: #087990 !important;
  background: transparent !important;
}

[data-p2p-theme="light"] .platform-dashboard .platform-company-table {
  --bs-table-bg: rgba(248, 253, 254, 0.78);
  --bs-table-color: var(--frost-text-primary);
  --bs-table-border-color: rgba(67, 101, 119, 0.18);
  color: var(--frost-text-primary) !important;
}

[data-p2p-theme="light"] .platform-dashboard .platform-company-table thead th {
  color: var(--frost-table-header-text) !important;
  border-color: rgba(8, 151, 184, 0.26) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(212, 231, 239, 0.9)),
    var(--frost-table-header-bg) !important;
}

[data-p2p-theme="light"] .platform-dashboard :is(.platform-side-panel a, .platform-side-panel span) {
  color: var(--frost-text-primary) !important;
  border-bottom-color: rgba(67, 101, 119, 0.16) !important;
}

[data-p2p-theme="light"] .platform-dashboard :is(.platform-side-row-future strong, .platform-side-row-future small, .platform-side-row-future .platform-side-icon) {
  color: #b66d00 !important;
}

[data-p2p-theme="light"] .platform-dashboard :is(.platform-side-row-ok strong, .platform-side-row-ok small, .platform-side-icon-ok, .platform-status-active, .platform-card-status, .platform-environment) {
  color: #0f8a53 !important;
}

[data-p2p-theme="light"] .launch-readiness-page .company-admin-health-row.platform-side-row-ok small {
  color: rgba(15, 138, 83, 0.72) !important;
}

[data-p2p-theme="light"] .launch-readiness-page .company-admin-health-row.platform-side-row-future small {
  color: rgba(182, 109, 0, 0.7) !important;
}

[data-p2p-theme="light"] .platform-dashboard .platform-environment {
  border-color: rgba(36, 170, 105, 0.34) !important;
  background: rgba(239, 253, 246, 0.94) !important;
}

[data-p2p-theme="light"] .platform-dashboard .platform-environment.operations-status-warning {
  color: #9a5b00 !important;
  border-color: rgba(182, 109, 0, 0.38) !important;
  background: rgba(255, 248, 225, 0.96) !important;
}

[data-p2p-theme="light"] .platform-dashboard .platform-environment.operations-status-critical {
  color: #b42334 !important;
  border-color: rgba(180, 35, 52, 0.34) !important;
  background: rgba(255, 240, 242, 0.96) !important;
}

[data-p2p-theme="light"] .platform-dashboard .operations-summary-primary.operations-status-warning strong,
[data-p2p-theme="light"] .platform-dashboard .platform-side-panel .operations-status-warning :is(strong, small) {
  color: #9a5b00 !important;
}

[data-p2p-theme="light"] .platform-dashboard .operations-summary-primary.operations-status-success strong {
  color: #0f8a53 !important;
}

[data-p2p-theme="light"] .platform-dashboard .operations-summary-primary.operations-status-critical strong,
[data-p2p-theme="light"] .platform-dashboard .platform-side-panel .operations-status-critical :is(strong, small) {
  color: #b42334 !important;
}

[data-p2p-theme="light"] .platform-dashboard .platform-status-active {
  background: rgba(84, 241, 166, 0.2) !important;
}

[data-p2p-theme="light"] .platform-dashboard .platform-status-muted {
  color: var(--frost-text-muted) !important;
  background: rgba(217, 230, 236, 0.78) !important;
}

[data-p2p-theme="light"] .launch-readiness-owner,
[data-p2p-theme="light"] .launch-readiness-pill-optional,
[data-p2p-theme="light"] .launch-readiness-pill-deferred {
  color: var(--frost-text-muted) !important;
  background: rgba(217, 230, 236, 0.78) !important;
}

[data-p2p-theme="light"] .launch-readiness-pill-ready {
  color: #0f8a53 !important;
  background: rgba(84, 241, 166, 0.2) !important;
}

[data-p2p-theme="light"] .launch-readiness-pill-operator-verified {
  color: #087f9b !important;
  background: rgba(34, 211, 238, 0.16) !important;
}

[data-p2p-theme="light"] .launch-readiness-score span {
  color: #0f8a53 !important;
  border-color: rgba(36, 170, 105, 0.34) !important;
  background: rgba(239, 253, 246, 0.94) !important;
}

[data-p2p-theme="light"] .launch-readiness-pill-needs-attention {
  color: #b66d00 !important;
  background: rgba(255, 237, 213, 0.8) !important;
}

[data-p2p-theme="light"] .launch-readiness-pill-not-started {
  color: #b42318 !important;
  background: rgba(254, 226, 226, 0.84) !important;
}

[data-p2p-theme="light"] .platform-dashboard :is(.platform-empty-state, .platform-future-card) {
  border-style: dashed;
}

[data-p2p-theme="light"] .platform-readiness-gauge {
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.96) 0 51%, transparent 52%),
    conic-gradient(#22c55e var(--platform-readiness-progress, 0%), rgba(217, 230, 236, 0.82) 0) !important;
}

[data-p2p-theme="light"] .platform-readiness-primary span,
[data-p2p-theme="light"] .platform-dashboard .platform-attention-card li {
  color: #b66d00 !important;
}

[data-p2p-theme="light"] :is(.monday-morning-summary, .monday-morning-step) {
  color: var(--frost-text-primary) !important;
  border-color: rgba(8, 151, 184, 0.24) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 253, 254, 0.72)),
    rgba(248, 253, 254, 0.86) !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

[data-p2p-theme="light"] :is(.monday-morning-summary strong, .monday-morning-step-title h3) {
  color: var(--frost-text-primary) !important;
}

[data-p2p-theme="light"] :is(.monday-morning-summary p, .monday-morning-summary span, .monday-morning-step-details dt, .monday-morning-step-details dd) {
  color: #506675 !important;
}

[data-p2p-theme="light"] .monday-morning-step-current {
  border-color: rgba(8, 151, 184, 0.42) !important;
}

[data-p2p-theme="light"] .monday-morning-step-number {
  color: #087990 !important;
  border-color: rgba(8, 151, 184, 0.32) !important;
  background: rgba(190, 244, 253, 0.5) !important;
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] .navbar {
    border-color: rgba(8, 151, 184, 0.3) !important;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(231, 242, 247, 0.92)),
      #eef7fa !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.9),
      0 1px 0 rgba(8, 151, 184, 0.22),
      0 12px 28px rgba(31, 58, 72, 0.12) !important;
  }

  [data-p2p-theme="auto"] :is(.navbar .nav-link, .navbar .btn-outline-secondary, .navbar .btn-outline-primary, .shell-action-pill, .company-switcher-toggle) {
    color: var(--frost-action-strong) !important;
    border-color: rgba(8, 151, 184, 0.42) !important;
    background: rgba(248, 253, 254, 0.78) !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  [data-p2p-theme="auto"] .global-service-order-search .form-control {
    border-color: rgba(8, 151, 184, 0.42);
    background: rgba(248, 253, 254, 0.9);
    color: var(--frost-text-primary);
  }

  [data-p2p-theme="auto"] .global-service-order-search .form-control::placeholder {
    color: var(--frost-text-secondary);
  }

  [data-p2p-theme="auto"] :is(.navbar .nav-link:hover, .navbar .nav-link:focus, .navbar .btn-outline-secondary:hover, .navbar .btn-outline-secondary:focus, .navbar .btn-outline-primary:hover, .navbar .btn-outline-primary:focus, .shell-action-pill:hover, .shell-action-pill:focus, .company-switcher-toggle:hover, .company-switcher-toggle:focus) {
    color: #052c38 !important;
    border-color: rgba(8, 151, 184, 0.7) !important;
    background: rgba(190, 244, 253, 0.72) !important;
    box-shadow: 0 0 0 0.18rem rgba(8, 151, 184, 0.14) !important;
  }

  [data-p2p-theme="auto"] :is(.navbar .nav-link.active, .navbar .app-domain-toggle.active, .shell-action-pill.active) {
    color: #031f28 !important;
    border-color: rgba(8, 151, 184, 0.7) !important;
    background: linear-gradient(180deg, #77e7f4, #18c9df) !important;
    box-shadow: 0 8px 20px rgba(8, 151, 184, 0.18) !important;
  }

  [data-p2p-theme="auto"] :is(.company-switcher-label, .company-switcher-name, .navbar .text-secondary) {
    color: var(--frost-text-primary) !important;
  }

  [data-p2p-theme="auto"] :is(
    .platform-dashboard .platform-hero,
    .platform-dashboard .platform-brand-panel,
    .company-admin-context,
    .platform-dashboard .platform-stat-card,
    .platform-dashboard .platform-section,
    .platform-dashboard .platform-side-panel,
    .platform-dashboard .platform-company-card,
    .platform-dashboard .platform-attention-card,
    .company-admin-card,
    .platform-dashboard .platform-empty-state,
    .platform-dashboard .platform-future-card,
    .platform-dashboard .platform-table-wrap,
    .launch-readiness-progress,
    .launch-readiness-next,
    .launch-readiness-item,
    .platform-readiness-overview,
    .platform-readiness-section,
    .platform-readiness-item,
    .platform-readiness-hero,
    .platform-detail-box,
    .platform-detail-item
  ) {
    color: var(--frost-text-primary) !important;
    border-color: rgba(8, 151, 184, 0.24) !important;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 253, 254, 0.72)),
      rgba(248, 253, 254, 0.86) !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  [data-p2p-theme="auto"] .platform-dashboard .platform-hero {
    border-color: rgba(8, 151, 184, 0.42) !important;
  }

  [data-p2p-theme="auto"] .platform-dashboard :is(h1, h2, h3, strong, td, th, .platform-row-company, .company-admin-company-name, .company-admin-context strong, .launch-readiness-score strong, .platform-readiness-overview strong, .platform-readiness-gauge strong, .platform-readiness-primary strong, .platform-readiness-metric strong, .platform-detail-box h2, .platform-detail-box-count, .platform-detail-group summary strong, .platform-detail-item strong) {
    color: var(--frost-text-primary) !important;
    text-shadow: none !important;
  }

  [data-p2p-theme="auto"] .platform-detail-box-computed {
    border-color: rgba(22, 163, 74, 0.58) !important;
    box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.08) !important;
  }

  [data-p2p-theme="auto"] .platform-detail-box-computed :is(h2, .platform-detail-box-count) {
    color: #15803d !important;
  }

  [data-p2p-theme="auto"] .platform-detail-box-operator {
    border-color: rgba(217, 119, 6, 0.68) !important;
    box-shadow: inset 0 0 0 1px rgba(217, 119, 6, 0.1) !important;
  }

  [data-p2p-theme="auto"] .platform-detail-box-operator :is(h2, .platform-detail-box-count) {
    color: #b45309 !important;
  }

  [data-p2p-theme="auto"] .platform-detail-box-deferred {
    border-color: rgba(202, 138, 4, 0.58) !important;
    box-shadow: inset 0 0 0 1px rgba(202, 138, 4, 0.08) !important;
  }

  [data-p2p-theme="auto"] .platform-detail-box-deferred :is(h2, .platform-detail-box-count) {
    color: #a16207 !important;
  }

  [data-p2p-theme="auto"] .platform-dashboard :is(p, small, li, em, .platform-section-heading p, .platform-company-card p, .platform-stat-card small, .company-admin-card p, .company-admin-context small, .platform-future-card p, .launch-readiness-item p, .launch-readiness-item small, .launch-readiness-next small, .launch-readiness-progress-detail, .platform-readiness-overview span, .platform-readiness-next, .platform-readiness-item p, .platform-readiness-item small, .platform-readiness-metric em, .platform-detail-item small) {
    color: var(--frost-text-muted) !important;
  }

  [data-p2p-theme="auto"] .platform-dashboard :is(.platform-kicker, .company-admin-section-label, .platform-section-count) {
    color: var(--frost-action-strong) !important;
  }

  [data-p2p-theme="auto"] .platform-dashboard .platform-stat-card span,
  [data-p2p-theme="auto"] .company-admin-context span,
  [data-p2p-theme="auto"] .platform-dashboard .platform-side-panel h2 {
    color: var(--frost-text-secondary) !important;
  }

  [data-p2p-theme="auto"] .platform-dashboard .platform-search .form-control {
    color: var(--frost-text-primary) !important;
    border-color: rgba(8, 151, 184, 0.42) !important;
    background: rgba(255, 255, 255, 0.92) !important;
  }

  [data-p2p-theme="auto"] .platform-dashboard .platform-search .form-control::placeholder {
    color: var(--frost-placeholder) !important;
  }

  [data-p2p-theme="auto"] :is(.platform-dashboard .platform-search-submit, .platform-dashboard .platform-search-clear, .platform-dashboard .platform-company-card .btn-outline-primary, .platform-dashboard .platform-attention-card .btn-outline-primary, .platform-dashboard .platform-company-table .btn-outline-primary, .launch-readiness-item .btn-outline-primary) {
    color: var(--frost-action-strong) !important;
    border-color: rgba(8, 151, 184, 0.42) !important;
    background: rgba(248, 253, 254, 0.78) !important;
    box-shadow: none !important;
  }

  [data-p2p-theme="auto"] :is(.platform-dashboard .platform-search-submit:hover, .platform-dashboard .platform-search-submit:focus, .platform-dashboard .platform-search-clear:hover, .platform-dashboard .platform-search-clear:focus, .platform-dashboard .platform-company-card .btn-outline-primary:hover, .platform-dashboard .platform-company-card .btn-outline-primary:focus, .platform-dashboard .platform-attention-card .btn-outline-primary:hover, .platform-dashboard .platform-attention-card .btn-outline-primary:focus, .platform-dashboard .platform-company-table .btn-outline-primary:hover, .platform-dashboard .platform-company-table .btn-outline-primary:focus, .launch-readiness-item .btn-outline-primary:hover, .launch-readiness-item .btn-outline-primary:focus) {
    color: #052c38 !important;
    border-color: rgba(8, 151, 184, 0.7) !important;
    background: rgba(190, 244, 253, 0.72) !important;
    box-shadow: 0 0 0 0.18rem rgba(8, 151, 184, 0.14) !important;
  }

  [data-p2p-theme="auto"] .platform-dashboard .platform-panel-footer-link {
    color: #087990 !important;
    background: transparent !important;
  }

  [data-p2p-theme="auto"] .platform-dashboard .platform-company-table {
    --bs-table-bg: rgba(248, 253, 254, 0.78);
    --bs-table-color: var(--frost-text-primary);
    --bs-table-border-color: rgba(67, 101, 119, 0.18);
    color: var(--frost-text-primary) !important;
  }

  [data-p2p-theme="auto"] .platform-dashboard .platform-company-table thead th {
    color: var(--frost-table-header-text) !important;
    border-color: rgba(8, 151, 184, 0.26) !important;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(212, 231, 239, 0.9)),
      var(--frost-table-header-bg) !important;
  }

  [data-p2p-theme="auto"] .platform-dashboard :is(.platform-side-panel a, .platform-side-panel span) {
    color: var(--frost-text-primary) !important;
    border-bottom-color: rgba(67, 101, 119, 0.16) !important;
  }

  [data-p2p-theme="auto"] .platform-dashboard :is(.platform-side-row-future strong, .platform-side-row-future small, .platform-side-row-future .platform-side-icon) {
    color: #b66d00 !important;
  }

  [data-p2p-theme="auto"] .platform-dashboard :is(.platform-side-row-ok strong, .platform-side-row-ok small, .platform-side-icon-ok, .platform-status-active, .platform-card-status, .platform-environment) {
    color: #0f8a53 !important;
  }

  [data-p2p-theme="auto"] .launch-readiness-page .company-admin-health-row.platform-side-row-ok small {
    color: rgba(15, 138, 83, 0.72) !important;
  }

  [data-p2p-theme="auto"] .launch-readiness-page .company-admin-health-row.platform-side-row-future small {
    color: rgba(182, 109, 0, 0.7) !important;
  }

  [data-p2p-theme="auto"] .platform-dashboard .platform-environment {
    border-color: rgba(36, 170, 105, 0.34) !important;
    background: rgba(239, 253, 246, 0.94) !important;
  }

  [data-p2p-theme="auto"] .platform-dashboard .platform-status-active {
    background: rgba(84, 241, 166, 0.2) !important;
  }

  [data-p2p-theme="auto"] .platform-dashboard .platform-status-muted {
    color: var(--frost-text-muted) !important;
    background: rgba(217, 230, 236, 0.78) !important;
  }

  [data-p2p-theme="auto"] .launch-readiness-owner,
  [data-p2p-theme="auto"] .launch-readiness-pill-optional,
  [data-p2p-theme="auto"] .launch-readiness-pill-deferred {
    color: var(--frost-text-muted) !important;
    background: rgba(217, 230, 236, 0.78) !important;
  }

  [data-p2p-theme="auto"] .launch-readiness-pill-ready {
    color: #0f8a53 !important;
    background: rgba(84, 241, 166, 0.2) !important;
  }

  [data-p2p-theme="auto"] .launch-readiness-pill-operator-verified {
    color: #087f9b !important;
    background: rgba(34, 211, 238, 0.16) !important;
  }

  [data-p2p-theme="auto"] .launch-readiness-score span {
    color: #0f8a53 !important;
    border-color: rgba(36, 170, 105, 0.34) !important;
    background: rgba(239, 253, 246, 0.94) !important;
  }

  [data-p2p-theme="auto"] .launch-readiness-pill-needs-attention {
    color: #b66d00 !important;
    background: rgba(255, 237, 213, 0.8) !important;
  }

  [data-p2p-theme="auto"] .launch-readiness-pill-not-started {
    color: #b42318 !important;
    background: rgba(254, 226, 226, 0.84) !important;
  }

  [data-p2p-theme="auto"] .platform-dashboard :is(.platform-empty-state, .platform-future-card) {
    border-style: dashed;
  }

  [data-p2p-theme="auto"] .platform-readiness-gauge {
    background:
      radial-gradient(circle at center, rgba(255, 255, 255, 0.96) 0 51%, transparent 52%),
      conic-gradient(#22c55e var(--platform-readiness-progress, 0%), rgba(217, 230, 236, 0.82) 0) !important;
  }

  [data-p2p-theme="auto"] .platform-readiness-primary span,
  [data-p2p-theme="auto"] .platform-dashboard .platform-attention-card li {
    color: #b66d00 !important;
  }

  [data-p2p-theme="auto"] :is(.monday-morning-summary, .monday-morning-step) {
    color: var(--frost-text-primary) !important;
    border-color: rgba(8, 151, 184, 0.24) !important;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 253, 254, 0.72)),
      rgba(248, 253, 254, 0.86) !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  [data-p2p-theme="auto"] :is(.monday-morning-summary strong, .monday-morning-step-title h3) {
    color: var(--frost-text-primary) !important;
  }

  [data-p2p-theme="auto"] :is(.monday-morning-summary p, .monday-morning-summary span, .monday-morning-step-details dt, .monday-morning-step-details dd) {
    color: #506675 !important;
  }

  [data-p2p-theme="auto"] .monday-morning-step-current {
    border-color: rgba(8, 151, 184, 0.42) !important;
  }

  [data-p2p-theme="auto"] .monday-morning-step-number {
    color: #087990 !important;
    border-color: rgba(8, 151, 184, 0.32) !important;
    background: rgba(190, 244, 253, 0.5) !important;
  }
}

/* Shared sibling-view folder tabs: Dispatch page links and Accounting panes. */
.p2p-subpage-tabs {
  --p2p-tab-fill: #111b20;
  --p2p-tab-stroke: #405b66;
  --p2p-tab-ink: #d7e8ed;
  --p2p-tab-hover: #19313a;
  --p2p-tab-active-fill: #16424c;
  --p2p-tab-active-stroke: #34d2e9;
  --p2p-tab-active-ink: #e8fbff;
  --p2p-tab-rule: #4a8290;
  --p2p-tab-focus: rgba(40, 231, 255, 0.55);
}

[data-p2p-theme="light"] .p2p-subpage-tabs {
  --p2p-tab-fill: #f5f9fb;
  --p2p-tab-stroke: #bfd5de;
  --p2p-tab-ink: #294554;
  --p2p-tab-hover: #e5f6fa;
  --p2p-tab-active-fill: #c5f4fa;
  --p2p-tab-active-stroke: #159bb5;
  --p2p-tab-active-ink: #093643;
  --p2p-tab-rule: #9ecbd6;
  --p2p-tab-focus: rgba(8, 151, 184, 0.48);
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] .p2p-subpage-tabs {
    --p2p-tab-fill: #f5f9fb;
    --p2p-tab-stroke: #bfd5de;
    --p2p-tab-ink: #294554;
    --p2p-tab-hover: #e5f6fa;
    --p2p-tab-active-fill: #c5f4fa;
    --p2p-tab-active-stroke: #159bb5;
    --p2p-tab-active-ink: #093643;
    --p2p-tab-rule: #9ecbd6;
    --p2p-tab-focus: rgba(8, 151, 184, 0.48);
  }
}

html[data-p2p-theme] :is(#accountingTabs, .dispatch-dashboard-tabs).p2p-subpage-tabs {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 3px !important;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border: 0;
  border-bottom: 2px solid var(--p2p-tab-rule) !important;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

html[data-p2p-theme] #accountingTabs.p2p-subpage-tabs {
  margin-bottom: 0;
  padding-left: 0;
}

html[data-p2p-theme] #accountingTabs.p2p-subpage-tabs .nav-item {
  flex: 0 0 auto;
  margin-bottom: 0;
}

html[data-p2p-theme] :is(#accountingTabs, .dispatch-dashboard-tabs).p2p-subpage-tabs :is(a, button, span.disabled) {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin: 0;
  padding: 8px 27px 8px 16px;
  border: 1px solid var(--p2p-tab-stroke) !important;
  border-bottom: 0 !important;
  border-radius: 9px 9px 0 0 !important;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 100%, 0 100%);
  color: var(--p2p-tab-ink) !important;
  background: var(--p2p-tab-fill) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  transform: none !important;
  transition: color var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast);
}

html[data-p2p-theme] :is(#accountingTabs, .dispatch-dashboard-tabs).p2p-subpage-tabs :is(a, button):not(.active):hover {
  border-color: var(--p2p-tab-active-stroke) !important;
  color: var(--p2p-tab-active-ink) !important;
  background: var(--p2p-tab-hover) !important;
}

html[data-p2p-theme] :is(#accountingTabs, .dispatch-dashboard-tabs).p2p-subpage-tabs :is(a, button):focus-visible {
  border-color: var(--p2p-tab-active-stroke) !important;
  outline: 3px solid var(--p2p-tab-focus);
  outline-offset: -4px;
}

html[data-p2p-theme] :is(#accountingTabs, .dispatch-dashboard-tabs).p2p-subpage-tabs :is(a, button).active {
  border-color: var(--p2p-tab-active-stroke) !important;
  color: var(--p2p-tab-active-ink) !important;
  background: var(--p2p-tab-active-fill) !important;
  box-shadow: inset 0 -3px 0 var(--p2p-tab-active-stroke) !important;
}

html[data-p2p-theme] #accountingTabs.p2p-subpage-tabs .nav-link.border-danger:not(.active) {
  border-color: var(--status-capacity) !important;
  color: var(--status-capacity) !important;
  background: color-mix(in srgb, var(--status-capacity) 10%, var(--p2p-tab-fill)) !important;
}

html[data-p2p-theme] :is(#accountingTabs, .dispatch-dashboard-tabs).p2p-subpage-tabs span.disabled {
  opacity: 0.58;
}

/* Frost Command Center: crisp semantic color without returning to neon fills. */
[data-p2p-theme="light"] .command-center {
  --command-crisp-cyan: #079bb3;
  --command-crisp-amber: #d09a00;
  --command-crisp-orange: #df6f00;
  --command-crisp-blue: #347ce1;
  --command-crisp-red: #df4055;
  --command-crisp-violet: #8d5bd6;
  --command-crisp-gold: #d4a400;
  --command-crisp-green: #16a66d;
  --command-crisp-neutral: #465a68;
}

[data-p2p-theme="light"] .command-center .command-tone-cyan { --command-tone-color: var(--command-crisp-cyan); }
[data-p2p-theme="light"] .command-center :is(.command-tone-amber, .command-tone-yellow) { --command-tone-color: var(--command-crisp-amber); }
[data-p2p-theme="light"] .command-center .command-tone-orange { --command-tone-color: var(--command-crisp-orange); }
[data-p2p-theme="light"] .command-center .command-tone-blue { --command-tone-color: var(--command-crisp-blue); }
[data-p2p-theme="light"] .command-center .command-tone-red { --command-tone-color: var(--command-crisp-red); }
[data-p2p-theme="light"] .command-center .command-tone-violet { --command-tone-color: var(--command-crisp-violet); }
[data-p2p-theme="light"] .command-center .command-tone-gold { --command-tone-color: var(--command-crisp-gold); }
[data-p2p-theme="light"] .command-center .command-tone-green { --command-tone-color: var(--command-crisp-green); }
[data-p2p-theme="light"] .command-center .command-tone-neutral { --command-tone-color: var(--command-crisp-neutral); }

[data-p2p-theme="light"] .command-center .command-kpi {
  color: var(--command-tone-color);
  border-color: color-mix(in srgb, var(--command-tone-color) 48%, #d6e1e7) !important;
  background: #ffffff !important;
  box-shadow:
    0 1px 2px rgba(31, 58, 72, 0.07),
    0 8px 20px rgba(31, 58, 72, 0.06) !important;
}

[data-p2p-theme="light"] .command-center .command-kpi::before {
  opacity: 0.07;
}

[data-p2p-theme="light"] .command-center .command-kpi:hover,
[data-p2p-theme="light"] .command-center .command-kpi:focus {
  border-color: color-mix(in srgb, var(--command-tone-color) 72%, #c8d7df) !important;
  box-shadow:
    0 2px 4px rgba(31, 58, 72, 0.08),
    0 12px 26px rgba(31, 58, 72, 0.1) !important;
}

[data-p2p-theme="light"] .command-center .command-kpi span:not(.command-kpi-icon) {
  color: var(--ops-text) !important;
}

[data-p2p-theme="light"] .command-center.command-center .command-kpi :is(strong, small),
[data-p2p-theme="light"] .command-center.command-center .command-kpi .command-kpi-icon {
  color: var(--command-tone-color) !important;
}

[data-p2p-theme="light"] .command-center .command-alert-clear :is(
  .command-alert-icon,
  .command-alert-chevron,
  .command-alert-count
) {
  color: var(--command-crisp-green) !important;
}

[data-p2p-theme="light"] .command-center .command-alert-clear .command-alert-copy strong {
  color: #08734e !important;
}

[data-p2p-theme="light"] .command-center.command-center .command-alert-count {
  color: color-mix(in srgb, var(--command-tone-color) 76%, #102838) !important;
  border-color: color-mix(in srgb, var(--command-tone-color) 46%, #d6e1e7) !important;
  background: color-mix(in srgb, var(--command-tone-color) 12%, #ffffff) !important;
  box-shadow: none !important;
}

[data-p2p-theme="light"] .tech-workday-calendar-header {
  color: var(--frost-dark-text) !important;
  border-color: rgba(40, 199, 225, 0.5) !important;
  background:
    linear-gradient(135deg, rgba(31, 63, 76, 0.98), rgba(12, 29, 38, 0.98)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 12px 28px rgba(31, 58, 72, 0.16) !important;
}

[data-p2p-theme="light"] .tech-workday-calendar-header :is(h2, .text-secondary) {
  color: var(--frost-dark-text) !important;
}

[data-p2p-theme="light"] .tech-workday-selected-count span {
  color: #8eeaf7 !important;
}

[data-p2p-theme="light"] .product-info-panel {
  color: var(--frost-text-primary);
  border-color: rgba(8, 151, 184, 0.26);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(241, 249, 252, 0.9)),
    #f8fdfe;
  box-shadow: 0 18px 42px rgba(31, 58, 72, 0.14);
}

[data-p2p-theme="light"] .product-info-panel h1,
[data-p2p-theme="light"] .product-info-card h2,
[data-p2p-theme="light"] .product-info-resource-list strong {
  color: var(--frost-text-primary);
}

[data-p2p-theme="light"] :is(.product-info-summary, .product-info-card-description, .product-info-resource-list span) {
  color: var(--frost-text-muted);
}

[data-p2p-theme="light"] .product-info-card {
  border-color: rgba(67, 101, 119, 0.18);
  background: rgba(255, 255, 255, 0.76);
}

[data-p2p-theme="light"] .product-info-evaluation-status {
  border-left-color: #b77900;
  background: rgba(245, 158, 11, 0.1);
}

[data-p2p-theme="light"] .product-info-evaluation-status span { color: var(--frost-text-muted); }
[data-p2p-theme="light"] .product-info-evaluation-status strong { color: var(--frost-text-primary); }

[data-p2p-theme="light"] .product-info-resource-list li {
  border-left-color: rgba(8, 151, 184, 0.54);
  background: rgba(229, 244, 249, 0.72);
}

/* Frost visual-system normalization: dense controls and preview headers use the
   same calm light surface as forms, tables, and secondary actions. */
[data-p2p-theme="light"] .command-date-form {
  padding: 4px;
  border: 1px solid var(--frost-outline-border);
  border-radius: 8px;
  background: var(--frost-surface);
  box-shadow: 0 6px 16px rgba(31, 58, 72, 0.08);
}

[data-p2p-theme="light"] .command-date-nav {
  border-color: var(--frost-outline-border);
  background: var(--frost-surface);
  box-shadow: 0 6px 16px rgba(31, 58, 72, 0.08);
}

[data-p2p-theme="light"] .calendar-navigation-group {
  border-color: var(--frost-outline-border);
  background: var(--frost-surface);
  box-shadow: 0 6px 16px rgba(31, 58, 72, 0.08);
}

[data-p2p-theme="light"] .command-date-form .command-field-icon {
  color: var(--frost-text-secondary);
}

[data-p2p-theme="light"] .export-preview-header {
  color: var(--frost-text-primary);
  border-bottom-color: rgba(67, 101, 119, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(227, 242, 248, 0.9)),
    var(--frost-surface-tint);
}

[data-p2p-theme="light"] .export-preview-header h2,
[data-p2p-theme="light"] .export-preview-count {
  color: var(--frost-text-primary);
}

[data-p2p-theme="light"] .export-preview-header h2 span {
  color: var(--frost-text-muted);
}

[data-p2p-theme="light"] .export-canceled-toggle .form-check-label {
  color: var(--frost-text-secondary);
  font-weight: 700;
}

[data-p2p-theme="light"] .export-canceled-toggle .form-check-input {
  border-color: rgba(67, 101, 119, 0.52);
  background-color: #dceaf0;
}

[data-p2p-theme="light"] .export-canceled-toggle .form-check-input:checked {
  border-color: var(--frost-action-strong);
  background-color: var(--frost-action);
}

/* Frost operational workspaces: retain dark map tiles, not Midnight containers. */
[data-p2p-theme="light"] :is(.dispatch-dashboard-map-panel, .command-map-panel, .routing-board-panel) {
  color: var(--frost-text-primary) !important;
  border-color: var(--frost-line) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(239, 248, 251, 0.78)),
    var(--frost-surface) !important;
  box-shadow: var(--frost-shadow) !important;
}

[data-p2p-theme="light"] :is(.command-map-panel .command-panel-header h2, .dispatch-dashboard-map-panel h2, .routing-board-panel h2),
[data-p2p-theme="light"] :is(.command-map-panel p, .command-map-footer span, .dispatch-dashboard-map-status, .routing-board-legend) {
  color: var(--frost-text-primary) !important;
}

[data-p2p-theme="light"] :is(.command-map-panel p, .command-map-footer span, .dispatch-dashboard-map-status, .routing-board-legend) {
  color: var(--frost-text-muted) !important;
}

[data-p2p-theme="light"] :is(.routing-board-scroll, .routing-tech-heading, .routing-day-heading, .routing-tech-card, .routing-cell, .routing-selected-list-panel, .routing-selected-stop) {
  color: var(--frost-text-primary) !important;
  border-color: rgba(67, 101, 119, 0.22) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(237, 247, 251, 0.78)),
    var(--frost-surface) !important;
  box-shadow: none !important;
}

[data-p2p-theme="light"] :is(.routing-tech-heading, .routing-day-heading) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(218, 238, 246, 0.92)),
    var(--frost-surface-tint) !important;
}

[data-p2p-theme="light"] :is(.routing-cell-selected, .routing-cell.routing-cell-selected.routing-cell-available, .routing-cell.routing-cell-selected.routing-cell-unavailable) {
  color: #052b37 !important;
  border-color: rgba(8, 151, 184, 0.72) !important;
  background:
    linear-gradient(180deg, rgba(190, 244, 253, 0.88), rgba(224, 248, 252, 0.74)),
    var(--frost-selected-row) !important;
  box-shadow: inset 4px 0 0 var(--frost-action), 0 8px 18px rgba(31, 58, 72, 0.12) !important;
}

/* Availability remains a distinct scheduling signal in Frost. Cyan identifies
   the selected workspace; the inset edge retains the available/blocked truth. */
[data-p2p-theme="light"] .routing-cell.routing-cell-available {
  border-color: rgba(36, 145, 91, 0.7) !important;
  background:
    linear-gradient(180deg, rgba(84, 241, 166, 0.1), transparent 54%),
    var(--frost-surface) !important;
  box-shadow: inset 4px 0 0 rgba(36, 145, 91, 0.82) !important;
}

[data-p2p-theme="light"] .routing-cell.routing-cell-unavailable {
  border-color: rgba(190, 66, 85, 0.7) !important;
  background:
    linear-gradient(180deg, rgba(255, 92, 118, 0.09), transparent 54%),
    var(--frost-surface) !important;
  box-shadow: inset 4px 0 0 rgba(190, 66, 85, 0.82) !important;
}

[data-p2p-theme="light"] .routing-cell.routing-cell-selected.routing-cell-available {
  border-color: rgba(8, 151, 184, 0.72) !important;
  box-shadow:
    inset 4px 0 0 rgba(36, 145, 91, 0.92),
    inset 0 0 0 2px rgba(8, 151, 184, 0.72),
    0 8px 18px rgba(31, 58, 72, 0.12) !important;
}

[data-p2p-theme="light"] .routing-cell.routing-cell-selected.routing-cell-unavailable {
  border-color: rgba(8, 151, 184, 0.72) !important;
  box-shadow:
    inset 4px 0 0 rgba(190, 66, 85, 0.92),
    inset 0 0 0 2px rgba(8, 151, 184, 0.72),
    0 8px 18px rgba(31, 58, 72, 0.12) !important;
}

[data-p2p-theme="light"] .routing-cell.routing-cell-unsaved {
  box-shadow: inset 0 -3px 0 rgba(190, 133, 15, 0.85), inset 4px 0 0 currentColor !important;
}

[data-p2p-theme="light"] .routing-cell.routing-cell-unsaved.routing-cell-available {
  box-shadow: inset 0 -3px 0 rgba(190, 133, 15, 0.85), inset 4px 0 0 rgba(36, 145, 91, 0.82) !important;
}

[data-p2p-theme="light"] .routing-cell.routing-cell-unsaved.routing-cell-unavailable {
  box-shadow: inset 0 -3px 0 rgba(190, 133, 15, 0.85), inset 4px 0 0 rgba(190, 66, 85, 0.82) !important;
}

[data-p2p-theme="light"] .routing-pref-text {
  color: #765000 !important;
  border-color: rgba(161, 108, 0, 0.72) !important;
  background: #fff1c7 !important;
  text-shadow: none !important;
}

[data-p2p-theme="light"] .routing-structured-pref {
  color: #4f2676 !important;
  border-color: rgba(111, 55, 161, 0.7) !important;
  background: #f0ddff !important;
  text-shadow: none !important;
}

[data-p2p-theme="light"] .routing-plan-detail {
  color: #385865 !important;
}

[data-p2p-theme="light"] .routing-selected-status-detail {
  color: #244957 !important;
}

[data-p2p-theme="light"] .routing-selected-planning-notice {
  color: #694600 !important;
  border-left-color: #a66d00 !important;
  background: #fff1c7 !important;
}

/* Staff Workday intentionally uses the same profile-day availability truth as
   Routing, while keeping its selected-day cyan emphasis separate from routing. */
.tech-workday-day-available {
  border-color: rgba(84, 241, 166, 0.78) !important;
  box-shadow: inset 4px 0 0 rgba(84, 241, 166, 0.78);
}

.tech-workday-day-unavailable {
  border-color: rgba(255, 92, 118, 0.82) !important;
  box-shadow: inset 4px 0 0 rgba(255, 92, 118, 0.8);
}

.tech-workday-day-selected.tech-workday-day-available {
  box-shadow:
    inset 4px 0 0 rgba(84, 241, 166, 0.92),
    inset 0 0 0 2px rgba(40, 231, 255, 0.82),
    0 0 18px rgba(40, 231, 255, 0.24) !important;
}

.tech-workday-day-selected.tech-workday-day-unavailable {
  box-shadow:
    inset 4px 0 0 rgba(255, 92, 118, 0.94),
    inset 0 0 0 2px rgba(40, 231, 255, 0.82),
    0 0 18px rgba(40, 231, 255, 0.24) !important;
}

/* Payment batches are forms, not a dark operational canvas, in Frost. */
[data-p2p-theme="light"] .accounting-batch-bar {
  color: var(--frost-text-primary);
  border-color: var(--frost-line-strong) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(227, 242, 248, 0.86)),
    var(--frost-surface-tint) !important;
  box-shadow: 0 10px 24px rgba(31, 58, 72, 0.12) !important;
}

[data-p2p-theme="light"] .accounting-batch-bar :is(.form-label, .form-check-label, [data-selected-count]) {
  color: var(--frost-text-secondary) !important;
  font-weight: 750;
}

[data-p2p-theme="light"] .accounting-batch-bar [data-selected-count] {
  color: var(--frost-text-primary) !important;
  font-weight: 850;
}

[data-p2p-theme="light"] .accounting-batch-bar :is(.form-control, .form-select) {
  color: var(--frost-text-primary);
  border-color: rgba(67, 101, 119, 0.34);
  background-color: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 1px 1px rgba(31, 58, 72, 0.04);
}

[data-p2p-theme="light"] .accounting-batch-bar .btn-outline-secondary {
  color: var(--frost-text-secondary);
  border-color: rgba(67, 101, 119, 0.42);
  background: rgba(255, 255, 255, 0.58);
}

/* Calendar chrome belongs to Frost too. Dark map canvases may remain
   operationally dark; schedule grids and Workday are information surfaces. */
[data-p2p-theme="light"] .routing-day-heading > div:first-child,
[data-p2p-theme="light"] .routing-day-heading.routing-day-today > div:first-child {
  color: var(--frost-text-primary) !important;
  text-shadow: none;
}

[data-p2p-theme="light"] .routing-day-heading .text-secondary,
[data-p2p-theme="light"] .routing-day-heading.routing-day-today .text-secondary {
  color: var(--frost-text-secondary) !important;
}

[data-p2p-theme="light"] .tech-workday-calendar-panel {
  color: var(--frost-text-primary) !important;
  border-color: var(--frost-line) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(237, 247, 251, 0.82)),
    var(--frost-surface) !important;
  box-shadow: var(--frost-shadow) !important;
}

[data-p2p-theme="light"] .tech-workday-calendar-header {
  color: var(--frost-text-primary) !important;
  border-color: rgba(8, 151, 184, 0.34) !important;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(220, 240, 247, 0.9)),
    var(--frost-surface-tint) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 8px 20px rgba(31, 58, 72, 0.1) !important;
}

[data-p2p-theme="light"] .tech-workday-calendar-header :is(h2, .text-secondary) {
  color: var(--frost-text-primary) !important;
}

[data-p2p-theme="light"] .tech-workday-calendar-header h2 {
  color: #102838 !important;
}

[data-p2p-theme="light"] .tech-workday-calendar-panel .tech-workday-calendar-header h2 {
  color: #102838 !important;
}

[data-p2p-theme="light"] .tech-workday-selected-count span {
  color: var(--frost-action-strong) !important;
}

[data-p2p-theme="light"] .tech-workday-calendar-grid {
  border-color: rgba(67, 101, 119, 0.24) !important;
  background: rgba(246, 251, 253, 0.94) !important;
}

[data-p2p-theme="light"] :is(.tech-workday-corner, .tech-workday-column-heading, .tech-workday-tech-cell, .tech-workday-day-cell) {
  color: var(--frost-text-primary) !important;
  border-color: rgba(67, 101, 119, 0.22) !important;
  border-image: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(237, 247, 251, 0.8)),
    var(--frost-surface) !important;
}

[data-p2p-theme="light"] :is(.tech-workday-corner, .tech-workday-column-heading, .tech-workday-tech-cell) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(216, 238, 246, 0.9)),
    var(--frost-surface-tint) !important;
}

[data-p2p-theme="light"] :is(.tech-workday-column-heading span, .tech-workday-tech-cell small, .tech-workday-day-count, .tech-workday-empty-cell) {
  color: var(--frost-text-muted) !important;
}

[data-p2p-theme="light"] :is(.tech-workday-day-count, .tech-workday-empty-cell) {
  color: #34596b !important;
}

[data-p2p-theme="light"] .tech-workday-calendar-panel :is(.tech-workday-day-count, .tech-workday-empty-cell) {
  color: #34596b !important;
}

[data-p2p-theme="light"] .tech-workday-calendar-panel .tech-workday-day-count,
[data-p2p-theme="light"] .tech-workday-calendar-panel .tech-workday-empty-cell {
  color: #34596b !important;
  opacity: 1 !important;
}

[data-p2p-theme="light"] [data-tech-workday] .tech-workday-calendar-panel .tech-workday-day-count,
[data-p2p-theme="light"] [data-tech-workday] .tech-workday-calendar-panel .tech-workday-empty-cell {
  color: #34596b !important;
}

/* Routing header cells stand on their own: no dark header frame, and the
   technician/day labels share one centered alignment rule in both themes. */
.routing-board-header {
  margin-bottom: 6px;
  padding-bottom: 0;
  background: transparent;
}

.routing-tech-heading,
.routing-day-heading {
  display: grid;
  min-height: 54px;
  place-content: center;
  justify-items: center;
  text-align: center;
}

[data-p2p-theme="light"] .tech-workday-day-cell:hover,
[data-p2p-theme="light"] .tech-workday-day-cell:focus {
  color: var(--frost-text-primary) !important;
  background:
    linear-gradient(180deg, rgba(190, 244, 253, 0.5), rgba(233, 248, 252, 0.84)),
    var(--frost-selected-row) !important;
}

[data-p2p-theme="light"] .tech-workday-day-available {
  border-color: rgba(36, 145, 91, 0.72) !important;
  background:
    linear-gradient(180deg, rgba(84, 241, 166, 0.1), transparent 54%),
    var(--frost-surface) !important;
  box-shadow: inset 4px 0 0 rgba(36, 145, 91, 0.84) !important;
}

[data-p2p-theme="light"] .tech-workday-day-unavailable {
  border-color: rgba(190, 66, 85, 0.72) !important;
  background:
    linear-gradient(180deg, rgba(255, 92, 118, 0.09), transparent 54%),
    var(--frost-surface) !important;
  box-shadow: inset 4px 0 0 rgba(190, 66, 85, 0.84) !important;
}

[data-p2p-theme="light"] .tech-workday-day-selected {
  border-color: rgba(8, 151, 184, 0.74) !important;
  background:
    linear-gradient(180deg, rgba(190, 244, 253, 0.7), rgba(226, 248, 252, 0.82)),
    var(--frost-selected-row) !important;
  box-shadow: inset 0 0 0 2px rgba(8, 151, 184, 0.72), 0 8px 18px rgba(31, 58, 72, 0.11) !important;
}

[data-p2p-theme="light"] .tech-workday-day-selected.tech-workday-day-available {
  box-shadow: inset 4px 0 0 rgba(36, 145, 91, 0.92), inset 0 0 0 2px rgba(8, 151, 184, 0.72), 0 8px 18px rgba(31, 58, 72, 0.11) !important;
}

[data-p2p-theme="light"] .tech-workday-day-selected.tech-workday-day-unavailable {
  box-shadow: inset 4px 0 0 rgba(190, 66, 85, 0.92), inset 0 0 0 2px rgba(8, 151, 184, 0.72), 0 8px 18px rgba(31, 58, 72, 0.11) !important;
}

[data-p2p-theme="light"] :is(.routing-cell, .routing-tech-card, .routing-selected-stop) :is(.text-secondary, .routing-day-total, .routing-stop-number, .routing-stop-repair) {
  color: var(--frost-text-muted) !important;
  text-shadow: none;
}

[data-p2p-theme="light"] .routing-board-panel :is(.routing-tech-heading, .routing-day-heading, .routing-tech-card, .routing-cell) {
  color: var(--frost-text-primary) !important;
}

[data-p2p-theme="light"] .routing-board-panel :is(.routing-empty-cell, .routing-day-total, .routing-tech-card .text-secondary, .routing-day-heading .text-secondary) {
  color: var(--frost-text-muted) !important;
}

[data-p2p-theme="light"] .routing-board-panel .routing-stop-link {
  color: var(--frost-action-strong) !important;
}

/* Shared Leaflet chrome across Command Center, Dispatch, Routing, and Zones. */
[data-p2p-theme="light"] :is(.dispatch-map-panel, .command-map-panel, .routing-selected-map-panel, .dispatch-zone-map) :is(.leaflet-control-zoom, .leaflet-control-layers) {
  overflow: hidden;
  border: 1px solid rgba(67, 101, 119, 0.32) !important;
  border-radius: 7px;
  box-shadow: 0 8px 20px rgba(31, 58, 72, 0.16) !important;
}

[data-p2p-theme="light"] :is(.dispatch-map-panel, .command-map-panel, .routing-selected-map-panel, .dispatch-zone-map) :is(.leaflet-control-zoom a, .leaflet-control-layers, .leaflet-control-attribution) {
  color: var(--frost-text-primary) !important;
  border-color: rgba(67, 101, 119, 0.2) !important;
  background: rgba(253, 254, 255, 0.94) !important;
  text-shadow: none;
}

[data-p2p-theme="light"] :is(.dispatch-map-panel, .command-map-panel, .routing-selected-map-panel, .dispatch-zone-map) :is(.leaflet-control-zoom a:hover, .leaflet-control-zoom a:focus, .leaflet-control-layers-toggle:hover, .leaflet-control-layers-toggle:focus) {
  color: #042b37 !important;
  background: rgba(190, 244, 253, 0.9) !important;
}

[data-p2p-theme="light"] :is(.dispatch-map-panel, .command-map-panel, .routing-selected-map-panel, .dispatch-zone-map) :is(.leaflet-control-layers label, .leaflet-control-attribution, .leaflet-control-attribution a) {
  color: var(--frost-text-secondary) !important;
}

[data-p2p-theme="light"] :is(.dispatch-map-panel, .command-map-panel, .routing-selected-map-panel, .dispatch-zone-map) .leaflet-control-attribution a {
  color: var(--frost-action-strong) !important;
}

/* Frost status language is deliberately softer than Midnight while retaining meaning. */
[data-p2p-theme="light"] .order-status-pill {
  max-width: 100%;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid color-mix(in srgb, var(--status-pill-color) 42%, #64748b 18%);
  color: #142a35;
  line-height: 1.18;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  background: color-mix(in srgb, var(--status-pill-color) 34%, #ffffff 66%);
  box-shadow: none;
}

[data-p2p-theme="light"] :is(.about-path2point-details, .about-path2point-whats-new) {
  border-color: rgba(67, 101, 119, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(235, 245, 249, 0.76)),
    var(--frost-surface-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

[data-p2p-theme="light"] .product-beta-badge {
  border-color: rgba(161, 98, 7, 0.46);
  color: #854d0e;
  background: rgba(254, 243, 199, 0.76);
}

[data-p2p-theme="light"] .workspace-brand-company {
  color: var(--frost-text-primary);
}

[data-p2p-theme="light"] .workspace-brand-product {
  color: var(--frost-text-secondary);
}

[data-p2p-theme="light"] .about-path2point-beta-notice {
  border-color: rgba(161, 98, 7, 0.28);
  background: rgba(254, 243, 199, 0.7);
}

[data-p2p-theme="light"] .about-path2point-beta-notice h3 {
  color: #854d0e;
}

[data-p2p-theme="light"] .about-path2point-beta-notice p {
  color: var(--frost-text-secondary);
}

[data-p2p-theme="light"] :is(.about-path2point-details dt, .about-path2point-note, .about-path2point-whats-new li) {
  color: var(--frost-text-muted);
}

[data-p2p-theme="light"] :is(.about-path2point-details dd, .about-path2point-whats-new h3, .about-path2point-whats-new strong) {
  color: var(--frost-text-primary);
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] .product-beta-badge {
    border-color: rgba(161, 98, 7, 0.46);
    color: #854d0e;
    background: rgba(254, 243, 199, 0.76);
  }

  [data-p2p-theme="auto"] .workspace-brand-company {
    color: var(--frost-text-primary);
  }

  [data-p2p-theme="auto"] .workspace-brand-product {
    color: var(--frost-text-secondary);
  }

  [data-p2p-theme="auto"] .about-path2point-beta-notice {
    border-color: rgba(161, 98, 7, 0.28);
    background: rgba(254, 243, 199, 0.7);
  }

  [data-p2p-theme="auto"] .about-path2point-beta-notice h3 {
    color: #854d0e;
  }

  [data-p2p-theme="auto"] .about-path2point-beta-notice p {
    color: var(--frost-text-secondary);
  }
}

/* Technician Opportunity Preview and Frost card accents. */
.opportunity-preview-banner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  margin: 0 auto 1rem;
  max-width: 1983px;
  padding: 1rem 1.25rem;
  border: 1px solid color-mix(in srgb, var(--status-routing) 48%, var(--panel-border));
  border-radius: var(--panel-radius);
  background: color-mix(in srgb, var(--status-routing) 10%, var(--panel-background));
  box-shadow: var(--panel-shadow);
}

.opportunity-preview-context {
  grid-column: 1;
  text-align: left;
}

.opportunity-preview-kicker {
  margin: 0 0 0.15rem;
  color: var(--status-routing);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.opportunity-preview-name {
  grid-column: 2;
  margin: 0;
  color: var(--status-routing);
  font-size: clamp(2.2rem, 4vw, 2.7rem);
  font-weight: 850;
  line-height: 1.05;
}

.opportunity-preview-description,
.opportunity-preview-helper {
  margin: 0.35rem 0 0;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 700;
}

.opportunity-preview-helper {
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 650;
}

.opportunity-preview-selector {
  grid-column: 3;
  justify-self: end;
  min-width: min(100%, 260px);
}

@media (max-width: 992px) {
  .opportunity-preview-banner {
    grid-template-columns: 1fr;
  }

  .opportunity-preview-context,
  .opportunity-preview-name,
  .opportunity-preview-selector {
    grid-column: 1;
  }

  .opportunity-preview-name {
    text-align: center;
  }

  .opportunity-preview-selector {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    grid-column: auto;
    justify-self: auto;
    width: 260px;
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .opportunity-preview-selector {
    position: static;
    grid-column: 1;
    justify-self: center;
    width: min(100%, 360px);
  }
}

/* Restore semantic opportunity-card accents after Frost's generic link color rule. */
[data-p2p-theme="light"] .opportunity-card.opportunity-tone-amber {
  color: var(--status-unscheduled) !important;
  border-color: rgba(185, 139, 0, 0.52) !important;
  background: linear-gradient(180deg, rgba(255, 251, 226, 0.96), rgba(255, 255, 255, 0.94)) !important;
}

[data-p2p-theme="light"] .opportunity-card.opportunity-tone-green {
  color: var(--status-scheduled) !important;
  border-color: rgba(36, 170, 105, 0.5) !important;
  background: linear-gradient(180deg, rgba(238, 253, 245, 0.96), rgba(255, 255, 255, 0.94)) !important;
}

[data-p2p-theme="light"] .opportunity-card.opportunity-tone-blue {
  color: var(--status-routing) !important;
  border-color: rgba(37, 111, 221, 0.52) !important;
  background: linear-gradient(180deg, rgba(238, 246, 255, 0.96), rgba(255, 255, 255, 0.94)) !important;
}

[data-p2p-theme="light"] .opportunity-card.opportunity-tone-orange {
  color: var(--status-no-coverage) !important;
  border-color: rgba(200, 111, 0, 0.52) !important;
  background: linear-gradient(180deg, rgba(255, 246, 235, 0.96), rgba(255, 255, 255, 0.94)) !important;
}

[data-p2p-theme="light"] .opportunity-card :is(.opportunity-card-label, .opportunity-card-message) {
  color: var(--frost-text-primary) !important;
}

[data-p2p-theme="light"] .opportunity-card :is(.opportunity-card-hours, .opportunity-card-zero-state, .opportunity-card-unavailable, .opportunity-card small, .opportunity-card-estimate > span) {
  color: var(--frost-text-muted) !important;
}

[data-p2p-theme="light"] .opportunity-card-featured {
  box-shadow: 0 12px 26px rgba(37, 111, 221, 0.16) !important;
}

/* Leaflet popups are shared operational surfaces and follow the active theme. */
[data-p2p-theme="light"] .leaflet-container .leaflet-popup-content-wrapper,
[data-p2p-theme="light"] .leaflet-container .leaflet-popup-tip {
  color: var(--frost-text-primary) !important;
  border-color: var(--frost-line-strong) !important;
  background: var(--frost-surface) !important;
  box-shadow: 0 12px 26px rgba(31, 58, 72, 0.18) !important;
}

[data-p2p-theme="light"] .leaflet-container :is(.leaflet-popup-content, .leaflet-popup-close-button) {
  color: var(--frost-text-primary) !important;
}

[data-p2p-theme="light"] .leaflet-container .leaflet-popup-content a {
  color: var(--frost-action-strong) !important;
}

[data-p2p-theme="light"] .leaflet-container .leaflet-popup-close-button:is(:hover, :focus) {
  color: var(--frost-action-strong) !important;
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] .leaflet-container .leaflet-popup-content-wrapper,
  [data-p2p-theme="auto"] .leaflet-container .leaflet-popup-tip {
    color: var(--frost-text-primary) !important;
    border-color: var(--frost-line-strong) !important;
    background: var(--frost-surface) !important;
    box-shadow: 0 12px 26px rgba(31, 58, 72, 0.18) !important;
  }

  [data-p2p-theme="auto"] .leaflet-container :is(.leaflet-popup-content, .leaflet-popup-close-button) {
    color: var(--frost-text-primary) !important;
  }

  [data-p2p-theme="auto"] .leaflet-container .leaflet-popup-content a,
  [data-p2p-theme="auto"] .leaflet-container .leaflet-popup-close-button:is(:hover, :focus) {
    color: var(--frost-action-strong) !important;
  }
}

/* Frost date chips retain their semantic fills while using readable dark ink. */
[data-p2p-theme="light"] .blocked-date-chip {
  color: #7a1f32 !important;
}

[data-p2p-theme="light"] .blocked-date-chip button {
  color: #7a1f32 !important;
}

[data-p2p-theme="light"] .blocked-date-chip-success,
[data-p2p-theme="light"] .blocked-date-chip-success button {
  color: #075437 !important;
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] .blocked-date-chip,
  [data-p2p-theme="auto"] .blocked-date-chip button {
    color: #7a1f32 !important;
  }

  [data-p2p-theme="auto"] .blocked-date-chip-success,
  [data-p2p-theme="auto"] .blocked-date-chip-success button {
    color: #075437 !important;
  }
}

/* Frost uses the same readable Dispatch tab treatment for technician selection. */
[data-p2p-theme="light"] .self-scheduling-tech-card {
  color: var(--frost-action-strong) !important;
  border-color: rgba(8, 151, 184, 0.42) !important;
  background: rgba(248, 253, 254, 0.78) !important;
  box-shadow: none !important;
}

[data-p2p-theme="light"] .self-scheduling-tech-card:hover,
[data-p2p-theme="light"] .self-scheduling-tech-card:focus {
  color: #052c38 !important;
  border-color: rgba(8, 151, 184, 0.7) !important;
  background: rgba(190, 244, 253, 0.72) !important;
  box-shadow: 0 0 0 0.18rem rgba(8, 151, 184, 0.14) !important;
  transform: none;
}

[data-p2p-theme="light"] .self-scheduling-tech-card.active {
  color: #031f28 !important;
  border-color: rgba(8, 151, 184, 0.7) !important;
  background: linear-gradient(180deg, #77e7f4, #18c9df) !important;
  box-shadow: 0 8px 20px rgba(8, 151, 184, 0.18) !important;
}

[data-p2p-theme="light"] .self-scheduling-tech-card-summary {
  color: var(--frost-text-muted) !important;
}

[data-p2p-theme="light"] .self-scheduling-tech-card.active .self-scheduling-tech-card-summary {
  color: rgba(3, 31, 40, 0.76) !important;
}

[data-p2p-theme="light"] .self-scheduling-tech-card-count,
[data-p2p-theme="light"] .self-scheduling-tech-card.active .self-scheduling-tech-card-count {
  color: #031f28 !important;
  border-color: rgba(3, 31, 40, 0.28) !important;
  background: rgba(255, 255, 255, 0.76) !important;
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] .self-scheduling-tech-card {
    color: var(--frost-action-strong) !important;
    border-color: rgba(8, 151, 184, 0.42) !important;
    background: rgba(248, 253, 254, 0.78) !important;
    box-shadow: none !important;
  }

  [data-p2p-theme="auto"] .self-scheduling-tech-card:hover,
  [data-p2p-theme="auto"] .self-scheduling-tech-card:focus {
    color: #052c38 !important;
    border-color: rgba(8, 151, 184, 0.7) !important;
    background: rgba(190, 244, 253, 0.72) !important;
    box-shadow: 0 0 0 0.18rem rgba(8, 151, 184, 0.14) !important;
    transform: none;
  }

  [data-p2p-theme="auto"] .self-scheduling-tech-card.active {
    color: #031f28 !important;
    border-color: rgba(8, 151, 184, 0.7) !important;
    background: linear-gradient(180deg, #77e7f4, #18c9df) !important;
    box-shadow: 0 8px 20px rgba(8, 151, 184, 0.18) !important;
  }

  [data-p2p-theme="auto"] .self-scheduling-tech-card-summary {
    color: var(--frost-text-muted) !important;
  }

  [data-p2p-theme="auto"] .self-scheduling-tech-card.active .self-scheduling-tech-card-summary {
    color: rgba(3, 31, 40, 0.76) !important;
  }

  [data-p2p-theme="auto"] .self-scheduling-tech-card-count,
  [data-p2p-theme="auto"] .self-scheduling-tech-card.active .self-scheduling-tech-card-count {
    color: #031f28 !important;
    border-color: rgba(3, 31, 40, 0.28) !important;
    background: rgba(255, 255, 255, 0.76) !important;
  }
}

/* Tech Workday uses the same separated operational calendar language as
   Routing and the Weekly Zone Planner. The grid structure and navigation
   remain unchanged; these rules only make availability and selection easier
   to scan across a technician row. */
.tech-workday-calendar-scroll {
  padding: 6px;
  border: 1px solid rgba(118, 238, 255, 0.24);
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(148, 163, 174, 0.1), transparent 18%),
    rgba(6, 16, 22, 0.58);
  box-shadow: inset 0 0 0 1px rgba(5, 13, 18, 0.7);
}

.tech-workday-calendar-grid {
  gap: 6px;
  background: transparent;
}

.tech-workday-corner,
.tech-workday-column-heading,
.tech-workday-tech-cell,
.tech-workday-day-cell {
  border: 1px solid rgba(118, 238, 255, 0.32);
  border-radius: 8px;
  border-image: none;
}

.tech-workday-corner,
.tech-workday-column-heading {
  background:
    linear-gradient(180deg, rgba(148, 163, 174, 0.16), transparent 58%),
    rgba(17, 36, 46, 0.98);
  box-shadow:
    inset 0 -1px 0 rgba(118, 238, 255, 0.18),
    0 1px 0 rgba(0, 0, 0, 0.36);
}

.tech-workday-tech-cell {
  background:
    linear-gradient(180deg, rgba(148, 163, 174, 0.18), transparent 58%),
    rgba(17, 36, 46, 0.98);
  box-shadow:
    inset -1px 0 0 rgba(118, 238, 255, 0.2),
    0 0 0 1px rgba(5, 13, 18, 0.26);
}

.tech-workday-day-cell {
  background:
    linear-gradient(180deg, rgba(148, 163, 174, 0.12), transparent 54%),
    rgba(12, 30, 39, 0.8);
  box-shadow:
    inset 1px 0 0 rgba(255, 255, 255, 0.045),
    inset 0 0 0 1px rgba(5, 13, 18, 0.2);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.tech-workday-day-available {
  border-color: rgba(85, 240, 160, 1) !important;
  box-shadow: inset 0 0 0 3px rgba(85, 240, 160, 0.62), 0 0 24px rgba(85, 240, 160, 0.22) !important;
}

.tech-workday-day-unavailable {
  border-color: rgba(255, 92, 118, 1) !important;
  box-shadow: inset 0 0 0 3px rgba(255, 92, 118, 0.64), 0 0 24px rgba(255, 92, 118, 0.22) !important;
}

.tech-workday-day-selected,
.tech-workday-column-heading.tech-workday-day-selected {
  border-color: rgba(56, 189, 248, 0.96) !important;
  background:
    linear-gradient(180deg, rgba(125, 211, 252, 0.34), rgba(14, 165, 233, 0.14) 58%),
    rgba(8, 47, 73, 0.96);
  box-shadow:
    inset 0 0 0 3px rgba(40, 231, 255, 0.9),
    inset 0 0 24px rgba(40, 231, 255, 0.2),
    0 0 26px rgba(40, 231, 255, 0.38) !important;
}

[data-p2p-theme="light"] .tech-workday-calendar-scroll {
  border-color: rgba(67, 101, 119, 0.28);
  background: rgba(246, 251, 253, 0.94);
  box-shadow: inset 0 0 0 1px rgba(67, 101, 119, 0.08);
}

[data-p2p-theme="light"] :is(.tech-workday-corner, .tech-workday-column-heading, .tech-workday-tech-cell, .tech-workday-day-cell) {
  border-color: rgba(67, 101, 119, 0.26) !important;
  border-radius: 8px;
}

[data-p2p-theme="light"] .tech-workday-day-available {
  border-color: rgba(36, 145, 91, 0.9) !important;
  box-shadow: inset 0 0 0 3px rgba(36, 145, 91, 0.42), 0 5px 14px rgba(36, 145, 91, 0.12) !important;
}

[data-p2p-theme="light"] .tech-workday-day-unavailable {
  border-color: rgba(190, 66, 85, 0.9) !important;
  box-shadow: inset 0 0 0 3px rgba(190, 66, 85, 0.38), 0 5px 14px rgba(190, 66, 85, 0.1) !important;
}

[data-p2p-theme="light"] :is(.tech-workday-day-selected, .tech-workday-column-heading.tech-workday-day-selected) {
  border-color: rgba(8, 151, 184, 0.86) !important;
  background:
    linear-gradient(180deg, rgba(190, 244, 253, 0.82), rgba(226, 248, 252, 0.78)),
    var(--frost-selected-row) !important;
  box-shadow: inset 0 0 0 3px rgba(8, 151, 184, 0.72), 0 8px 18px rgba(31, 58, 72, 0.14) !important;
}

/* Keep actionable-backlog victory states legible after theme-specific card rules. */
.command-kpi-clear .command-kpi-icon,
.command-kpi-clear strong,
.command-kpi-clear span:not(.command-kpi-icon),
.command-kpi-clear small,
.command-alert-clear .command-alert-icon,
.command-alert-clear .command-alert-chevron,
.command-alert-clear .command-alert-copy strong,
.command-alert-clear .command-alert-copy small,
.dispatch-card-clear .dispatch-card-copy,
.dispatch-card-clear .dispatch-card-copy small,
.dispatch-card-clear strong,
.dispatch-card-clear .dispatch-card-arrow {
  color: var(--status-scheduled) !important;
}

[data-p2p-theme="light"] :is(
  .command-kpi-clear .command-kpi-icon,
  .command-kpi-clear strong,
  .command-kpi-clear span:not(.command-kpi-icon),
  .command-kpi-clear small,
  .command-alert-clear .command-alert-icon,
  .command-alert-clear .command-alert-chevron,
  .command-alert-clear .command-alert-copy strong,
  .command-alert-clear .command-alert-copy small,
  .dispatch-card-clear .dispatch-card-copy,
  .dispatch-card-clear .dispatch-card-copy small,
  .dispatch-card-clear strong,
  .dispatch-card-clear .dispatch-card-arrow
) {
  color: #075437 !important;
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] :is(
    .command-kpi-clear .command-kpi-icon,
    .command-kpi-clear strong,
    .command-kpi-clear span:not(.command-kpi-icon),
    .command-kpi-clear small,
    .command-alert-clear .command-alert-icon,
    .command-alert-clear .command-alert-chevron,
    .command-alert-clear .command-alert-copy strong,
    .command-alert-clear .command-alert-copy small,
    .dispatch-card-clear .dispatch-card-copy,
    .dispatch-card-clear .dispatch-card-copy small,
    .dispatch-card-clear strong,
    .dispatch-card-clear .dispatch-card-arrow
  ) {
    color: #075437 !important;
  }
}

/* Zone Planner uses the same quiet calendar language as Routing and Tech Workday. */
.zone-planner-week-table { border-spacing: 6px; }

.zone-planner-header-tech,
.zone-planner-day-heading,
.zone-planner-week-table .zone-planner-tech {
  border-color: rgba(118, 238, 255, 0.16);
  background: rgba(7, 24, 33, 0.96);
  box-shadow: none;
}

.zone-planner-day-today {
  border-color: rgba(56, 189, 248, 0.82);
  background:
    linear-gradient(180deg, rgba(14, 165, 233, 0.12), transparent 48%),
    rgba(8, 30, 42, 0.84);
  box-shadow: inset 3px 0 0 rgba(56, 189, 248, 0.78);
}

.zone-planner-week-table .zone-planner-cell {
  min-height: 172px;
  border-color: rgba(118, 238, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(148, 163, 184, 0.05), transparent 42%),
    rgba(7, 20, 28, 0.7);
  box-shadow: none;
}

.zone-planner-week-table .zone-planner-cell.routing-cell-available { border-color: rgba(84, 241, 166, 0.62) !important; box-shadow: inset 3px 0 0 rgba(84, 241, 166, 0.68) !important; }
.zone-planner-week-table .zone-planner-cell.routing-cell-unavailable { border-color: rgba(255, 92, 118, 0.68) !important; box-shadow: inset 3px 0 0 rgba(255, 92, 118, 0.7) !important; }
.zone-planner-week-table .zone-planner-cell.routing-cell-today { border-color: rgba(56, 189, 248, 0.82) !important; box-shadow: inset 3px 0 0 rgba(56, 189, 248, 0.78) !important; }

.zone-planner-cell-state,
.zone-planner-capacity,
.zone-planner-empty { color: var(--ops-muted); font-size: 0.74rem; }

.zone-planner-assignment {
  margin-top: 4px;
  padding: 4px 6px;
  border: 1px solid rgba(118, 238, 255, 0.14);
  border-radius: 6px;
  background: rgba(4, 14, 20, 0.5);
  font-size: 0.78rem;
}

[data-p2p-theme="light"] :is(.zone-planner-header-tech, .zone-planner-day-heading, .zone-planner-week-table .zone-planner-tech, .zone-planner-week-table .zone-planner-cell, .zone-planner-assignment) {
  color: var(--frost-text-primary) !important;
  border-color: rgba(67, 101, 119, 0.22) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(237, 247, 251, 0.8)),
    var(--frost-surface) !important;
  box-shadow: none !important;
}

[data-p2p-theme="light"] :is(.zone-planner-header-tech, .zone-planner-day-heading, .zone-planner-week-table .zone-planner-tech) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(216, 238, 246, 0.9)),
    var(--frost-surface-tint) !important;
}

[data-p2p-theme="light"] .zone-planner-day-today,
[data-p2p-theme="light"] .zone-planner-week-table .zone-planner-cell.routing-cell-today {
  border-color: rgba(8, 151, 184, 0.74) !important;
  background: linear-gradient(180deg, rgba(190, 244, 253, 0.58), rgba(233, 248, 252, 0.84)), var(--frost-selected-row) !important;
  box-shadow: inset 3px 0 0 rgba(8, 151, 184, 0.78) !important;
}

[data-p2p-theme="light"] .zone-planner-week-table .zone-planner-cell.routing-cell-available { border-color: rgba(36, 145, 91, 0.72) !important; box-shadow: inset 3px 0 0 rgba(36, 145, 91, 0.8) !important; }
[data-p2p-theme="light"] .zone-planner-week-table .zone-planner-cell.routing-cell-unavailable { border-color: rgba(190, 66, 85, 0.72) !important; box-shadow: inset 3px 0 0 rgba(190, 66, 85, 0.8) !important; }
[data-p2p-theme="light"] :is(.zone-planner-cell-state, .zone-planner-capacity, .zone-planner-empty) { color: var(--frost-text-muted) !important; }

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] :is(.zone-planner-header-tech, .zone-planner-day-heading, .zone-planner-week-table .zone-planner-tech, .zone-planner-week-table .zone-planner-cell, .zone-planner-assignment) {
    color: var(--frost-text-primary) !important;
    border-color: rgba(67, 101, 119, 0.22) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(237, 247, 251, 0.8)), var(--frost-surface) !important;
    box-shadow: none !important;
  }
  [data-p2p-theme="auto"] :is(.zone-planner-header-tech, .zone-planner-day-heading, .zone-planner-week-table .zone-planner-tech) { background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(216, 238, 246, 0.9)), var(--frost-surface-tint) !important; }
  [data-p2p-theme="auto"] .zone-planner-day-today,
  [data-p2p-theme="auto"] .zone-planner-week-table .zone-planner-cell.routing-cell-today { border-color: rgba(8, 151, 184, 0.74) !important; background: linear-gradient(180deg, rgba(190, 244, 253, 0.58), rgba(233, 248, 252, 0.84)), var(--frost-selected-row) !important; box-shadow: inset 3px 0 0 rgba(8, 151, 184, 0.78) !important; }
  [data-p2p-theme="auto"] .zone-planner-week-table .zone-planner-cell.routing-cell-available { border-color: rgba(36, 145, 91, 0.72) !important; box-shadow: inset 3px 0 0 rgba(36, 145, 91, 0.8) !important; }
  [data-p2p-theme="auto"] .zone-planner-week-table .zone-planner-cell.routing-cell-unavailable { border-color: rgba(190, 66, 85, 0.72) !important; box-shadow: inset 3px 0 0 rgba(190, 66, 85, 0.8) !important; }
  [data-p2p-theme="auto"] :is(.zone-planner-cell-state, .zone-planner-capacity, .zone-planner-empty) { color: var(--frost-text-muted) !important; }
}

/* Final Routing Board overrides: match Tech Workday's quieter calendar scan. */
.travel-tech-controls,
.travel-tech-week-controls,
.travel-tech-map-legend,
.travel-tech-metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.travel-tech-controls { justify-content: space-between; }
.travel-tech-controls .form-select { min-width: 250px; }
.travel-tech-week-label { min-width: 166px; text-align: center; font-weight: 800; }
.travel-tech-workspace { display: grid; grid-template-columns: minmax(0, 7fr) minmax(300px, 3fr); gap: 16px; align-items: start; }
.travel-tech-map-panel { min-height: calc(100dvh - 268px); }
.travel-tech-map { min-height: calc(100dvh - 350px); border: 1px solid var(--panel-border); border-radius: var(--panel-radius); }
.travel-tech-map-legend { justify-content: end; color: var(--text-secondary); font-size: .76rem; }
.travel-tech-map-legend span { display: inline-flex; align-items: center; gap: 5px; }
.travel-tech-dot { width: 9px; height: 9px; border: 2px solid var(--map-marker-outline); border-radius: 999px; }
.travel-tech-dot-unscheduled { background: var(--map-status-unscheduled); }
.travel-tech-dot-scheduled { background: var(--map-status-scheduled); }
.travel-tech-dot-routing { background: var(--map-status-routing); }
.travel-tech-rail { position: sticky; top: 12px; max-height: calc(100dvh - 172px); overflow-y: auto; }
.travel-tech-day-list { display: grid; gap: 7px; }
.travel-tech-day { border: 1px solid var(--panel-border); border-radius: 8px; background: color-mix(in srgb, var(--panel-background) 86%, transparent); overflow: hidden; }
.travel-tech-day summary { display: grid; grid-template-columns: 66px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 9px; cursor: pointer; list-style: none; }
.travel-tech-day summary::-webkit-details-marker { display: none; }
.travel-tech-day-date { display: grid; line-height: 1.1; }.travel-tech-day-date span { color: var(--text-secondary); font-size: .76rem; }
.travel-tech-day-summary { color: var(--text-secondary); font-size: .77rem; }.travel-tech-day-summary strong { color: var(--text-primary); }
.travel-tech-marker { padding: 2px 6px; border-radius: 999px; color: #251100; background: #f59e0b; font-size: .63rem; font-weight: 900; white-space: nowrap; }
.travel-tech-day-body { padding: 0 9px 9px; border-top: 1px solid var(--panel-border); }
.travel-tech-zone-line { padding: 7px 0 4px; color: var(--text-secondary); font-size: .75rem; }
.travel-tech-metrics { padding: 5px 0 7px; color: var(--text-secondary); font-size: .7rem; }
.travel-tech-order-row { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px solid color-mix(in srgb, var(--panel-border) 65%, transparent); color: var(--text-primary); text-decoration: none; }
.travel-tech-order-row > span:first-child { display: grid; min-width: 0; }.travel-tech-order-row small { color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.travel-tech-order-meta { display: grid; align-content: start; justify-items: end; color: var(--text-secondary); font-size: .73rem; white-space: nowrap; }
.travel-tech-order-row:hover, .travel-tech-order-row:focus, .travel-tech-order-row.is-map-hover { color: var(--text-primary); outline: none; background: color-mix(in srgb, var(--action-primary) 12%, transparent); box-shadow: inset 3px 0 0 var(--action-primary); }

@media (max-width: 991.98px) { .travel-tech-workspace { grid-template-columns: 1fr; }.travel-tech-map-panel, .travel-tech-map { min-height: 460px; }.travel-tech-rail { position: static; max-height: none; } }
@media (max-width: 575.98px) { .travel-tech-controls { align-items: stretch; }.travel-tech-controls .form-select { min-width: 0; }.travel-tech-week-controls { justify-content: space-between; }.travel-tech-week-label { width: 100%; order: -1; }.travel-tech-map-legend { justify-content: start; } }

.routing-board-panel {
  background:
    linear-gradient(180deg, rgba(40, 231, 255, 0.06), transparent 32%),
    rgba(3, 12, 17, 0.76);
}

.routing-board-scroll {
  border-color: rgba(118, 238, 255, 0.16);
  background: rgba(5, 18, 25, 0.7);
  box-shadow: inset 0 0 0 1px rgba(118, 238, 255, 0.05);
}

.routing-tech-heading,
.routing-day-heading,
.routing-tech-card,
.routing-cell {
  border-color: rgba(118, 238, 255, 0.16);
  border-radius: 8px;
  box-shadow: none;
}

.routing-tech-heading,
.routing-day-heading,
.routing-tech-card {
  background: rgba(7, 24, 33, 0.96);
}

.routing-tech-card,
.routing-cell {
  min-height: 96px;
}

.routing-cell {
  padding: 7px;
  background:
    linear-gradient(180deg, rgba(148, 163, 184, 0.05), transparent 42%),
    rgba(7, 20, 28, 0.7);
}

.routing-cell-available { border-color: rgba(84, 241, 166, 0.62); box-shadow: inset 3px 0 0 rgba(84, 241, 166, 0.68); }
.routing-cell-unavailable { border-color: rgba(255, 92, 118, 0.68); box-shadow: inset 3px 0 0 rgba(255, 92, 118, 0.7); }

.routing-cell-today {
  border-color: rgba(56, 189, 248, 0.82);
  background:
    linear-gradient(180deg, rgba(14, 165, 233, 0.12), transparent 48%),
    rgba(8, 30, 42, 0.84);
  box-shadow: inset 3px 0 0 rgba(56, 189, 248, 0.78);
}

.routing-cell-selected,
.routing-cell.routing-cell-selected.routing-cell-available,
.routing-cell.routing-cell-selected.routing-cell-unavailable {
  border-color: rgba(40, 231, 255, 0.9);
  background:
    linear-gradient(180deg, rgba(40, 231, 255, 0.14), rgba(40, 231, 255, 0.04)),
    rgba(8, 31, 42, 0.86);
  box-shadow: inset 0 0 0 2px rgba(40, 231, 255, 0.68);
}

.routing-cell-head { gap: 5px; margin-bottom: 5px; }
.routing-day-total { font-size: 0.72rem; font-weight: 800; }
.routing-status-chip { padding: 2px 6px; border-radius: 999px; font-size: 0.64rem; font-weight: 850; }
.routing-lifecycle-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border: 1px solid rgba(148, 163, 184, 0.58);
  border-radius: 999px;
  color: #d9e5ea;
  background: rgba(100, 116, 139, 0.22);
  font-size: 0.64rem;
  font-weight: 850;
}
.routing-lifecycle-success { color: #b8f7d2; border-color: rgba(84, 241, 166, 0.64); background: rgba(22, 112, 70, 0.34); }
.routing-lifecycle-neutral { color: #dce9ee; border-color: rgba(148, 163, 184, 0.62); background: rgba(71, 85, 105, 0.36); }
.routing-stop-list { gap: 4px; }

.routing-stop-card {
  padding: 4px 5px;
  border-color: rgba(118, 238, 255, 0.16);
  border-radius: 6px;
  color: var(--ops-text);
  background: rgba(4, 14, 20, 0.58);
  box-shadow: none;
}

.routing-stop-preferred { border-color: rgba(251, 191, 36, 0.58); box-shadow: inset 3px 0 0 rgba(251, 191, 36, 0.76); }
.routing-stop-card.routing-window-missing { border-color: rgba(255, 92, 118, 0.72); box-shadow: inset 3px 0 0 rgba(255, 92, 118, 0.78); }
.routing-stop-main { font-size: 0.74rem; font-weight: 800; }
.routing-stop-drag, .routing-stop-number, .routing-stop-repair, .routing-stop-location, .routing-empty-cell { color: var(--ops-muted); }
.routing-stop-link { color: #dff8ff; }

[data-p2p-theme="light"] .routing-board-panel,
[data-p2p-theme="light"] .routing-board-scroll,
[data-p2p-theme="light"] :is(.routing-tech-heading, .routing-day-heading, .routing-tech-card, .routing-cell),
[data-p2p-theme="light"] .routing-stop-card {
  color: var(--frost-text-primary) !important;
  border-color: rgba(67, 101, 119, 0.22) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(237, 247, 251, 0.8)),
    var(--frost-surface) !important;
  box-shadow: none !important;
}

[data-p2p-theme="light"] :is(.routing-tech-heading, .routing-day-heading, .routing-tech-card) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(216, 238, 246, 0.9)),
    var(--frost-surface-tint) !important;
}

[data-p2p-theme="light"] .routing-cell.routing-cell-available { border-color: rgba(36, 145, 91, 0.72) !important; box-shadow: inset 3px 0 0 rgba(36, 145, 91, 0.8) !important; }
[data-p2p-theme="light"] .routing-cell.routing-cell-unavailable { border-color: rgba(190, 66, 85, 0.72) !important; box-shadow: inset 3px 0 0 rgba(190, 66, 85, 0.8) !important; }
[data-p2p-theme="light"] .routing-cell.routing-cell-today { border-color: rgba(8, 151, 184, 0.74) !important; background: linear-gradient(180deg, rgba(190, 244, 253, 0.58), rgba(233, 248, 252, 0.84)), var(--frost-selected-row) !important; box-shadow: inset 3px 0 0 rgba(8, 151, 184, 0.78) !important; }
[data-p2p-theme="light"] :is(.routing-cell-selected, .routing-cell.routing-cell-selected.routing-cell-available, .routing-cell.routing-cell-selected.routing-cell-unavailable) { border-color: rgba(8, 151, 184, 0.82) !important; background: linear-gradient(180deg, rgba(190, 244, 253, 0.7), rgba(226, 248, 252, 0.82)), var(--frost-selected-row) !important; box-shadow: inset 0 0 0 2px rgba(8, 151, 184, 0.68) !important; }
[data-p2p-theme="light"] :is(.routing-stop-drag, .routing-stop-number, .routing-stop-repair, .routing-stop-location, .routing-empty-cell) { color: var(--frost-text-muted) !important; }
[data-p2p-theme="light"] .routing-stop-link { color: var(--frost-action-strong) !important; }
[data-p2p-theme="light"] .routing-lifecycle-neutral { color: #334d59; border-color: rgba(67, 101, 119, 0.54); background: #e4edf1; }
[data-p2p-theme="light"] .routing-lifecycle-success { color: #0f6038; border-color: rgba(27, 128, 77, 0.58); background: #d8f1e2; }

/* Selected Route keeps planning math beside the map without introducing a second workspace. */
.routing-selected-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.routing-selected-list-panel {
  min-width: 0;
  --routing-stop-grid-columns: 14px 34px minmax(92px, 1.05fr) 88px minmax(72px, 0.8fr) minmax(108px, 1.15fr) 44px minmax(108px, 1.15fr);
}

.routing-selected-map-panel {
  min-width: 0;
}

.routing-selected-column-headings,
.routing-selected-stop {
  display: grid;
  grid-template-columns: var(--routing-stop-grid-columns);
  column-gap: 8px;
  justify-items: center;
}

.routing-selected-column-headings {
  align-items: end;
  margin: 0 7px 4px;
  padding: 0 0 4px;
  border-bottom: 1px solid color-mix(in srgb, var(--ops-border) 72%, transparent);
  color: var(--ops-muted);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.routing-selected-stop {
  align-items: center;
  min-width: 0;
  line-height: 1.15;
}

.routing-selected-stop .routing-stop-repair,
.routing-plan-travel,
.routing-plan-arrival,
.routing-preference-empty {
  min-width: 0;
  font-size: 0.7rem;
  font-weight: 850;
  white-space: nowrap;
}

.routing-window-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-width: 0;
  gap: 1px;
}

.routing-window-cell .routing-selected-window-select { width: 100%; }
.routing-window-source {
  color: var(--ops-muted);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: uppercase;
}
.routing-window-recommended .routing-selected-window-select {
  border-color: rgba(40, 231, 255, 0.7);
  background: rgba(40, 231, 255, 0.12);
}
.routing-window-recommended .routing-window-source { color: #7debf8; }
[data-p2p-theme="light"] .routing-window-recommended .routing-selected-window-select {
  border-color: rgba(8, 151, 184, 0.68);
  background: #e4f8fc;
}
[data-p2p-theme="light"] .routing-window-recommended .routing-window-source { color: #176176; }

.routing-plan-travel { color: #9ec8d1; }
.routing-plan-arrival { color: var(--ops-text); }
.routing-preference-empty { color: var(--ops-muted); text-align: center; }
.routing-selected-stop .routing-stop-indicators { display: block; min-width: 0; justify-self: center; text-align: center; }
.routing-selected-stop .routing-pref-text,
.routing-selected-stop .routing-structured-pref { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.routing-selected-stop .routing-no-map-location,
.routing-selected-stop .routing-manual-map-location { grid-column: 3 / -1; justify-self: start; }

#address-verification-status.text-success {
  color: var(--ops-green) !important;
}

[data-p2p-theme="light"] #address-verification-status.text-success {
  color: #24915b !important;
}

[data-p2p-theme="light"] .dispatch-suggestion-nearby-stop-close {
  --nearby-stop-color: #24915b;
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] #address-verification-status.text-success {
    color: #24915b !important;
  }

  [data-p2p-theme="auto"] .dispatch-suggestion-nearby-stop-close {
    --nearby-stop-color: #24915b;
  }
}

[data-p2p-theme="light"] .routing-plan-travel { color: #466778; }
[data-p2p-theme="light"] .routing-plan-arrival { color: #163e4d; }
[data-p2p-theme="light"] .routing-preference-empty { color: #66808d; }

.global-note-recipients > div + div {
  border-top: 1px solid var(--ops-border);
  margin-top: 0.65rem;
  padding-top: 0.65rem;
}

.global-note-recipients label { margin-bottom: 0.35rem; }

.notes-history-table {
  table-layout: fixed;
}

.notes-history-date {
  width: 11rem;
}

.notes-history-from-to {
  width: 22rem;
}

.notes-history-table td {
  overflow-wrap: anywhere;
}

.communication-from-to .general-note-remove {
  float: right;
}

@media (max-width: 767.98px) {
  .notes-history-table,
  .notes-history-table tbody,
  .notes-history-table tr,
  .notes-history-table td {
    display: block;
    width: auto !important;
  }

  .notes-history-table colgroup,
  .notes-history-table thead {
    display: none;
  }

  .notes-history-table tr {
    padding: .75rem 0;
    border-bottom: 1px solid var(--ops-border);
  }

  .notes-history-table td {
    padding: .2rem 0;
    border: 0;
    white-space: normal !important;
  }

  .notes-history-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: .1rem;
    color: var(--text-secondary);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
  }

  .notes-history-table [data-communication-row-actions] {
    margin-top: .5rem;
  }

  .notes-history-table [data-communication-row-actions] a,
  .notes-history-table [data-communication-row-actions] button {
    padding: .15rem .5rem !important;
    border: 1px solid currentColor;
    border-radius: var(--panel-radius);
  }

  .communication-from-to .general-note-remove {
    float: none;
    margin-left: .5rem;
  }
}

@media (max-width: 1180px) and (min-width: 901px) {
  .routing-selected-grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); }
  .routing-selected-list-panel { --routing-stop-grid-columns: 13px 30px minmax(78px, 0.9fr) 84px minmax(64px, 0.8fr) minmax(96px, 1.1fr) 40px minmax(92px, 1.1fr); }
  .routing-selected-column-headings,
  .routing-selected-stop { column-gap: 6px; }
}

@media (max-width: 900px) {
  .routing-selected-grid { grid-template-columns: minmax(0, 1fr); }
  .routing-selected-list-panel { min-height: 0; }
}

@media (max-width: 640px) {
  .routing-selected-column-headings { display: none; }
  .routing-selected-list-panel { --routing-stop-grid-columns: 13px 28px minmax(76px, 1fr) 88px; }
  .routing-selected-stop {
    justify-items: start;
    row-gap: 5px;
  }
  .routing-plan-travel { grid-column: 1 / span 2; }
  .routing-plan-arrival { grid-column: 3; }
  .routing-selected-stop .routing-stop-repair { grid-column: 4; }
  .routing-selected-stop .routing-stop-indicators { grid-column: 3 / -1; justify-self: start; text-align: start; }
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] .routing-board-panel,
  [data-p2p-theme="auto"] .routing-board-scroll,
  [data-p2p-theme="auto"] :is(.routing-tech-heading, .routing-day-heading, .routing-tech-card, .routing-cell),
  [data-p2p-theme="auto"] .routing-stop-card {
    color: var(--frost-text-primary) !important;
    border-color: rgba(67, 101, 119, 0.22) !important;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(237, 247, 251, 0.8)),
      var(--frost-surface) !important;
    box-shadow: none !important;
  }

  [data-p2p-theme="auto"] :is(.routing-tech-heading, .routing-day-heading, .routing-tech-card) { background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(216, 238, 246, 0.9)), var(--frost-surface-tint) !important; }
  [data-p2p-theme="auto"] .routing-cell.routing-cell-available { border-color: rgba(36, 145, 91, 0.72) !important; box-shadow: inset 3px 0 0 rgba(36, 145, 91, 0.8) !important; }
  [data-p2p-theme="auto"] .routing-cell.routing-cell-unavailable { border-color: rgba(190, 66, 85, 0.72) !important; box-shadow: inset 3px 0 0 rgba(190, 66, 85, 0.8) !important; }
  [data-p2p-theme="auto"] .routing-cell.routing-cell-today { border-color: rgba(8, 151, 184, 0.74) !important; background: linear-gradient(180deg, rgba(190, 244, 253, 0.58), rgba(233, 248, 252, 0.84)), var(--frost-selected-row) !important; box-shadow: inset 3px 0 0 rgba(8, 151, 184, 0.78) !important; }
  [data-p2p-theme="auto"] :is(.routing-cell-selected, .routing-cell.routing-cell-selected.routing-cell-available, .routing-cell.routing-cell-selected.routing-cell-unavailable) { border-color: rgba(8, 151, 184, 0.82) !important; background: linear-gradient(180deg, rgba(190, 244, 253, 0.7), rgba(226, 248, 252, 0.82)), var(--frost-selected-row) !important; box-shadow: inset 0 0 0 2px rgba(8, 151, 184, 0.68) !important; }
  [data-p2p-theme="auto"] :is(.routing-stop-drag, .routing-stop-number, .routing-stop-repair, .routing-stop-location, .routing-empty-cell) { color: var(--frost-text-muted) !important; }
  [data-p2p-theme="auto"] .routing-stop-link { color: var(--frost-action-strong) !important; }
}

/* Scheduling customer preferences are operational constraints, not neutral notes. */
.scheduling-customer-preference :is(.form-label, .form-control, .form-select),
.scheduling-customer-preference-pill {
  color: #ffd76b !important;
  font-weight: 850;
}

.scheduling-customer-preference :is(.form-control, .form-select),
.scheduling-customer-preference-pill {
  border-color: rgba(251, 191, 36, 0.72) !important;
}

[data-p2p-theme="light"] .scheduling-customer-preference :is(.form-label, .form-control, .form-select),
[data-p2p-theme="light"] .scheduling-customer-preference-pill {
  color: #6e4b00 !important;
}

[data-p2p-theme="light"] .scheduling-customer-preference :is(.form-control, .form-select),
[data-p2p-theme="light"] .scheduling-customer-preference-pill {
  border-color: rgba(185, 120, 9, 0.72) !important;
}

/* Keep the preference cue clear in Frost without the dense generic warning fill. */
[data-p2p-theme="light"] .scheduling-customer-preference-pill {
  align-self: start;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #6e4b00 !important;
  background: linear-gradient(90deg, rgba(255, 241, 199, 0.92), rgba(255, 251, 239, 0.96)) !important;
  background-color: #fff8e8 !important;
  box-shadow: inset 3px 0 0 #c48614 !important;
}

/* Reopening a confirmed route is an attention action in Frost, not a low-contrast outline. */
[data-p2p-theme="light"] [data-selected-route-action="reopen_route"] {
  color: #171717 !important;
  border-color: #b87900 !important;
  background: #f3c438 !important;
  font-weight: 800;
}

[data-p2p-theme="light"] [data-selected-route-action="reopen_route"]:hover,
[data-p2p-theme="light"] [data-selected-route-action="reopen_route"]:focus {
  color: #171717 !important;
  border-color: #8f5c00 !important;
  background: #e4ad16 !important;
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] .scheduling-customer-preference :is(.form-label, .form-control, .form-select),
  [data-p2p-theme="auto"] .scheduling-customer-preference-pill {
    color: #6e4b00 !important;
  }

  [data-p2p-theme="auto"] .scheduling-customer-preference :is(.form-control, .form-select),
  [data-p2p-theme="auto"] .scheduling-customer-preference-pill {
    border-color: rgba(185, 120, 9, 0.72) !important;
  }
}

/* Apply the shared Midnight tone layer after all legacy desktop component rules. */
[data-p2p-theme="dark"] :is(.semantic-pill, .capacity-status-badge, .dispatch-capacity-badge, .routing-status-chip, .routing-unsaved-badge, .tech-workday-route-pill, .tech-workday-preference-pill, .tech-workday-window-pill, .launch-readiness-pill, .contact-chip-success, .contact-chip-warning, .contact-chip-danger, .vip-priority-badge) {
  color: color-mix(in srgb, var(--semantic-pill-color, var(--capacity-status-color, var(--status-pill-color, var(--status-routing)))) 75%, var(--ops-bg)) !important;
  border-color: color-mix(in srgb, var(--semantic-pill-color, var(--capacity-status-color, var(--status-pill-color, var(--status-routing)))) 32%, var(--panel-border)) !important;
  background: var(--midnight-surface-subtle) !important;
  box-shadow: none !important;
}

[data-p2p-theme="dark"] .routing-status-success,
[data-p2p-theme="dark"] .tech-workday-route-success,
[data-p2p-theme="dark"] .launch-readiness-pill-ready { color: var(--midnight-tone-green) !important; border-color: color-mix(in srgb, var(--midnight-tone-green) 40%, var(--panel-border)) !important; background: var(--midnight-surface-subtle) !important; }
[data-p2p-theme="dark"] .launch-readiness-pill-operator-verified { color: var(--midnight-tone-cyan) !important; border-color: color-mix(in srgb, var(--midnight-tone-cyan) 40%, var(--panel-border)) !important; background: var(--midnight-surface-subtle) !important; }
[data-p2p-theme="dark"] .routing-status-warning,
[data-p2p-theme="dark"] .tech-workday-route-warning,
[data-p2p-theme="dark"] .launch-readiness-pill-needs-attention { color: var(--midnight-tone-amber) !important; border-color: color-mix(in srgb, var(--midnight-tone-amber) 40%, var(--panel-border)) !important; background: var(--midnight-surface-subtle) !important; }
[data-p2p-theme="dark"] .routing-status-danger,
[data-p2p-theme="dark"] .launch-readiness-pill-not-started { color: var(--midnight-tone-red) !important; border-color: color-mix(in srgb, var(--midnight-tone-red) 40%, var(--panel-border)) !important; background: var(--midnight-surface-subtle) !important; }
[data-p2p-theme="dark"] :is(.routing-status-routing, .tech-workday-route-routing) { color: var(--midnight-tone-blue) !important; border-color: color-mix(in srgb, var(--midnight-tone-blue) 40%, var(--panel-border)) !important; background: var(--midnight-surface-subtle) !important; }

/* Command Center headings and map markers remain cyan/status-led, without glow. */
[data-p2p-theme="dark"] :is(.command-panel-header h2, .command-panel-header a, .command-panel-link, .command-map-footer a) { color: var(--midnight-heading-cyan); }
[data-p2p-theme="dark"] :is(.command-map-legend .command-dot, .command-util-ring) { filter: saturate(0.78) brightness(0.8); }
[data-p2p-theme="dark"] .command-kpi-clear .command-kpi-icon,
[data-p2p-theme="dark"] .command-kpi-clear strong,
[data-p2p-theme="dark"] .command-kpi-clear span:not(.command-kpi-icon),
[data-p2p-theme="dark"] .command-kpi-clear small,
[data-p2p-theme="dark"] .command-alert-clear .command-alert-icon,
[data-p2p-theme="dark"] .command-alert-clear .command-alert-chevron,
[data-p2p-theme="dark"] .command-alert-clear .command-alert-copy strong,
[data-p2p-theme="dark"] .command-alert-clear .command-alert-copy small { color: var(--midnight-tone-green) !important; }

/* KPI dashboard cards and attention rows use the same neutral Midnight surface. */
[data-p2p-theme="dark"] :is(.kpi-management-card, .kpi-attention-card) {
  border-color: var(--midnight-accent-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 58%), var(--midnight-surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 16px 32px rgba(0, 0, 0, 0.2);
}
[data-p2p-theme="dark"] :is(.kpi-management-card::before, .kpi-management-card::after, .kpi-attention-card::after) { box-shadow: none; opacity: 0.42; }
[data-p2p-theme="dark"] .kpi-attention-card:hover,
[data-p2p-theme="dark"] .kpi-attention-card:focus { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 36px rgba(0, 0, 0, 0.24); }
[data-p2p-theme="dark"] .kpi-status-code-new .kpi-status-dot { color: var(--midnight-tone-blue); background: var(--midnight-tone-blue); }
[data-p2p-theme="dark"] .kpi-status-code-assigned .kpi-status-dot { color: var(--midnight-tone-cyan); background: var(--midnight-tone-cyan); }
[data-p2p-theme="dark"] .kpi-status-code-unscheduled .kpi-status-dot { color: var(--midnight-tone-amber); background: var(--midnight-tone-amber); }
[data-p2p-theme="dark"] .kpi-status-code-scheduled .kpi-status-dot { color: var(--midnight-tone-green); background: var(--midnight-tone-green); }
[data-p2p-theme="dark"] .kpi-status-code-routed .kpi-status-dot,
[data-p2p-theme="dark"] .kpi-status-code-qa_review .kpi-status-dot { color: var(--midnight-tone-violet); background: var(--midnight-tone-violet); }
[data-p2p-theme="dark"] .kpi-status-code-pending_report .kpi-status-dot { color: var(--midnight-tone-orange); background: var(--midnight-tone-orange); }

/* Scheduling options keep capacity truth as a left accent and text, not a wash. */
[data-p2p-theme="dark"] .dispatch-suggestion-box-empty {
  border-color: color-mix(in srgb, var(--midnight-tone-red) 42%, var(--panel-border));
  background: var(--midnight-surface-subtle);
  box-shadow: inset 3px 0 0 var(--midnight-tone-red);
}
[data-p2p-theme="dark"] :is(.dispatch-suggestion-card, .dispatch-suggestion-card-success, .dispatch-suggestion-card-warning, .dispatch-suggestion-card-danger, .dispatch-suggestion-card-travel-tech) {
  background: var(--midnight-surface) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}
[data-p2p-theme="dark"] .dispatch-suggestion-card-success { border-left-color: var(--midnight-tone-green); }
[data-p2p-theme="dark"] :is(.dispatch-suggestion-card-warning, .dispatch-suggestion-card-travel-tech) { border-left-color: var(--midnight-tone-amber); }
[data-p2p-theme="dark"] .dispatch-suggestion-card-danger { border-left-color: var(--midnight-tone-red); }
[data-p2p-theme="dark"] .dispatch-suggestion-nearby-stop-close { --nearby-stop-color: var(--midnight-tone-green); }
[data-p2p-theme="dark"] .dispatch-suggestion-nearby-stop-extended { --nearby-stop-color: var(--midnight-tone-amber); }

/* Dispatch calendars retain only colored edge, current-day, and selected-state signals. */
[data-p2p-theme="dark"] :is(.routing-cell, .zone-planner-week-table .zone-planner-cell, .tech-workday-day-cell) { background: var(--midnight-surface-raised) !important; box-shadow: none !important; }
[data-p2p-theme="dark"] :is(.routing-cell-available, .zone-planner-week-table .zone-planner-cell.routing-cell-available, .tech-workday-day-available) { border-color: color-mix(in srgb, var(--midnight-tone-green) 52%, var(--panel-border)) !important; box-shadow: inset 3px 0 0 var(--midnight-tone-green) !important; }
[data-p2p-theme="dark"] :is(.routing-cell-unavailable, .zone-planner-week-table .zone-planner-cell.routing-cell-unavailable, .tech-workday-day-unavailable) { border-color: color-mix(in srgb, var(--midnight-tone-red) 52%, var(--panel-border)) !important; box-shadow: inset 3px 0 0 var(--midnight-tone-red) !important; }
[data-p2p-theme="dark"] :is(.routing-cell-today, .zone-planner-day-today, .zone-planner-week-table .zone-planner-cell.routing-cell-today, .tech-workday-day-today) { border-color: color-mix(in srgb, var(--midnight-heading-cyan) 58%, var(--panel-border)) !important; background: var(--midnight-surface-raised) !important; box-shadow: inset 3px 0 0 var(--midnight-heading-cyan) !important; }
[data-p2p-theme="dark"] :is(.routing-cell-selected, .tech-workday-day-selected, .tech-workday-column-heading.tech-workday-day-selected) { border-color: color-mix(in srgb, var(--midnight-heading-cyan) 66%, var(--panel-border-strong)) !important; background: var(--midnight-surface-raised) !important; box-shadow: inset 0 0 0 2px var(--midnight-heading-cyan) !important; }
[data-p2p-theme="dark"] :is(.tech-workday-sidebar, .tech-workday-calendar-panel, .tech-workday-map-panel) { background: var(--midnight-surface) !important; }
[data-p2p-theme="dark"] :is(.tech-workday-calendar-header, .tech-workday-empty-workspace) { border-color: color-mix(in srgb, var(--midnight-heading-cyan) 48%, var(--panel-border)) !important; background: var(--midnight-surface-raised) !important; box-shadow: inset 2px 0 0 var(--midnight-heading-cyan) !important; }

/* Workday is an information surface in Frost. Keep these scoped overrides
   after the legacy Midnight-first calendar rules so day and stop cards cannot
   inherit dark fills while preserving the existing semantic state borders. */
[data-p2p-theme="light"] [data-tech-workday] :is(
  .tech-workday-calendar-panel,
  .tech-workday-calendar-scroll,
  .tech-workday-corner,
  .tech-workday-column-heading,
  .tech-workday-tech-cell,
  .tech-workday-day-cell
) {
  color: var(--frost-text-primary) !important;
  background-color: var(--surface-secondary) !important;
}

[data-p2p-theme="light"] [data-tech-workday] .tech-workday-stop-row {
  color: var(--frost-text-primary) !important;
  border-color: rgba(67, 101, 119, 0.22) !important;
  background: #ffffff !important;
}

[data-p2p-theme="light"] [data-tech-workday] .tech-workday-stop-row :is(strong, .tech-workday-so-number) {
  color: var(--frost-text-primary) !important;
}

[data-p2p-theme="light"] [data-tech-workday] :is(.tech-workday-day-cell:hover, .tech-workday-day-cell:focus, .tech-workday-stop-row:hover, .tech-workday-stop-row:focus) {
  color: var(--frost-text-primary) !important;
  background-color: var(--calendar-current) !important;
}

/* Accounting, import, company readiness, and Service Order desktop metadata. */
[data-p2p-theme="dark"] :is(.accounting-ledger-type-pill, .accounting-ledger-status) { color: var(--midnight-tone-blue); border: 1px solid color-mix(in srgb, var(--midnight-tone-blue) 38%, var(--panel-border)); background: var(--midnight-surface-subtle); }
[data-p2p-theme="dark"] .accounting-ledger-status-finalized { color: var(--midnight-tone-green); border-color: color-mix(in srgb, var(--midnight-tone-green) 38%, var(--panel-border)); }
[data-p2p-theme="dark"] :is(.accounting-ledger-status-pending, .accounting-ledger-status-error) { color: var(--midnight-tone-amber); border-color: color-mix(in srgb, var(--midnight-tone-amber) 38%, var(--panel-border)); }
[data-p2p-theme="dark"] :is(.accounting-ledger-status-void, .accounting-ledger-status-reversed) { color: var(--midnight-tone-red); border-color: color-mix(in srgb, var(--midnight-tone-red) 38%, var(--panel-border)); }
[data-p2p-theme="dark"] .accounting-ledger-status-exported { color: var(--midnight-tone-violet); border-color: color-mix(in srgb, var(--midnight-tone-violet) 38%, var(--panel-border)); }
[data-p2p-theme="dark"] :is(.import-preview-status-warnings, .import-preview-status-ready) { background: var(--midnight-surface-subtle); box-shadow: none; }
[data-p2p-theme="dark"] .vip-priority-badge { color: var(--midnight-tone-violet) !important; }
[data-p2p-theme="dark"] .service-order-accounting-attention { box-shadow: inset 3px 0 0 var(--midnight-tone-red), 0 16px 32px rgba(0, 0, 0, 0.18) !important; }

/* Final Dispatch Dashboard corrections after legacy local rules. */
[data-p2p-theme="dark"] .dispatch-dashboard-tabs .active { color: #04191e; border-color: color-mix(in srgb, #67e8f9 72%, var(--ops-bg)); background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 48%), linear-gradient(180deg, color-mix(in srgb, #75f0ff 72%, var(--ops-bg)), color-mix(in srgb, #1fd3ee 75%, var(--ops-bg))); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(2, 16, 20, 0.26), 0 5px 12px rgba(0, 0, 0, 0.18); }
[data-p2p-theme="dark"] .dispatch-workflow-card { border-color: color-mix(in srgb, currentColor 28%, var(--panel-border)); background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 58%), var(--midnight-surface); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 16px 32px rgba(0, 0, 0, 0.2); }
[data-p2p-theme="dark"] .dispatch-workflow-card:hover,
[data-p2p-theme="dark"] .dispatch-workflow-card:focus { border-color: color-mix(in srgb, currentColor 38%, var(--panel-border-strong)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 36px rgba(0, 0, 0, 0.24); }
[data-p2p-theme="dark"] .dispatch-card-tone-green { color: var(--midnight-tone-green); }
[data-p2p-theme="dark"] :is(.dispatch-card-tone-amber, .dispatch-card-tone-yellow) { color: var(--midnight-tone-amber); }
[data-p2p-theme="dark"] :is(.dispatch-card-tone-blue, .dispatch-card-tone-primary) { color: var(--midnight-tone-blue); }
[data-p2p-theme="dark"] :is(.dispatch-card-tone-red, .dispatch-card-tone-danger) { color: var(--midnight-tone-red); }
[data-p2p-theme="dark"] .dispatch-card-tone-orange { color: var(--midnight-tone-orange); }
[data-p2p-theme="dark"] :is(.dispatch-card-tone-violet, .dispatch-card-tone-warning) { color: var(--midnight-tone-violet); }
[data-p2p-theme="dark"] :is(.dispatch-card-tone-cyan, .dispatch-card-tone-success) { color: var(--midnight-tone-cyan); }
[data-p2p-theme="dark"] .dispatch-card-clear strong { color: var(--midnight-tone-green) !important; }
[data-p2p-theme="dark"] .dispatch-availability-badge.active { color: var(--midnight-tone-green) !important; border-color: color-mix(in srgb, var(--midnight-tone-green) 44%, var(--panel-border)) !important; background: color-mix(in srgb, var(--midnight-tone-green) 14%, var(--midnight-surface)) !important; }
[data-p2p-theme="dark"] .dispatch-availability-badge.overnight { color: var(--midnight-tone-blue) !important; border-color: color-mix(in srgb, var(--midnight-tone-blue) 44%, var(--panel-border)) !important; background: color-mix(in srgb, var(--midnight-tone-blue) 14%, var(--midnight-surface)) !important; }

/* Frost mirrors the accepted Midnight card hierarchy: state lives in the
   foreground and border treatment, while shared dashboard cards remain one
   neutral operational surface. */
[data-p2p-theme="light"] :is(.command-kpi, .kpi-management-card, .kpi-attention-card, .dispatch-exception-card, .dispatch-workflow-card) {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 250, 252, 0.82)), var(--frost-surface) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 12px 30px rgba(31, 58, 72, 0.1) !important;
}
[data-p2p-theme="light"] .command-kpi::before { display: none; }
[data-p2p-theme="light"] :is(.command-kpi, .kpi-management-card, .kpi-attention-card, .dispatch-exception-card, .dispatch-workflow-card):hover,
[data-p2p-theme="light"] :is(.command-kpi, .kpi-management-card, .kpi-attention-card, .dispatch-exception-card, .dispatch-workflow-card):focus {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 16px 34px rgba(31, 58, 72, 0.14) !important;
}

/* Ordinary structural surfaces. Keep semantic/map mixing bases unchanged. */
:root {
  --surface-primary: #090b0d;
  --surface-secondary: #111417;
  --surface-border: #30383d;
  --surface-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

[data-p2p-theme="light"] {
  --surface-primary: #fafcfd;
  --surface-secondary: #f3f6f8;
  --surface-border: #d4dfe4;
  --surface-shadow: 0 2px 6px rgba(31, 58, 72, 0.035);
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] {
    --surface-primary: #fafcfd;
    --surface-secondary: #f3f6f8;
    --surface-border: #d4dfe4;
    --surface-shadow: 0 2px 6px rgba(31, 58, 72, 0.035);
  }
}

/* Existing shared panel families, excluding account entry, Mobile, and maps.
   KPI/status cards and active/selected borders retain their dedicated rules. */
body:not([data-account-entry]):not(.technician-mobile-shell) :is(
  .panel-standard,
  form.border,
  section > .border,
  aside > .border,
  .col-12 > .border,
  .col-md-4 > .border,
  .table-responsive,
  .modal-content,
  .media-card,
  .media-preview-item,
  .history-report-preview,
  .preferences-panel,
  .dashboard-panel,
  .kpi-filter-panel,
  .kpi-status-panel,
  .kpi-outcome-panel,
  .kpi-attention-panel,
  .command-panel,
  .order-list-tools,
  .export-control-panel,
  .export-preview-panel,
  .export-side-panel,
  .company-admin-card,
  .company-admin-context,
  .company-picker-section,
  .platform-company-form,
  .platform-section,
  .platform-side-panel,
  .platform-table-wrap,
  .accounting-work-queue,
  .accounting-queue-main,
  .accounting-summary-panel,
  .command-attention-panel,
  .command-coverage-panel
):not(.command-map-panel):not(.dispatch-dashboard-map-panel):not(.leaflet-container *) {
  background: var(--surface-primary) !important;
  box-shadow: var(--surface-shadow) !important;
  backdrop-filter: none;
}

body:not([data-account-entry]):not(.technician-mobile-shell) :is(
  .panel-standard,
  form.border,
  section > .border,
  aside > .border,
  .col-12 > .border,
  .col-md-4 > .border,
  .table-responsive,
  .modal-content,
  .media-card,
  .media-preview-item,
  .history-report-preview,
  .preferences-panel,
  .dashboard-panel,
  .kpi-filter-panel,
  .kpi-status-panel,
  .kpi-outcome-panel,
  .kpi-attention-panel,
  .command-panel,
  .order-list-tools,
  .export-control-panel,
  .export-preview-panel,
  .export-side-panel,
  .company-admin-card,
  .company-admin-context,
  .company-picker-section,
  .platform-company-form,
  .platform-section,
  .platform-side-panel,
  .platform-table-wrap,
  .accounting-work-queue,
  .accounting-queue-main,
  .accounting-summary-panel,
  .command-attention-panel,
  .command-coverage-panel
):not(.command-map-panel):not(.dispatch-dashboard-map-panel):not(.leaflet-container *):not(a:hover):not(button:hover):not(:focus-within):not(.active):not(.selected):not([aria-selected="true"]):not(.border-danger, .border-warning, .border-success, .border-info, .border-primary) {
  border-color: var(--surface-border) !important;
}

/* Secondary containment uses one additional neutral step, not another gradient. */
body:not([data-account-entry]):not(.technician-mobile-shell) :is(
  .modal-header,
  .modal-footer,
  .table > thead,
  .table > thead > tr > th,
  .preferences-radio-option,
  .panel-standard > .table-responsive,
  .dashboard-panel > .table-responsive,
  .preferences-panel > .border
):not(.leaflet-container *) {
  background: var(--surface-secondary) !important;
  box-shadow: none !important;
}

body:not([data-account-entry]):not(.technician-mobile-shell) :is(.modal-header, .modal-footer, .preferences-radio-option):not(:hover):not(:focus-within):not(:has(:checked)) {
  border-color: var(--surface-border) !important;
}

/* Shared KPI/workflow fills are neutral; meaning stays in their accents.
   Accounting nested fallback containers are handled without template changes. */
body:not([data-account-entry]):not(.technician-mobile-shell) :is(
  .command-kpi,
  .kpi-management-card,
  .kpi-attention-card,
  .dispatch-exception-card,
  .dispatch-workflow-card,
  .import-stat,
  .accounting-kpi-card,
  .accounting-queue-kpi,
  .accounting-queue-filter,
  #accountingTabContent > .tab-pane
) {
  background: var(--surface-primary) !important;
  box-shadow: var(--surface-shadow) !important;
  backdrop-filter: none;
}

body:not([data-account-entry]):not(.technician-mobile-shell) :is(
  .accounting-summary-grid > div,
  .accounting-queue-note,
  #accountingTabContent > .tab-pane > .border
) {
  background: var(--surface-secondary) !important;
  box-shadow: none !important;
  backdrop-filter: none;
}

body:not([data-account-entry]):not(.technician-mobile-shell) :is(.import-stat, .command-kpi)::before {
  background-image: none;
}

/* Dedicated Client Portal: a deliberately quieter shell and safe read-only presentation. */
.client-portal-header { position: sticky; top: 0; z-index: 1020; border-bottom: 1px solid var(--surface-border); background: var(--surface-primary); }
.client-portal-header-inner { min-height: 72px; display: grid; grid-template-columns: minmax(210px, 1fr) auto minmax(150px, 1fr); align-items: center; gap: 24px; max-width: 1440px; margin: 0 auto; padding: 8px 28px; }
.client-portal-brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; color: var(--text-primary); text-decoration: none; }
.client-portal-brand > span:last-child { display: grid; min-width: 0; }
.client-portal-brand strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; }
.client-portal-brand small { color: var(--text-secondary); font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; }
.client-portal-logo-plate { display: grid; place-items: center; width: 112px; height: 52px; padding: 5px 8px; border-radius: 6px; background: #d9dde0; }
.client-portal-logo-plate img { width: 100%; height: 100%; object-fit: contain; }
.client-portal-nav { display: flex; align-items: stretch; gap: 8px; align-self: stretch; }
.client-portal-nav a { display: grid; place-items: center; position: relative; padding: 0 15px; color: var(--text-secondary); text-decoration: none; font-weight: 750; font-size: .9rem; }
.client-portal-nav a:hover, .client-portal-nav a:focus-visible, .client-portal-nav a[aria-current="page"] { color: var(--text-primary); }
.client-portal-nav a[aria-current="page"]::after { content: ""; position: absolute; right: 12px; bottom: -8px; left: 12px; height: 3px; border-radius: 3px 3px 0 0; background: var(--action-primary); }
.client-portal-nav .client-portal-new-link { align-self: center; min-height: 38px; border: 1px solid color-mix(in srgb, var(--action-primary) 55%, var(--surface-border)); border-radius: 7px; color: var(--action-primary); }
.client-portal-nav .client-portal-new-link[aria-current="page"]::after { display: none; }
.client-portal-account { justify-self: end; }
.client-portal-account > button { color: var(--text-primary); border: 0; }
.client-portal-main { max-width: none; padding: 42px 28px 60px !important; }
.client-portal-page { width: min(1220px, 100%); margin: 0 auto; }
.client-portal-page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.client-portal-page-heading h1 { margin: 0; color: var(--text-heading); font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.035em; }
.client-portal-page-heading p:not(.client-portal-kicker) { margin: 7px 0 0; color: var(--text-secondary); }
.client-portal-kicker { margin: 0 0 5px; color: var(--action-primary); font-size: .72rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.client-portal-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 22px; }
.client-portal-metrics a { display: grid; min-height: 142px; padding: 20px; border: 1px solid var(--surface-border); border-radius: 10px; color: var(--text-primary); background: var(--surface-primary); text-decoration: none; box-shadow: var(--surface-shadow); }
.client-portal-metrics a:hover, .client-portal-metrics a:focus-visible { border-color: color-mix(in srgb, var(--action-primary) 55%, var(--surface-border)); transform: translateY(-1px); }
.client-portal-metrics span { color: var(--text-secondary); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.client-portal-metrics strong { align-self: end; color: var(--text-heading); font-size: 2.5rem; line-height: 1; }
.client-portal-metrics small { margin-top: 6px; color: var(--text-secondary); }
.client-portal-kpi-page { max-width: 1120px; }
.client-portal-kpi-filters form { display: grid; grid-template-columns: repeat(4, max-content); align-items: end; justify-content: center; column-gap: clamp(28px, 4vw, 52px); row-gap: 16px; }
.client-portal-kpi-filters form.has-client-filter { grid-template-columns: repeat(5, max-content); column-gap: clamp(20px, 2.5vw, 34px); }
.client-portal-kpi-filters form > div, .client-portal-kpi-filters fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.client-portal-kpi-filters form > div:not(.client-portal-kpi-actions):not(.client-portal-kpi-field-group), .client-portal-kpi-filters fieldset { display: grid; align-content: end; gap: 5px; }
.client-portal-kpi-filters label, .client-portal-kpi-filters legend, .client-portal-kpi-field-label { display: block; margin: 0; color: var(--text-heading); font-size: .8rem; font-weight: 900; letter-spacing: .015em; text-align: left; white-space: nowrap; }
.client-portal-kpi-filters form > .client-portal-kpi-field-group { display: flex; align-items: center; gap: 10px; }
.client-portal-kpi-field-group > .client-portal-kpi-field-label, .client-portal-kpi-field-group > label { font-size: 1.2rem; }
.client-portal-kpi-filters select, .client-portal-kpi-filters input[type="date"] { width: auto; min-height: 42px; padding: 8px 7px; border: 1px solid var(--input-border); border-radius: 7px; color: var(--text-primary); background: var(--input-bg); }
.client-portal-kpi-filters input[type="date"] { inline-size: 8.5rem; }
.client-portal-kpi-filters input[type="date"]::-webkit-calendar-picker-indicator { margin-left: 4px; padding: 2px; }
.client-portal-kpi-date-type { display: inline-flex; overflow: hidden; width: max-content; min-height: 42px; border: 1px solid var(--input-border); border-radius: 7px; }
.client-portal-kpi-date-type label { display: flex; align-items: center; gap: 8px; margin: 0; padding: 0 13px; color: var(--text-primary); background: var(--input-bg); cursor: pointer; }
.client-portal-kpi-date-type label + label { border-left: 1px solid var(--input-border); }
.client-portal-kpi-actions { display: flex; align-items: end; gap: 8px; }
.client-portal-kpi-actions .btn { min-height: 42px; white-space: nowrap; }
.client-portal-kpi-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.client-portal-kpi-card { display: grid; min-height: 176px; padding: 22px; border: 1px solid var(--surface-border); border-radius: 10px; background: var(--surface-primary); box-shadow: var(--surface-shadow); }
.client-portal-kpi-card > span { color: var(--text-secondary); font-size: .78rem; font-weight: 850; letter-spacing: .055em; text-transform: uppercase; }
.client-portal-kpi-card > strong { align-self: end; color: var(--text-heading); font-size: clamp(1.85rem, 3vw, 2.5rem); line-height: 1; }
.client-portal-kpi-card > small { margin-top: 9px; color: var(--text-secondary); }
.client-portal-kpi-sample { margin: 18px 0 0; color: var(--text-secondary); font-size: .88rem; text-align: center; }
.client-portal-panel { overflow: hidden; margin-bottom: 20px; padding: 22px; border: 1px solid var(--surface-border); border-radius: 10px; background: var(--surface-primary); box-shadow: var(--surface-shadow); }
.client-portal-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.client-portal-section-heading h2 { margin: 0; color: var(--text-heading); font-size: 1.05rem; }
.client-portal-section-heading p { margin: 4px 0 0; color: var(--text-secondary); font-size: .84rem; }
.client-portal-section-heading > a, .client-portal-back { color: var(--action-primary); font-weight: 750; text-decoration: none; }
.client-portal-order-rows { border-top: 1px solid var(--surface-border); }
.client-portal-order-row { display: grid; grid-template-columns: 1fr 1.4fr 1.2fr 1.1fr 18px; align-items: center; gap: 18px; min-height: 88px; padding: 14px 4px; border-bottom: 1px solid var(--surface-border); color: var(--text-primary); text-decoration: none; }
.client-portal-order-row:hover, .client-portal-order-row:focus-visible { background: color-mix(in srgb, var(--action-primary) 5%, transparent); }
.client-portal-order-row > div { display: grid; gap: 4px; min-width: 0; }
.client-portal-order-row strong, .client-portal-order-row span { overflow: hidden; text-overflow: ellipsis; }
.client-portal-order-row div > span:not(.client-portal-status), .client-portal-order-row small { color: var(--text-secondary); font-size: .78rem; white-space: nowrap; }
.client-portal-row-arrow { color: var(--action-primary); font-size: 1.5rem; }
.client-portal-status { display: inline-flex; width: fit-content; padding: 5px 9px; border: 1px solid currentColor; border-radius: 999px; font-size: .72rem; font-weight: 850; line-height: 1; }
.client-portal-status.is-received { color: var(--ops-blue); }.client-portal-status.is-scheduled, .client-portal-status.is-completed { color: var(--status-scheduled); }.client-portal-status.is-progress { color: var(--ops-amber); }.client-portal-status.is-canceled { color: var(--ops-red); }
.client-portal-empty { padding: 42px 20px; text-align: center; }.client-portal-empty h3 { font-size: 1rem; }.client-portal-empty p { margin: 0; color: var(--text-secondary); }
.client-portal-filters { display: flex; align-items: end; gap: 12px; margin-bottom: 20px; padding: 18px; border: 1px solid var(--surface-border); border-radius: 10px; background: var(--surface-primary); }
.client-portal-filters label { flex: 1; min-width: 180px; }.client-portal-filters label > span, .client-portal-step-content label { display: grid; gap: 6px; color: var(--text-secondary); font-size: .78rem; font-weight: 800; }
.client-portal-pagination { display: flex; justify-content: center; gap: 18px; padding-top: 20px; }.client-portal-pagination a { color: var(--action-primary); font-weight: 750; }
.client-portal-back { display: inline-block; margin-bottom: 22px; }
.client-portal-detail-status { display: grid; justify-items: end; gap: 8px; color: var(--text-secondary); }
.client-portal-detail-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .75fr); gap: 20px; align-items: start; }
.client-portal-detail-aside { position: sticky; top: 94px; }
.client-portal-facts, .client-portal-report-summary, .client-portal-report-item dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 0; }
.client-portal-facts > div, .client-portal-report-summary > div, .client-portal-report-item dl > div { min-width: 0; }.client-portal-facts .is-wide { grid-column: 1 / -1; }
.client-portal-facts dt, .client-portal-report dt, .client-portal-items h4 { color: var(--text-secondary); font-size: .7rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }.client-portal-facts dd, .client-portal-report dd { margin: 5px 0 0; }
.client-portal-items article { display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding: 20px 0; border-top: 1px solid var(--surface-border); }.client-portal-item-number { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--action-primary); background: color-mix(in srgb, var(--action-primary) 12%, transparent); font-weight: 900; }.client-portal-items h3 { margin: 3px 0; font-size: 1rem; }.client-portal-item-meta { color: var(--text-secondary); font-size: .82rem; }.client-portal-items h4 { margin-top: 16px; }.client-portal-items article p:last-child { margin-bottom: 0; }
.client-portal-timeline { margin: 0; padding: 0; list-style: none; }.client-portal-timeline li { display: grid; grid-template-columns: 12px 1fr; gap: 12px; position: relative; padding-bottom: 22px; }.client-portal-timeline li.is-empty { grid-template-columns: 1fr; }.client-portal-timeline li > span { width: 10px; height: 10px; margin-top: 5px; border: 2px solid var(--action-primary); border-radius: 50%; }.client-portal-timeline li:not(:last-child)::after { content: ""; position: absolute; top: 15px; bottom: 0; left: 4px; width: 1px; background: var(--surface-border); }.client-portal-timeline strong { font-size: .86rem; }.client-portal-timeline p { margin: 3px 0; color: var(--text-secondary); font-size: .8rem; }.client-portal-timeline time { color: var(--text-secondary); font-size: .72rem; }
.client-portal-report { border-top: 3px solid var(--status-scheduled); }.client-portal-report-item { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--surface-border); }.client-portal-report-item h3 { font-size: 1rem; }.client-portal-evidence { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }.client-portal-evidence a { overflow: hidden; border: 1px solid var(--surface-border); border-radius: 8px; color: var(--text-primary); text-decoration: none; }.client-portal-evidence img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }.client-portal-evidence span { display: block; padding: 8px; font-size: .75rem; font-weight: 750; }
.client-portal-create-page { max-width: 920px; }.client-portal-intake { position: relative; }.client-portal-intake::before { content: ""; position: absolute; top: 28px; bottom: 28px; left: 19px; width: 2px; background: var(--surface-border); }.client-portal-intake-step { display: grid; grid-template-columns: 40px 1fr; gap: 20px; position: relative; padding-bottom: 22px; }.client-portal-step-marker { z-index: 1; display: grid; place-items: start center; }.client-portal-step-marker span { display: grid; place-items: center; width: 40px; height: 40px; border: 2px solid var(--action-primary); border-radius: 50%; color: var(--action-primary); background: var(--surface-primary); font-weight: 900; }.client-portal-step-content { padding: 22px; border: 1px solid var(--surface-border); border-radius: 10px; background: var(--surface-primary); box-shadow: var(--surface-shadow); }.client-portal-step-content > h2 { margin: 0; font-size: 1.1rem; }.client-portal-step-content > p { margin: 5px 0 18px; color: var(--text-secondary); }.client-portal-form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }.client-portal-form-grid .is-wide { grid-column: 1 / -1; }.client-portal-step-content label small { font-weight: 400; }.client-portal-locked-field { display: grid; width: 100%; margin-bottom: 16px; padding: 12px; border: 1px solid var(--surface-border); border-radius: 7px; }.client-portal-locked-field span, .client-portal-locked-field small { color: var(--text-secondary); font-size: .75rem; }.client-portal-create-item { margin-top: 12px; padding: 16px; border: 1px solid var(--surface-border); border-radius: 8px; background: var(--surface-secondary); }.client-portal-create-item-head { display: flex; justify-content: space-between; align-items: center; }.client-portal-create-item-head h3 { font-size: .9rem; }.client-portal-neutral { padding: 15px; border: 1px solid var(--surface-border); border-radius: 8px; background: var(--surface-secondary); }.client-portal-neutral p { margin: 3px 0 0; color: var(--text-secondary); font-size: .84rem; }.client-scheduling-options { display: flex; flex-wrap: wrap; gap: 10px; }.client-scheduling-options .client-portal-neutral { flex: 1 0 100%; }.client-date-choice { padding: 12px 15px; border: 1px solid var(--surface-border); border-radius: 8px; color: var(--text-primary); background: var(--surface-secondary); font-weight: 750; }.client-date-choice:hover, .client-date-choice:focus-visible, .client-date-choice.is-selected { border-color: var(--action-primary); color: var(--action-primary); box-shadow: 0 0 0 3px var(--focus-ring); }.client-portal-create-actions { display: flex; justify-content: flex-end; gap: 12px; padding: 10px 0 0 60px; }
.client-portal-step-content .errorlist { margin: 2px 0 0; padding: 0; color: var(--ops-red); list-style: none; font-size: .75rem; }
.client-portal-media-field { min-width: 0; }.client-portal-field-label { display: block; margin-bottom: 6px; color: var(--text-secondary); font-size: .78rem; font-weight: 800; }.client-portal-media-dropzone { min-height: 132px; display: grid; place-content: center; padding: 16px; }.client-portal-media-previews { grid-template-columns: 1fr; }.client-portal-media-previews:empty { display: none; }
.client-portal-address-suggestions .list-group-item:focus-visible,
.client-portal-address-suggestions .list-group-item.active,
.client-portal-address-suggestions .list-group-item[aria-selected="true"] { color: var(--ops-text); border-color: rgba(40, 231, 255, .42); background: rgba(40, 231, 255, .14); box-shadow: inset 3px 0 0 var(--action-primary); outline: 2px solid var(--focus-ring); outline-offset: -2px; }

/* Office creation reuses the accepted Client Portal intake-rail structure
   without changing the shared ServiceOrder form or its workflow contracts. */
.service-order-create-form {
  width: min(100%, 1000px);
  margin-inline: auto;
  gap: 1rem;
}

.service-order-create-form .client-portal-step-content .form-label {
  display: inline-block;
}

.service-order-create-form .service-order-form-item {
  background: var(--surface-secondary);
}

/* Profile creation and Service Order editing reuse the numbered intake-rail
   treatment established by New Service Order without changing their fields. */
.service-order-edit-page {
  width: min(100%, 1000px);
  margin-inline: auto;
}

.profile-create-flow,
.service-order-edit-flow {
  position: relative;
  width: min(100%, 1000px);
  margin-inline: auto;
  padding-left: 60px;
  gap: 1rem;
  counter-reset: profile-create-step;
}

.profile-create-flow::before,
.service-order-edit-flow::before {
  content: "";
  position: absolute;
  top: 28px;
  bottom: 28px;
  left: 19px;
  width: 2px;
  background: var(--surface-border);
}

.profile-create-flow > section,
.service-order-edit-flow > section {
  position: relative;
  margin-top: 0 !important;
  padding: 22px;
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  background: var(--surface-primary);
  box-shadow: var(--surface-shadow);
  counter-increment: profile-create-step;
}

.profile-create-flow > section::before,
.service-order-edit-flow > section::before {
  content: counter(profile-create-step);
  position: absolute;
  left: -60px;
  top: 0;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 2px solid var(--action-primary);
  border-radius: 50%;
  color: var(--action-primary);
  background: var(--surface-primary);
  font-weight: 900;
}

/* Keep numbered intake rails readable on Frost's near-white surfaces. */
[data-p2p-theme="light"] .client-portal-step-marker span,
[data-p2p-theme="light"] .profile-create-flow > section::before,
[data-p2p-theme="light"] .service-order-edit-flow > section::before {
  color: #000;
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] .client-portal-step-marker span,
  [data-p2p-theme="auto"] .profile-create-flow > section::before,
  [data-p2p-theme="auto"] .service-order-edit-flow > section::before {
    color: #000;
  }
}

@media (max-width: 575.98px) {
  .profile-create-flow,
  .service-order-edit-flow { padding-left: 40px; }
  .profile-create-flow::before,
  .service-order-edit-flow::before { left: 14px; }
  .profile-create-flow > section,
  .service-order-edit-flow > section { padding: 17px; }
  .profile-create-flow > section::before,
  .service-order-edit-flow > section::before { left: -40px; width: 30px; height: 30px; }
}

.dispatch-self-scheduling-disclosure {
  width: min(100%, 460px);
  border: 1px solid var(--surface-border);
  border-radius: 7px;
  background: var(--surface-primary);
}

.dispatch-self-scheduling-disclosure > summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.7rem;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 750;
  list-style: none;
}

.dispatch-self-scheduling-disclosure > summary::-webkit-details-marker { display: none; }
.dispatch-self-scheduling-disclosure > summary::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  flex: none;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform var(--transition-fast);
}
.dispatch-self-scheduling-disclosure[open] > summary::before { transform: rotate(45deg); }
.dispatch-self-scheduling-disclosure > summary:focus-visible { outline: var(--focus-ring); outline-offset: 2px; }
.dispatch-self-scheduling-count { color: var(--text-secondary); font-size: 0.75rem; font-weight: 600; }
.dispatch-self-scheduling-form { padding: 0 0.7rem 0.7rem; }
.dispatch-self-scheduling-form select { min-height: 4.75rem; max-height: 10rem; resize: vertical; }

.scheduling-queue-tabs a { border-width: 2px; font-weight: 750; }
html[data-p2p-theme] body:not([data-account-entry]):not(.technician-mobile-shell) .scheduling-workspace > .dashboard-panel.scheduling-detail-panel.scheduling-detail-selected {
  position: relative;
  border: 1px solid color-mix(in srgb, var(--action-primary) 48%, var(--surface-border)) !important;
  border-radius: 24px;
  border-top-left-radius: var(--scheduling-detail-top-radius, 24px);
  border-bottom-left-radius: var(--scheduling-detail-bottom-radius, 24px);
  background: var(--scheduling-selected-surface) !important;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.scheduling-overview-grid { display: grid; gap: 14px; }
.scheduling-overview-updates > .alert:first-child { margin-top: 0 !important; }
.scheduling-overview-updates .scheduling-notes-grid { margin-top: 0; }
.scheduling-overview-updates > .alert + .scheduling-notes-grid { margin-top: 14px; }
.scheduling-detail-context { max-width: 980px; }
.scheduling-detail-context dd { overflow-wrap: anywhere; }

@media (min-width: 1600px) {
  .scheduling-overview-grid { grid-template-columns: minmax(0, 1.65fr) minmax(320px, 1fr); align-items: start; }
  .scheduling-overview-grid .scheduling-notes-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}

.routing-board-context { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.routing-board-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.75rem; }
.routing-board-context > .dispatch-self-scheduling-disclosure { position: relative; z-index: 4; width: auto; max-width: 100%; flex: none; }
.routing-board-context .routing-day-preview-controls { margin-left: auto; }
.routing-board-context .routing-board-legend { gap: 0.5rem; }
.routing-board-context .dispatch-self-scheduling-form {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: min(460px, calc(100vw - 3rem));
  padding: 0.7rem;
  border: 1px solid var(--surface-border);
  border-radius: 7px;
  background: var(--surface-primary);
  box-shadow: var(--surface-shadow);
}
.zone-planner-header-copy { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.4rem; min-width: 0; }
.zone-planner-header-copy h2 { white-space: nowrap; }
.routing-week-controls, .zone-planner-week-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.routing-week-label, .zone-planner-week-range {
  min-width: 0;
  padding-inline: 0.35rem;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 800;
  white-space: nowrap;
}
.routing-board-support { color: var(--text-secondary); }

@media (max-width: 760px) {
  .scheduling-queue-row.active { border-right: 1px solid var(--action-primary); border-top-right-radius: 7px; border-bottom-right-radius: 7px; }
  .routing-board-context .routing-board-legend { margin-left: 0; }
  .routing-week-controls, .zone-planner-week-controls { width: 100%; }
  .routing-week-label, .zone-planner-week-range { order: -1; width: 100%; }
}
[data-p2p-theme="light"] .client-portal-header, [data-p2p-theme="light"] .client-portal-panel, [data-p2p-theme="light"] .client-portal-metrics a, [data-p2p-theme="light"] .client-portal-kpi-card, [data-p2p-theme="light"] .client-portal-filters, [data-p2p-theme="light"] .client-portal-step-content { background: #fff; }
[data-p2p-theme="light"] .client-portal-status.is-received { color: #176fe5; }[data-p2p-theme="light"] .client-portal-status.is-scheduled, [data-p2p-theme="light"] .client-portal-status.is-completed { color: #168251; }[data-p2p-theme="light"] .client-portal-status.is-progress { color: #9a6500; }[data-p2p-theme="light"] .client-portal-status.is-canceled { color: #c62f43; }
[data-p2p-theme="light"] .client-portal-address-suggestions .list-group-item:focus-visible,
[data-p2p-theme="light"] .client-portal-address-suggestions .list-group-item.active,
[data-p2p-theme="light"] .client-portal-address-suggestions .list-group-item[aria-selected="true"] { color: var(--frost-text-primary) !important; border-color: rgba(8, 151, 184, .42); background: rgba(213, 247, 253, .92) !important; }

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] .client-portal-address-suggestions .list-group-item:focus-visible,
  [data-p2p-theme="auto"] .client-portal-address-suggestions .list-group-item.active,
  [data-p2p-theme="auto"] .client-portal-address-suggestions .list-group-item[aria-selected="true"] { color: var(--frost-text-primary) !important; border-color: rgba(8, 151, 184, .42); background: rgba(213, 247, 253, .92) !important; }
}

@media (max-width: 900px) {
  .client-portal-header-inner { grid-template-columns: 1fr auto; gap: 8px; padding: 8px 16px; }.client-portal-brand { grid-column: 1; }.client-portal-account { grid-column: 2; }.client-portal-nav { grid-column: 1 / -1; grid-row: 2; overflow-x: auto; min-height: 48px; }.client-portal-nav a { flex: 0 0 auto; padding: 0 12px; }.client-portal-nav a[aria-current="page"]::after { bottom: -8px; }.client-portal-main { padding: 28px 16px 50px !important; }.client-portal-detail-grid { grid-template-columns: 1fr; }.client-portal-detail-aside { position: static; }.client-portal-order-row { grid-template-columns: 1fr 1fr 18px; }.client-portal-order-row > div:nth-child(3) { display: none; }.client-portal-order-row > div:nth-child(4) { justify-items: end; }.client-portal-filters { flex-wrap: wrap; }.client-portal-filters label { flex: 1 1 240px; }.client-portal-kpi-filters form, .client-portal-kpi-filters form.has-client-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: stretch; column-gap: 16px; }.client-portal-kpi-actions { display: flex; align-items: end; gap: 8px; }.client-portal-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .client-portal-logo-plate { width: 86px; }.client-portal-brand strong { max-width: 145px; }.client-portal-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; overflow: visible; gap: 0; }.client-portal-nav a { min-width: 0; padding: 0 4px; font-size: .7rem; text-align: center; }.client-portal-nav .client-portal-new-link { min-height: 34px; }.client-portal-page-heading { align-items: stretch; flex-direction: column; }.client-portal-page-heading > .btn { width: 100%; }.client-portal-metrics { grid-template-columns: 1fr; }.client-portal-metrics a { min-height: 112px; }.client-portal-order-row { grid-template-columns: 1fr auto; gap: 10px; }.client-portal-order-row > div:nth-child(2), .client-portal-row-arrow { display: none; }.client-portal-detail-status { justify-items: start; }.client-portal-facts, .client-portal-report-summary, .client-portal-report-item dl, .client-portal-form-grid { grid-template-columns: 1fr; }.client-portal-form-grid .is-wide { grid-column: auto; }.client-portal-evidence { grid-template-columns: repeat(2, 1fr); }.client-portal-intake-step { grid-template-columns: 30px 1fr; gap: 10px; }.client-portal-intake::before { left: 14px; }.client-portal-step-marker span { width: 30px; height: 30px; }.client-portal-step-content { padding: 17px; }.client-portal-create-actions { padding-left: 40px; flex-direction: column-reverse; }.client-portal-create-actions .btn { width: 100%; }.client-portal-kpi-filters form, .client-portal-kpi-filters form.has-client-filter, .client-portal-kpi-grid { grid-template-columns: 1fr; }.client-portal-kpi-filters form > .client-portal-kpi-field-group { display: grid; justify-items: start; gap: 5px; }.client-portal-kpi-actions { display: flex; }.client-portal-kpi-actions .btn { width: auto; }.client-portal-kpi-card { min-height: 142px; }
}

/* Anonymous account entry shares Frost surfaces across the existing form shells. */
[data-p2p-theme="light"] [data-account-entry="true"] :is(
  .login-panel,
  .login-brand-mark,
  .page-narrow > .border,
  .page-narrow > .dashboard-panel
) {
  color: var(--frost-text-primary);
  background: #ffffff !important;
  border-color: var(--panel-border) !important;
  box-shadow: 0 8px 24px rgba(31, 58, 72, 0.08) !important;
  backdrop-filter: none;
}

[data-p2p-theme="light"] [data-account-entry="true"] .login-brand-mark:empty {
  background: #ffffff url("../img/path2point-logo.b8dcaa546a3a.png") center / calc(100% - 32px) auto no-repeat !important;
}

[data-p2p-theme="light"] [data-account-entry="true"] :is(h1, h2, .form-label) {
  color: var(--frost-text-primary) !important;
}

[data-p2p-theme="light"] [data-account-entry="true"] :is(.text-secondary, .text-muted, .form-text) {
  color: var(--frost-text-secondary) !important;
}

[data-p2p-theme="light"] [data-account-entry="true"] .login-panel a:not(.btn) {
  color: var(--frost-action-strong);
}

[data-p2p-theme="light"] [data-account-entry="true"] .login-panel a:not(.btn):hover {
  color: var(--frost-text-primary);
}

/* Frost workspace hierarchy. Authentication and accepted Midnight stay unchanged.
   Follow System resolves to light/dark before stylesheet application. */
[data-p2p-theme="light"] body:not([data-account-entry]):not(.technician-mobile-shell) {
  --surface-primary: #f3f6f8;
  --surface-secondary: #ffffff;
  --frost-text-primary: #111820;
  --frost-text-secondary: #35424c;
  --frost-text-muted: #46545e;
  --frost-text-subtle: #52616b;
  --frost-empty-text: #46545e;
  --frost-placeholder: #52616b;
  --frost-table-header-text: #35424c;
  --ops-text: #111820;
  --ops-muted: #46545e;
  --text-primary: #111820;
  --text-secondary: #46545e;
  --text-heading: #111820;
}

/* Existing section families missed by the older generic panel layer. These
   are outer containers, including the frame around a map, never map contents. */
[data-p2p-theme="light"] body:not([data-account-entry]):not(.technician-mobile-shell) :is(
  .dispatch-dashboard-panel,
  .dispatch-dashboard-exceptions,
  .dispatch-dashboard-map-panel,
  .command-map-panel,
  .tech-workday-sidebar,
  .import-panel,
  .import-health-hero,
  .import-readiness,
  #accountingTabContent > .tab-pane > .border
) {
  background: var(--surface-primary) !important;
  border-color: var(--surface-border) !important;
  box-shadow: var(--surface-shadow) !important;
  backdrop-filter: none;
}

/* Content cards and inner tools remain bright inside tinted section groups. */
[data-p2p-theme="light"] body:not([data-account-entry]):not(.technician-mobile-shell) :is(
  .command-kpi,
  .kpi-management-card,
  .kpi-attention-card,
  .dispatch-exception-card,
  .dispatch-workflow-card,
  .accounting-queue-kpi,
  #accountingTabContent .accounting-kpi-card,
  .import-stat,
  .table-responsive,
  .media-card,
  .media-preview-item,
  .history-report-preview,
  .scheduling-detail-context section,
  .dispatch-schedule-suggestions,
  .dispatch-suggestion-card,
  .import-field-group,
  .import-order-preview
):not(.leaflet-container *) {
  background: var(--surface-secondary) !important;
  box-shadow: none !important;
}

/* These light container families previously inherited dark-panel copy colors. */
[data-p2p-theme="light"] body:not([data-account-entry]):not(.technician-mobile-shell) :is(
  .dispatch-dashboard-panel,
  .dispatch-dashboard-map-panel,
  .command-map-panel
) {
  --frost-dark-text: var(--frost-text-primary);
  --frost-dark-muted: var(--frost-text-muted);
  color: var(--frost-text-primary) !important;
}

/* Keep map controls/popups on their existing palette, independent of workspace
   text aliases. Map tiles, markers, semantic tokens and providers are untouched. */
[data-p2p-theme="light"] body:not([data-account-entry]):not(.technician-mobile-shell) .leaflet-container {
  --surface-primary: #fafcfd;
  --surface-secondary: #f3f6f8;
  --frost-text-primary: #102838;
  --frost-text-secondary: #34596b;
  --frost-text-muted: #536f7d;
  --frost-text-subtle: #667f8a;
  --frost-empty-text: #607985;
  --frost-placeholder: #748d99;
  --frost-table-header-text: #284e61;
  --ops-text: #142b38;
  --ops-muted: #4d6876;
  --text-primary: #142b38;
  --text-secondary: #4d6876;
  --text-heading: #102938;
  --frost-dark-text: #eefbff;
  --frost-dark-muted: #b8d1db;
}

[data-p2p-theme="light"] body:not([data-account-entry]):not(.technician-mobile-shell) .form-label:not(.scheduling-customer-preference .form-label):not(.report-error-field .form-label):not(.text-danger, .text-warning, .text-success, .text-info, .text-primary) {
  color: var(--frost-text-primary) !important;
}

[data-p2p-theme="light"] body:not([data-account-entry]):not(.technician-mobile-shell) .app-footer {
  color: var(--frost-text-muted);
}

/* Flat Frost calendar states shared by Routing, Zone Planner and Tech Workday.
   Keep availability accents visible when current-day/selection takes the fill. */
[data-p2p-theme="light"] body:not([data-account-entry]):not(.technician-mobile-shell) {
  --calendar-available: color-mix(in srgb, var(--status-scheduled) 10%, white);
  --calendar-unavailable: color-mix(in srgb, var(--status-capacity) 9%, white);
  --calendar-warning: color-mix(in srgb, var(--status-unscheduled) 12%, white);
  --calendar-current: var(--frost-selected-row);
}

[data-p2p-theme="light"] body:not([data-account-entry]) :is(
  .routing-board-scroll, .routing-tech-heading, .routing-day-heading, .routing-tech-card,
  .zone-planner-header-tech, .zone-planner-day-heading, .zone-planner-week-table .zone-planner-tech,
  .tech-workday-calendar-header, .tech-workday-calendar-scroll,
  .tech-workday-corner, .tech-workday-column-heading, .tech-workday-tech-cell
) {
  background: var(--surface-primary) !important;
}

[data-p2p-theme="light"] body:not([data-account-entry]) :is(
  .routing-cell, .zone-planner-week-table .zone-planner-cell, .tech-workday-day-cell,
  .routing-stop-card, .zone-planner-assignment
) {
  background: var(--surface-secondary) !important;
}

[data-p2p-theme="light"] body:not([data-account-entry]) :is(
  .routing-cell.routing-cell-available, .zone-planner-cell.zone-planner-cell-available,
  .tech-workday-day-cell.tech-workday-day-available
) {
  background: var(--calendar-available) !important;
}

[data-p2p-theme="light"] body:not([data-account-entry]) :is(
  .routing-cell.routing-cell-unavailable, .zone-planner-cell.zone-planner-cell-unavailable,
  .tech-workday-day-cell.tech-workday-day-unavailable, .routing-stop-card.routing-window-missing
) {
  background: var(--calendar-unavailable) !important;
}

[data-p2p-theme="light"] body:not([data-account-entry]) .routing-cell.routing-cell-unsaved {
  background: var(--calendar-warning) !important;
}

[data-p2p-theme="light"] body:not([data-account-entry]) .zone-planner-week-table .zone-planner-cell.zone-planner-cell-available:not(.routing-cell-today) {
  background: var(--calendar-available) !important;
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] .zone-planner-week-table .zone-planner-cell.zone-planner-cell-available:not(.routing-cell-today) {
    background: color-mix(in srgb, var(--status-scheduled) 10%, white) !important;
  }
}

[data-p2p-theme="light"] body:not([data-account-entry]) .zone-planner-cell.zone-planner-cell-conflict {
  background: var(--calendar-unavailable) !important;
}

[data-p2p-theme="light"] body:not([data-account-entry]) :is(
  .routing-day-heading.routing-day-today, .routing-cell.routing-cell-today,
  .zone-planner-day-heading.zone-planner-day-today,
  .zone-planner-week-table .zone-planner-cell.routing-cell-today,
  .tech-workday-day-cell.tech-workday-day-today,
  .tech-workday-day-cell:hover, .tech-workday-day-cell:focus,
  .routing-cell.routing-cell-selected,
  .routing-cell.routing-cell-selected.routing-cell-available,
  .routing-cell.routing-cell-selected.routing-cell-unavailable,
  .tech-workday-day-cell.tech-workday-day-selected,
  .tech-workday-column-heading.tech-workday-day-selected
) {
  background: var(--calendar-current) !important;
}

/* Global navigation: flat, quiet surfaces with restrained interaction states. */
.navbar {
  background: #05080b !important;
  border-bottom-color: rgba(118, 238, 255, 0.2) !important;
  box-shadow: 0 1px 0 rgba(40, 231, 255, 0.14) !important;
  backdrop-filter: none;
}

.navbar .brand-wordmark,
.navbar .brand-wordmark:hover,
.navbar .brand-wordmark:focus {
  filter: none;
}

[data-p2p-theme="dark"] .navbar :is(
  .nav-link,
  .btn-outline-secondary,
  .btn-outline-primary,
  .shell-action-pill,
  .company-switcher-toggle
),
[data-p2p-theme="auto"] .navbar :is(
  .nav-link,
  .btn-outline-secondary,
  .btn-outline-primary,
  .shell-action-pill,
  .company-switcher-toggle
) {
  color: #e9f4f8 !important;
  border-width: 0 !important;
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}

[data-p2p-theme="dark"] .navbar :is(
  .nav-link,
  .btn-outline-secondary,
  .btn-outline-primary,
  .shell-action-pill,
  .company-switcher-toggle
):hover,
[data-p2p-theme="dark"] .navbar :is(
  .nav-link,
  .btn-outline-secondary,
  .btn-outline-primary,
  .shell-action-pill,
  .company-switcher-toggle
):focus {
  color: #ffffff !important;
  border-color: transparent !important;
  background: rgba(118, 238, 255, 0.07) !important;
  box-shadow: none !important;
}

[data-p2p-theme="auto"] .navbar :is(
  .nav-link,
  .btn-outline-secondary,
  .btn-outline-primary,
  .shell-action-pill,
  .company-switcher-toggle
):hover,
[data-p2p-theme="auto"] .navbar :is(
  .nav-link,
  .btn-outline-secondary,
  .btn-outline-primary,
  .shell-action-pill,
  .company-switcher-toggle
):focus {
  color: #ffffff !important;
  border-color: transparent !important;
  background: rgba(118, 238, 255, 0.07) !important;
  box-shadow: none !important;
}

[data-p2p-theme="dark"] .navbar :is(.nav-link.active, .app-domain-toggle.active, .shell-action-pill.active),
[data-p2p-theme="auto"] .navbar :is(.nav-link.active, .app-domain-toggle.active, .shell-action-pill.active) {
  color: var(--ops-cyan) !important;
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}

.navbar .nav-link::before,
.navbar .nav-link:hover::before,
.navbar .nav-link:focus::before,
.navbar .nav-link.active::before {
  background: currentColor;
  box-shadow: none;
}

.navbar .nav-link:hover::before,
.navbar .nav-link:focus::before {
  opacity: 0.45;
}

.navbar .nav-link.active::before {
  opacity: 1;
}

.navbar .app-utility-link .app-domain-icon,
.navbar .global-service-order-search-icon {
  display: inline-block;
}

.navbar :is(.nav-link, .btn, .company-switcher-toggle):focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

[data-p2p-theme="light"] .navbar {
  background: #ffffff !important;
  border-bottom-color: #dce5ec !important;
  box-shadow: 0 1px 2px rgba(31, 58, 72, 0.08) !important;
}

[data-p2p-theme="light"] .navbar :is(
  .nav-link,
  .btn-outline-secondary,
  .btn-outline-primary,
  .shell-action-pill,
  .company-switcher-toggle
) {
  color: #163047 !important;
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}

[data-p2p-theme="light"] .navbar :is(
  .nav-link,
  .btn-outline-secondary,
  .btn-outline-primary,
  .shell-action-pill,
  .company-switcher-toggle
):hover,
[data-p2p-theme="light"] .navbar :is(
  .nav-link,
  .btn-outline-secondary,
  .btn-outline-primary,
  .shell-action-pill,
  .company-switcher-toggle
):focus {
  color: #075e75 !important;
  border-color: transparent !important;
  background: #f2f7fa !important;
  box-shadow: none !important;
}

[data-p2p-theme="light"] .navbar :is(.nav-link.active, .app-domain-toggle.active, .shell-action-pill.active) {
  color: #087990 !important;
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] .navbar {
    background: #ffffff !important;
    border-bottom-color: #dce5ec !important;
    box-shadow: 0 1px 2px rgba(31, 58, 72, 0.08) !important;
  }

  [data-p2p-theme="auto"] .navbar :is(
    .nav-link,
    .btn-outline-secondary,
    .btn-outline-primary,
    .shell-action-pill,
    .company-switcher-toggle
  ) {
    color: #163047 !important;
    border-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  [data-p2p-theme="auto"] .navbar :is(
    .nav-link,
    .btn-outline-secondary,
    .btn-outline-primary,
    .shell-action-pill,
    .company-switcher-toggle
  ):hover,
  [data-p2p-theme="auto"] .navbar :is(
    .nav-link,
    .btn-outline-secondary,
    .btn-outline-primary,
    .shell-action-pill,
    .company-switcher-toggle
  ):focus {
    color: #075e75 !important;
    border-color: transparent !important;
    background: #f2f7fa !important;
    box-shadow: none !important;
  }

  [data-p2p-theme="auto"] .navbar :is(.nav-link.active, .app-domain-toggle.active, .shell-action-pill.active) {
    color: #087990 !important;
    border-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
  }

}

/* Shared search field. Focus and typing are one state on every search surface. */
.p2p-search-pill {
  --search-surface: #102632;
  --search-border: #3b5b6b;
  --search-text: #f0f8fb;
  --search-muted: #afc8d2;
  --search-action: #24c5e8;
  --search-action-hover: #61dbf2;
  --search-action-text: #072535;
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  width: 100%;
  min-height: 44px;
  padding: 3px 3px 3px 14px;
  border: 1px solid var(--search-border);
  border-radius: 999px;
  background: var(--search-surface);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

[data-p2p-theme="light"] .p2p-search-pill {
  --search-surface: #f8fbfe;
  --search-border: #cbdde9;
  --search-text: #142c3c;
  --search-muted: #4d6575;
  --search-action: #128bdb;
  --search-action-hover: #0c77bf;
  --search-action-text: #ffffff;
}

@media (prefers-color-scheme: light) {
  [data-p2p-theme="auto"] .p2p-search-pill {
    --search-surface: #f8fbfe;
    --search-border: #cbdde9;
    --search-text: #142c3c;
    --search-muted: #4d6575;
    --search-action: #128bdb;
    --search-action-hover: #0c77bf;
    --search-action-text: #ffffff;
  }
}

.p2p-search-pill:hover:not(:focus-within) {
  border-color: var(--search-action);
}

.p2p-search-pill:focus-within {
  border-color: var(--search-action);
  box-shadow: 0 0 0 3px rgba(34, 201, 236, 0.2), 0 0 10px rgba(34, 201, 236, 0.17);
}

.p2p-search-pill .p2p-search-leading-icon {
  position: static;
  display: inline-block !important;
  flex: 0 0 19px;
  width: 19px;
  height: 19px;
  color: var(--search-text);
  pointer-events: none;
  transform: none;
}

.p2p-search-pill .p2p-search-input {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 36px;
  margin: 0;
  padding: 0 10px 0 12px;
  border: 0 !important;
  outline: 0;
  border-radius: 999px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--search-text) !important;
  font-size: 0.88rem;
}

.p2p-search-pill .p2p-search-input::placeholder {
  color: var(--search-muted) !important;
  opacity: 1;
}

.p2p-search-pill .p2p-search-submit {
  display: inline-flex;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--search-action-text) !important;
  background: var(--search-action) !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.p2p-search-pill .p2p-search-submit .app-domain-icon {
  display: inline-block !important;
  width: 18px;
  height: 18px;
}

.p2p-search-pill .p2p-search-submit:hover,
.p2p-search-pill .p2p-search-submit:focus-visible {
  background: var(--search-action-hover) !important;
}

.p2p-search-pill .p2p-search-submit:focus-visible {
  outline: 2px solid var(--search-action-text);
  outline-offset: -4px;
}

.p2p-search-pill .p2p-search-submit:active {
  transform: scale(0.95);
}

.p2p-search-pill--compact {
  min-height: 38px;
  padding: 2px 2px 2px 10px;
}

.p2p-search-pill--compact .p2p-search-input {
  height: 32px;
  padding-left: 8px;
}

.p2p-search-pill--compact .p2p-search-submit {
  flex-basis: 32px;
  width: 32px;
  height: 32px;
}

/* Existing search/filter behavior stays with each page's own form or live list. */
.platform-dashboard .platform-search {
  display: flex;
}

.platform-dashboard .platform-search .p2p-search-pill {
  flex: 1 1 auto;
}

.platform-dashboard .platform-search .p2p-search-pill .p2p-search-input {
  min-height: 0;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
}

.dispatch-zip-lookup-form .p2p-search-pill {
  width: 168px;
}

.dispatch-zip-lookup-form .p2p-search-pill .p2p-search-input {
  width: 100%;
}

.export-check-panel .p2p-search-pill {
  margin-bottom: 8px;
}

.export-check-panel .p2p-search-pill .export-filter-option-search {
  min-height: 0 !important;
  margin-bottom: 0;
}

.client-portal-filters label > .p2p-search-pill {
  display: flex;
  gap: 0;
}

.client-portal-filters .client-portal-filter-search {
  display: grid;
  flex: 1;
  gap: 6px;
  min-width: 180px;
}

.client-portal-filters .client-portal-filter-search > label {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 800;
}

@media (max-width: 767.98px) {
  .client-portal-filters .client-portal-filter-search {
    flex: 1 1 240px;
  }
}

/* The common action and picker silhouette; joined controls keep joined edges. */
main .btn:not(.btn-group > .btn):not(.input-group > .btn):not(.btn-close),
main :is(input.form-control, select.form-select):not(.input-group > *),
main .import-select-button,
main .client-portal-kpi-filters :is(select, input[type="date"]),
main .import-file-picker {
  border-radius: var(--control-pill-radius) !important;
}

main .btn-group > .btn:first-of-type {
  border-radius: var(--control-pill-radius) 0 0 var(--control-pill-radius) !important;
}

main .btn-group > .btn:last-of-type {
  border-radius: 0 var(--control-pill-radius) var(--control-pill-radius) 0 !important;
}

main .btn-group > .btn:only-of-type {
  border-radius: var(--control-pill-radius) !important;
}

main .input-group > :first-child {
  border-radius: var(--control-pill-radius) 0 0 var(--control-pill-radius) !important;
}

main .input-group > :last-child {
  border-radius: 0 var(--control-pill-radius) var(--control-pill-radius) 0 !important;
}

main .input-group > :only-child {
  border-radius: var(--control-pill-radius) !important;
}

/* Shared global Service Order header actions. */
.navbar .global-service-order-actions {
  --header-create-border: #24c5e8;
  --header-create-text: #5ddaf3;
  --header-create-hover: #123340;
  --header-create-hover-text: #e5fbff;
  --header-create-pressed: #155c85;
  min-width: 0;
}

[data-p2p-theme="light"] .navbar .global-service-order-actions {
  --header-create-border: #128bdb;
  --header-create-text: #0873b5;
  --header-create-hover: #c8f3fa;
  --header-create-hover-text: #07577d;
  --header-create-pressed: #175ec5;
}

.navbar .global-service-order-search {
  flex: 1 1 270px;
  min-width: 0;
}

.navbar .global-service-order-create {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0 17px;
  border: 1px solid var(--header-create-border) !important;
  border-radius: 999px;
  color: var(--header-create-text) !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: background-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

.navbar .global-service-order-create-plus {
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 0.8;
}

.navbar .global-service-order-create:hover {
  color: var(--header-create-hover-text) !important;
  background: var(--header-create-hover) !important;
  box-shadow: 0 2px 8px rgba(13, 154, 194, 0.14) !important;
}

.navbar .global-service-order-create:focus-visible {
  outline: 2px solid var(--header-create-border);
  outline-offset: 3px;
}

.navbar .global-service-order-create:active {
  color: #ffffff !important;
  background: var(--header-create-pressed) !important;
  box-shadow: none !important;
}

@media (min-width: 1400px) {
  .app-navbar-collapse .global-service-order-actions {
    flex-basis: 370px;
    min-width: 300px;
  }
}

@media (max-width: 991.98px) {
  .navbar .global-service-order-search {
    flex-basis: 0;
  }
}
