/*
 * HatchOS Light Theme
 * Activated when <html data-theme="light"> is set.
 * Uses !important on custom properties to beat :root declarations.
 * Direct element overrides for hardcoded colors in shared-nav.
 */

/* ── CSS Custom Property Overrides ─────────────────────────────── */
html[data-theme="light"] {
  --ink: #f0f4f8 !important;
  --steel: #ffffff !important;
  --steel-light: #f8fafc !important;
  --steel2: #ffffff !important;
  --slate: #cbd5e1 !important;
  --mist: #64748b !important;
  --cloud: #334155 !important;
  --white: #0f172a !important;
  /* --accent alias so light-theme rules using var(--accent) resolve */
  --accent: #184A9E !important;

  /* Signal/accent colors stay the same — brand blue looks fine on light */
  --signal: #184A9E !important;
  --signal-dim: rgba(24, 74, 158, 0.1) !important;
  --signal-glow: rgba(24, 74, 158, 0.2) !important;

  /* Ocean/green/red/purple — keep vivid, just soften dim variants */
  --ocean: #0284c7 !important;
  --ocean-dim: rgba(2, 132, 199, 0.1) !important;
  --green: #059669 !important;
  --green-dim: rgba(5, 150, 105, 0.1) !important;
  --red: #dc2626 !important;
  --red-dim: rgba(220, 38, 38, 0.1) !important;
  --purple: #7c3aed !important;
  --purple-dim: rgba(124, 58, 237, 0.1) !important;
}

/* ── Main nav bar ────────────────────────────────────────────── */
html[data-theme="light"] #shared-nav {
  background: rgba(255, 255, 255, 0.97) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}

html[data-theme="light"] .sn-logo {
  color: #0f172a !important;
}

html[data-theme="light"] .sn-link {
  color: #64748b !important;
}
html[data-theme="light"] .sn-link:hover {
  color: #0f172a !important;
  background: rgba(0, 0, 0, 0.05) !important;
}
html[data-theme="light"] .sn-link.active {
  color: #184A9E !important;
  background: rgba(24, 74, 158, 0.08) !important;
}

/* Notification button */
html[data-theme="light"] .sn-notif-btn {
  background: rgba(0, 0, 0, 0.04) !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  color: #64748b !important;
}
html[data-theme="light"] .sn-notif-btn:hover {
  background: rgba(0, 0, 0, 0.08) !important;
  color: #0f172a !important;
}

/* User button */
html[data-theme="light"] .sn-user-btn {
  background: rgba(0, 0, 0, 0.04) !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  color: #64748b !important;
}
html[data-theme="light"] .sn-user-btn:hover,
html[data-theme="light"] .sn-user-btn.open {
  background: rgba(0, 0, 0, 0.08) !important;
  color: #0f172a !important;
}

html[data-theme="light"] .sn-chevron {
  color: #94a3b8 !important;
}

/* Notification dropdown */
html[data-theme="light"] .sn-notif-dropdown {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
}
html[data-theme="light"] .sn-notif-header {
  border-bottom-color: rgba(0, 0, 0, 0.07) !important;
  color: #0f172a !important;
}
html[data-theme="light"] .sn-notif-item {
  border-bottom-color: rgba(0, 0, 0, 0.05) !important;
  color: #64748b !important;
}
html[data-theme="light"] .sn-notif-item:hover {
  background: rgba(0, 0, 0, 0.03) !important;
}
html[data-theme="light"] .sn-notif-item.unread {
  color: #334155 !important;
  background: rgba(24, 74, 158, 0.05) !important;
}
html[data-theme="light"] .sn-notif-item .sn-notif-time {
  color: #94a3b8 !important;
}
html[data-theme="light"] .sn-notif-empty {
  color: #94a3b8 !important;
}
html[data-theme="light"] .sn-notif-footer {
  border-top-color: rgba(0, 0, 0, 0.07) !important;
}

/* User dropdown */
html[data-theme="light"] .sn-user-dropdown {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
}
html[data-theme="light"] .sn-dd-section-label {
  color: #94a3b8 !important;
}
html[data-theme="light"] .sn-dd-item {
  color: #4b5563 !important;
}
html[data-theme="light"] .sn-dd-item:hover {
  background: rgba(0, 0, 0, 0.05) !important;
  color: #0f172a !important;
}
html[data-theme="light"] .sn-dd-item.danger {
  color: #dc2626 !important;
}
html[data-theme="light"] .sn-dd-item.danger:hover {
  background: rgba(220, 38, 38, 0.08) !important;
}
html[data-theme="light"] .sn-dd-divider {
  background: rgba(0, 0, 0, 0.07) !important;
}

/* Dispatch sub-nav */
html[data-theme="light"] #sn-dispatch-sub {
  background: rgba(240, 244, 248, 0.97) !important;
  border-bottom-color: rgba(0, 0, 0, 0.07) !important;
}
html[data-theme="light"] .sn-sub-link {
  color: #64748b !important;
}
html[data-theme="light"] .sn-sub-link:hover {
  color: #0f172a !important;
  background: rgba(0, 0, 0, 0.05) !important;
}
html[data-theme="light"] .sn-sub-link.active {
  color: #184A9E !important;
  background: rgba(24, 74, 158, 0.08) !important;
}

/* Change password modal */
html[data-theme="light"] .sn-modal-overlay {
  background: rgba(0, 0, 0, 0.4) !important;
}
html[data-theme="light"] .sn-modal {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15) !important;
}
html[data-theme="light"] .sn-modal h3 {
  color: #0f172a !important;
}
html[data-theme="light"] .sn-modal-field label {
  color: #64748b !important;
}
html[data-theme="light"] .sn-modal-field input {
  background: rgba(0, 0, 0, 0.04) !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  color: #0f172a !important;
}
html[data-theme="light"] .sn-modal-field input::placeholder {
  color: #94a3b8 !important;
}
html[data-theme="light"] .sn-modal-btn.secondary {
  background: rgba(0, 0, 0, 0.06) !important;
  color: #64748b !important;
}
html[data-theme="light"] .sn-modal-btn.secondary:hover {
  background: rgba(0, 0, 0, 0.1) !important;
  color: #0f172a !important;
}

/* ── Generic common element overrides ───────────────────────── */

/* Scrollbars */
html[data-theme="light"] ::-webkit-scrollbar-track {
  background: #f1f5f9 !important;
}
html[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: #cbd5e1 !important;
}
html[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: #94a3b8 !important;
}

/* Table borders commonly used across pages */
html[data-theme="light"] table {
  border-color: rgba(0, 0, 0, 0.08) !important;
}
html[data-theme="light"] th,
html[data-theme="light"] td {
  border-color: rgba(0, 0, 0, 0.06) !important;
}

/* Inputs using CSS vars already (most pages) */
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  color-scheme: light;
}

/* Native <option> elements need explicit light-theme colors */
html[data-theme="light"] select option {
  background: #ffffff;
  color: #0f172a;
}

/* Theme toggle button style */
.sn-theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.7rem;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 0.8rem;
  text-align: left;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s;
  font-family: 'Poppins', sans-serif;
  justify-content: space-between;
}
.sn-theme-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
}
html[data-theme="light"] .sn-theme-toggle {
  color: #4b5563 !important;
}
html[data-theme="light"] .sn-theme-toggle:hover {
  background: rgba(0, 0, 0, 0.05) !important;
  color: #0f172a !important;
}
.sn-theme-toggle-track {
  width: 30px;
  height: 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}
html[data-theme="light"] .sn-theme-toggle-track {
  background: rgba(0, 0, 0, 0.15) !important;
}
.sn-theme-toggle-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #f8fafc;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.2s, background 0.2s;
}
html[data-theme="light"] .sn-theme-toggle-thumb {
  background: #184A9E !important;
  transform: translateX(14px);
}

/* ── Status dropdown (dispatch shipment page) ──────────────── */
html[data-theme="light"] .status-dropdown {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
}
html[data-theme="light"] .status-opt {
  color: #334155 !important;
}
html[data-theme="light"] .status-opt:hover {
  background: rgba(0, 0, 0, 0.05) !important;
}

/* Toast notification */
html[data-theme="light"] .toast {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1) !important;
  color: #334155 !important;
}

/* Divider */
html[data-theme="light"] .divider {
  border-top-color: rgba(0, 0, 0, 0.08) !important;
}

/* ── Hatch AI Context Panel ────────────────────────────────── */
/* Inline card */
html[data-theme="light"] .hctx-card {
  background: linear-gradient(135deg, rgba(24,74,158,0.04) 0%, rgba(15,50,112,0.02) 100%) !important;
  border-color: rgba(24, 74, 158, 0.18) !important;
}
html[data-theme="light"] .hctx-header {
  background: linear-gradient(90deg, rgba(24,74,158,0.08) 0%, rgba(24,74,158,0.02) 100%) !important;
}
html[data-theme="light"] .hctx-label {
  color: #184A9E !important;
}
html[data-theme="light"] .hctx-chevron {
  color: rgba(24, 74, 158, 0.5) !important;
}
/* Response text — inline card + slider + any container */
html[data-theme="light"] .hctx-response,
html[data-theme="light"] .hctx-slider-resp-text {
  color: #334155 !important;
}
html[data-theme="light"] .hctx-response strong,
html[data-theme="light"] .hctx-slider-resp-text strong {
  color: #0f172a !important;
}
html[data-theme="light"] .hctx-response em,
html[data-theme="light"] .hctx-slider-resp-text em {
  color: #184A9E !important;
}
/* Markdown headings */
html[data-theme="light"] .hctx-response h1,
html[data-theme="light"] .hctx-response h2,
html[data-theme="light"] .hctx-response h3,
html[data-theme="light"] .hctx-response h4,
html[data-theme="light"] .hctx-slider-resp-text h1,
html[data-theme="light"] .hctx-slider-resp-text h2,
html[data-theme="light"] .hctx-slider-resp-text h3,
html[data-theme="light"] .hctx-slider-resp-text h4 {
  color: #0f172a !important;
}
/* Markdown list markers */
html[data-theme="light"] .hctx-response li::marker,
html[data-theme="light"] .hctx-slider-resp-text li::marker {
  color: #184A9E !important;
}
/* Inline code */
html[data-theme="light"] .hctx-response code,
html[data-theme="light"] .hctx-slider-resp-text code {
  background: rgba(0, 0, 0, 0.06) !important;
  color: #334155 !important;
}
/* Code blocks */
html[data-theme="light"] .hctx-response pre,
html[data-theme="light"] .hctx-slider-resp-text pre {
  background: rgba(0, 0, 0, 0.04) !important;
}
/* Blockquotes */
html[data-theme="light"] .hctx-response blockquote,
html[data-theme="light"] .hctx-slider-resp-text blockquote {
  border-left-color: rgba(24, 74, 158, 0.3) !important;
  color: #64748b !important;
}
/* Links */
html[data-theme="light"] .hctx-response a,
html[data-theme="light"] .hctx-slider-resp-text a {
  color: #184A9E !important;
}
html[data-theme="light"] .hctx-response a:hover,
html[data-theme="light"] .hctx-slider-resp-text a:hover {
  color: #0F3270 !important;
}
/* Horizontal rules */
html[data-theme="light"] .hctx-response hr,
html[data-theme="light"] .hctx-slider-resp-text hr {
  border-top-color: rgba(0, 0, 0, 0.1) !important;
}
/* Legacy numbered list markers (fallback) */
html[data-theme="light"] .hctx-list-num {
  color: #184A9E !important;
}
html[data-theme="light"] .hctx-loading {
  color: rgba(24, 74, 158, 0.7) !important;
}
html[data-theme="light"] .hctx-error {
  color: #dc2626 !important;
}
/* Action/suggestion buttons */
html[data-theme="light"] .hctx-action-btn {
  background: rgba(24, 74, 158, 0.06) !important;
  border-color: rgba(24, 74, 158, 0.2) !important;
  color: #184A9E !important;
}
html[data-theme="light"] .hctx-action-btn:hover {
  background: rgba(24, 74, 158, 0.14) !important;
  border-color: rgba(24, 74, 158, 0.4) !important;
  color: #0F3270 !important;
}
html[data-theme="light"] .hctx-action-btn.active {
  background: #184A9E !important;
  border-color: #184A9E !important;
  color: #ffffff !important;
}
/* Follow-up input */
html[data-theme="light"] .hctx-follow-input {
  background: rgba(0, 0, 0, 0.03) !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  color: #0f172a !important;
}
html[data-theme="light"] .hctx-follow-input:focus {
  border-color: rgba(24, 74, 158, 0.5) !important;
}
html[data-theme="light"] .hctx-follow-input::placeholder {
  color: #94a3b8 !important;
}
/* Follow-up / Ask button */
html[data-theme="light"] .hctx-follow-btn {
  background: #184A9E !important;
  color: #ffffff !important;
}
html[data-theme="light"] .hctx-follow-btn:hover {
  background: #0F3270 !important;
}
html[data-theme="light"] .hctx-meta {
  color: #94a3b8 !important;
}

/* ── Slider panel ─────────────────────────────────────────── */
html[data-theme="light"] #hctx-slider {
  background: #ffffff !important;
  border-left-color: rgba(0, 0, 0, 0.1) !important;
  box-shadow: -8px 0 48px rgba(0, 0, 0, 0.12) !important;
}
html[data-theme="light"] #hctx-slider-overlay.open {
  background: rgba(0, 0, 0, 0.35) !important;
}
html[data-theme="light"] #hctx-slider-actions {
  border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}
/* Slider content area — catch-all for any text inside */
html[data-theme="light"] #hctx-slider-content {
  color: #334155 !important;
}
html[data-theme="light"] #hctx-slider-content::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12) !important;
}
/* Slider response text — override any inline styles from JS */
html[data-theme="light"] #hctx-slider-resp,
html[data-theme="light"] #hctx-slider-content .hctx-response,
html[data-theme="light"] #hctx-slider-content .hctx-slider-resp-text {
  color: #334155 !important;
}
html[data-theme="light"] #hctx-slider-resp strong,
html[data-theme="light"] #hctx-slider-content .hctx-response strong,
html[data-theme="light"] #hctx-slider-content .hctx-slider-resp-text strong {
  color: #0f172a !important;
}
html[data-theme="light"] #hctx-slider-resp em,
html[data-theme="light"] #hctx-slider-content .hctx-response em,
html[data-theme="light"] #hctx-slider-content .hctx-slider-resp-text em {
  color: #184A9E !important;
}
/* Slider follow-up row */
html[data-theme="light"] #hctx-slider-follow-row {
  border-top-color: rgba(0, 0, 0, 0.08) !important;
}
html[data-theme="light"] #hctx-slider-follow-input {
  background: rgba(0, 0, 0, 0.03) !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  color: #0f172a !important;
}
html[data-theme="light"] #hctx-slider-follow-input:focus {
  border-color: rgba(24, 74, 158, 0.5) !important;
}
html[data-theme="light"] #hctx-slider-follow-input::placeholder {
  color: #94a3b8 !important;
}
html[data-theme="light"] #hctx-slider-follow-btn {
  background: #184A9E !important;
  color: #ffffff !important;
}
html[data-theme="light"] #hctx-slider-follow-btn:hover {
  background: #0F3270 !important;
}
html[data-theme="light"] .hctx-spinner {
  border-color: rgba(24, 74, 158, 0.15) !important;
  border-top-color: #184A9E !important;
}

/* ── Briefing card ────────────────────────────────────────── */
html[data-theme="light"] .hctx-briefing {
  background: linear-gradient(135deg, rgba(24,74,158,0.04) 0%, rgba(15,50,112,0.02) 100%) !important;
  border-color: rgba(24, 74, 158, 0.18) !important;
}
html[data-theme="light"] .hctx-briefing-head {
  background: linear-gradient(90deg, rgba(24,74,158,0.1) 0%, rgba(24,74,158,0.03) 100%) !important;
  border-bottom-color: rgba(24, 74, 158, 0.12) !important;
}
html[data-theme="light"] .hctx-briefing-head-label {
  color: #184A9E !important;
}
html[data-theme="light"] .hctx-briefing-body {
  color: #334155 !important;
}
html[data-theme="light"] .hctx-briefing-body strong {
  color: #0f172a !important;
}
html[data-theme="light"] .hctx-briefing-body code {
  background: rgba(0, 0, 0, 0.06) !important;
  color: #334155 !important;
}
html[data-theme="light"] .hctx-briefing-body pre {
  background: rgba(0, 0, 0, 0.04) !important;
}
html[data-theme="light"] .hctx-briefing-loading {
  color: rgba(24, 74, 158, 0.6) !important;
}

/* ── Alert strip ──────────────────────────────────────────── */
html[data-theme="light"] .hctx-alert-strip {
  background: linear-gradient(90deg, rgba(245,158,11,0.08) 0%, rgba(245,158,11,0.02) 100%) !important;
  border-color: rgba(245, 158, 11, 0.2) !important;
}
html[data-theme="light"] .hctx-alert-title {
  color: #b45309 !important;
}
html[data-theme="light"] .hctx-alert-item {
  color: #92400e !important;
}
html[data-theme="light"] .hctx-alert-item::before {
  color: #b45309 !important;
}
html[data-theme="light"] .hctx-alert-item a {
  color: #b45309 !important;
}
html[data-theme="light"] .hctx-alert-item a:hover {
  color: #78350f !important;
}

/* ── Dispatch Notifications page ─────────────────────────── */
html[data-theme="light"] .notif-section-date {
  color: #94a3b8 !important;
}
html[data-theme="light"] .notif-card {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}
html[data-theme="light"] .notif-card:hover {
  background: #f8fafc !important;
  border-color: rgba(0, 0, 0, 0.14) !important;
}
html[data-theme="light"] .notif-card.unread {
  background: rgba(24, 74, 158, 0.04) !important;
  border-left-color: #184A9E !important;
}
html[data-theme="light"] .notif-title {
  color: #0f172a !important;
}
html[data-theme="light"] .notif-msg {
  color: #64748b !important;
}
html[data-theme="light"] .notif-time {
  color: #94a3b8 !important;
}
html[data-theme="light"] .filter-tab {
  color: #64748b !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
}
html[data-theme="light"] .filter-tab:hover {
  color: #0f172a !important;
}
html[data-theme="light"] .filter-tab.active {
  background: rgba(24, 74, 158, 0.08) !important;
  color: #184A9E !important;
  border-color: #184A9E !important;
}
html[data-theme="light"] .prefs-panel {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}
html[data-theme="light"] .prefs-title {
  color: #0f172a !important;
}
html[data-theme="light"] .prefs-subtitle {
  color: #64748b !important;
}
html[data-theme="light"] .prefs-row {
  border-bottom-color: rgba(0, 0, 0, 0.05) !important;
}
html[data-theme="light"] .prefs-row-label {
  color: #0f172a !important;
}
html[data-theme="light"] .prefs-row-desc {
  color: #94a3b8 !important;
}
html[data-theme="light"] .prefs-toggle-label {
  color: #64748b !important;
}
html[data-theme="light"] .track-pill.no-sent,
html[data-theme="light"] .track-pill.no-open,
html[data-theme="light"] .track-pill.no-click {
  background: rgba(0, 0, 0, 0.06) !important;
  color: #94a3b8 !important;
}
html[data-theme="light"] .email-track-label {
  color: #94a3b8 !important;
}
/* Sub-nav notification badge */
html[data-theme="light"] .sn-notif-sub-badge {
  background: #ef4444 !important;
}

/* ── Generic page-level light overrides ─────────────────── */

/* Toast notifications — hardcoded dark bg across many pages */
html[data-theme="light"] .toast {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1) !important;
  color: #334155 !important;
}
html[data-theme="light"] .toast.success {
  border-color: rgba(5, 150, 105, 0.3) !important;
}
html[data-theme="light"] .toast.error {
  border-color: rgba(220, 38, 38, 0.3) !important;
}

/* Select option backgrounds — hardcoded dark across pages */
html[data-theme="light"] select option,
html[data-theme="light"] .filter-select option,
html[data-theme="light"] .field select option {
  background: #ffffff !important;
  color: #0f172a !important;
}

/* Page-level modal overlays (non-sn-modal) */
html[data-theme="light"] .modal-overlay,
html[data-theme="light"] .cp-modal-overlay {
  background: rgba(0, 0, 0, 0.45) !important;
}

/* Common card / panel surfaces using var(--steel) */
html[data-theme="light"] body {
  background: var(--ink) !important;
  color: var(--cloud) !important;
}

/* ── Dispatch Board specific ─────────────────────────────── */
/* Kanban columns */
html[data-theme="light"] .col-header {
  background: #f1f5f9 !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}
html[data-theme="light"] .col-title {
  color: #1e293b !important;
}
html[data-theme="light"] .col-count {
  background: rgba(0, 0, 0, 0.08) !important;
  color: #64748b !important;
}
html[data-theme="light"] .col-body {
  background: rgba(0, 0, 0, 0.02) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}
html[data-theme="light"] .col-body.drag-over {
  background: rgba(24, 74, 158, 0.06) !important;
  border-color: rgba(24, 74, 158, 0.25) !important;
}
/* Ship cards */
html[data-theme="light"] .ship-card {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
}
html[data-theme="light"] .ship-card:hover {
  border-color: rgba(24, 74, 158, 0.25) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}
html[data-theme="light"] .card-ref { color: #1e293b !important; }
html[data-theme="light"] .card-lane { color: #475569 !important; }
html[data-theme="light"] .card-lane-arrow { color: #94a3b8 !important; }
/* Filters */
html[data-theme="light"] .filters-bar {
  background: transparent !important;
}
html[data-theme="light"] .filter-select,
html[data-theme="light"] .filter-input {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  color: #334155 !important;
}
html[data-theme="light"] .filter-select:focus,
html[data-theme="light"] .filter-input:focus {
  border-color: #184A9E !important;
}
html[data-theme="light"] .filter-input::placeholder {
  color: #94a3b8 !important;
}
html[data-theme="light"] .filter-sep {
  background: rgba(0, 0, 0, 0.1) !important;
}
html[data-theme="light"] .toggle-chip {
  border-color: rgba(0, 0, 0, 0.12) !important;
  background: rgba(0, 0, 0, 0.03) !important;
  color: #64748b !important;
}
html[data-theme="light"] .toggle-chip.active {
  background: rgba(24, 74, 158, 0.08) !important;
  border-color: rgba(24, 74, 158, 0.3) !important;
  color: #184A9E !important;
}
html[data-theme="light"] .stat-chip {
  border-color: rgba(0, 0, 0, 0.1) !important;
  background: rgba(0, 0, 0, 0.03) !important;
  color: #64748b !important;
}
html[data-theme="light"] .stat-chip:hover {
  border-color: rgba(0, 0, 0, 0.2) !important;
  color: #334155 !important;
}
html[data-theme="light"] .stat-chip.active {
  background: rgba(24, 74, 158, 0.08) !important;
  border-color: rgba(24, 74, 158, 0.3) !important;
  color: #184A9E !important;
}
html[data-theme="light"] .view-toggle {
  background: rgba(0, 0, 0, 0.04) !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
}
html[data-theme="light"] .view-btn { color: #64748b !important; }
html[data-theme="light"] .view-btn.active {
  background: rgba(24, 74, 158, 0.1) !important;
  color: #184A9E !important;
}
html[data-theme="light"] .view-btn:hover:not(.active) { color: #334155 !important; }
/* List view */
html[data-theme="light"] .ship-row {
  border-color: rgba(0, 0, 0, 0.05) !important;
}
html[data-theme="light"] .ship-row:hover {
  background: rgba(0, 0, 0, 0.02) !important;
}
html[data-theme="light"] .tag-agent,
html[data-theme="light"] .tag-status {
  color: #334155 !important;
}

/* ── Dispatch Shipment detail ────────────────────────────── */
html[data-theme="light"] .tabs {
  border-bottom-color: rgba(0, 0, 0, 0.1) !important;
}
html[data-theme="light"] .tab-btn {
  color: #64748b !important;
}
html[data-theme="light"] .tab-btn:hover {
  color: #0f172a !important;
}
html[data-theme="light"] .tab-btn.active {
  color: #0f172a !important;
  border-bottom-color: #184A9E !important;
}
html[data-theme="light"] .section {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}
html[data-theme="light"] .section-header {
  border-bottom-color: rgba(0, 0, 0, 0.07) !important;
  background: rgba(0, 0, 0, 0.015) !important;
}
html[data-theme="light"] .section-title { color: #1e293b !important; }
html[data-theme="light"] .section-sub   { color: #64748b !important; }
html[data-theme="light"] .field label   { color: #64748b !important; }
html[data-theme="light"] .field input,
html[data-theme="light"] .field select,
html[data-theme="light"] .field textarea {
  background: #f8fafc !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  color: #0f172a !important;
}
html[data-theme="light"] .field input:focus,
html[data-theme="light"] .field select:focus,
html[data-theme="light"] .field textarea:focus {
  border-color: #184A9E !important;
  background: #ffffff !important;
}
html[data-theme="light"] .btn {
  border-color: rgba(0, 0, 0, 0.12) !important;
  color: #64748b !important;
}
html[data-theme="light"] .btn:hover {
  background: rgba(0, 0, 0, 0.05) !important;
  color: #334155 !important;
  border-color: rgba(0, 0, 0, 0.2) !important;
}
html[data-theme="light"] .btn.primary {
  background: #184A9E !important;
  border-color: #184A9E !important;
  color: #fff !important;
}
html[data-theme="light"] .btn.primary:hover {
  background: #0F3270 !important;
}
html[data-theme="light"] .page-header-section {
  border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}

/* ── Dashboard specific ──────────────────────────────────── */
html[data-theme="light"] .kpi-card,
html[data-theme="light"] .stat-card,
html[data-theme="light"] .widget-card {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05) !important;
}
html[data-theme="light"] .section-hdr,
html[data-theme="light"] .section-title {
  color: #0f172a !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
}

/* ── Settlements / Finance pages ─────────────────────────── */
html[data-theme="light"] .settle-row,
html[data-theme="light"] .invoice-row {
  border-color: rgba(0, 0, 0, 0.05) !important;
}
html[data-theme="light"] .settle-row:hover,
html[data-theme="light"] .invoice-row:hover {
  background: rgba(0, 0, 0, 0.02) !important;
}

/* ── Carrier detail / list ───────────────────────────────── */
html[data-theme="light"] .carrier-card,
html[data-theme="light"] .carrier-row {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}
html[data-theme="light"] .carrier-card:hover,
html[data-theme="light"] .carrier-row:hover {
  border-color: rgba(24, 74, 158, 0.2) !important;
  background: #f8fafc !important;
}

/* ── Global search overlay ───────────────────────────────── */
html[data-theme="light"] .gs-overlay {
  background: rgba(0, 0, 0, 0.5) !important;
}
html[data-theme="light"] .gs-modal {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2) !important;
}
html[data-theme="light"] .gs-input {
  background: rgba(0, 0, 0, 0.04) !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  color: #0f172a !important;
}
html[data-theme="light"] .gs-input:focus {
  border-color: #184A9E !important;
}
html[data-theme="light"] .gs-result {
  color: #334155 !important;
}
html[data-theme="light"] .gs-result:hover {
  background: rgba(0, 0, 0, 0.04) !important;
}
html[data-theme="light"] .gs-result-title {
  color: #0f172a !important;
}
html[data-theme="light"] .gs-result-meta {
  color: #64748b !important;
}

/* ── Reports page ────────────────────────────────────────── */
html[data-theme="light"] .report-card {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}
html[data-theme="light"] .report-card:hover {
  border-color: rgba(24, 74, 158, 0.2) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

/* ── Common table patterns ───────────────────────────────── */
html[data-theme="light"] .data-table th {
  background: rgba(0, 0, 0, 0.03) !important;
  color: #64748b !important;
  border-color: rgba(0, 0, 0, 0.07) !important;
}
html[data-theme="light"] .data-table td {
  border-color: rgba(0, 0, 0, 0.05) !important;
  color: #334155 !important;
}
html[data-theme="light"] .data-table tr:hover td {
  background: rgba(0, 0, 0, 0.02) !important;
}

/* ── Common badge / pill ─────────────────────────────────── */
html[data-theme="light"] .status-pill,
html[data-theme="light"] .badge {
  /* status pills use var() colors already; only need border fixes */
  border-color: currentColor !important;
}

/* ── Page section containers ─────────────────────────────── */
html[data-theme="light"] .page-section,
html[data-theme="light"] .content-section {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.07) !important;
}

/* ── Side panels / drawers ───────────────────────────────── */
html[data-theme="light"] .side-panel,
html[data-theme="light"] .drawer {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1) !important;
}

/* ── Input focus rings ───────────────────────────────────── */
html[data-theme="light"] input:focus,
html[data-theme="light"] select:focus,
html[data-theme="light"] textarea:focus {
  outline-color: rgba(24, 74, 158, 0.4) !important;
  border-color: rgba(24, 74, 158, 0.5) !important;
}

/* ── Settlements page ──────────────────────────────────────────────── */
html[data-theme="light"] .filter-tab {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.12);
  color: #334155;
}
html[data-theme="light"] .filter-tab.active,
html[data-theme="light"] .filter-tab:hover {
  background: var(--signal);
  color: #fff;
  border-color: var(--signal);
}
html[data-theme="light"] .search-input {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.12);
  color: #0f172a;
}
html[data-theme="light"] .table-wrap {
  border-color: rgba(0,0,0,0.08);
}
html[data-theme="light"] .table-wrap table thead th,
html[data-theme="light"] .data-table thead th {
  border-bottom-color: rgba(0,0,0,0.12);
  color: #64748b;
}
html[data-theme="light"] .table-wrap table tbody tr,
html[data-theme="light"] .data-table tbody tr {
  border-bottom-color: rgba(0,0,0,0.06);
}
html[data-theme="light"] .settle-detail-row,
html[data-theme="light"] .settle-detail-row td {
  background: rgba(0,0,0,0.02);
  border-color: rgba(0,0,0,0.06);
}

/* ── Page tabs & pills ─────────────────────────────────────────────── */
html[data-theme="light"] .tab-bar,
html[data-theme="light"] .sub-nav {
  border-bottom-color: rgba(0,0,0,0.12);
}
html[data-theme="light"] .pill-btn,
html[data-theme="light"] .chip-btn {
  background: rgba(0,0,0,0.05);
  border-color: rgba(0,0,0,0.12);
  color: #334155;
}
html[data-theme="light"] .pill-btn.active,
html[data-theme="light"] .chip-btn.active {
  background: var(--signal);
  color: #fff;
}

/* ── Carrier list & detail ──────────────────────────────────────────── */
html[data-theme="light"] .carrier-header {
  border-bottom-color: rgba(0,0,0,0.12);
}
html[data-theme="light"] .carrier-tabs .tab-btn {
  border-bottom-color: transparent;
  color: #64748b;
}
html[data-theme="light"] .carrier-tabs .tab-btn.active {
  border-bottom-color: var(--signal);
  color: #0f172a;
}
html[data-theme="light"] .compliance-badge,
html[data-theme="light"] .status-badge {
  border-color: rgba(0,0,0,0.08);
}
html[data-theme="light"] .carrier-stat-box {
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.08);
}

/* ── Reports page ─────────────────────────────────────────────────── */
html[data-theme="light"] .report-grid .report-card {
  background: #fff;
  border-color: rgba(0,0,0,0.10);
}
html[data-theme="light"] .report-card:hover {
  border-color: var(--signal);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
html[data-theme="light"] .report-card .card-title {
  color: #0f172a;
}
html[data-theme="light"] .report-card .card-desc {
  color: #64748b;
}
html[data-theme="light"] .report-preview-wrap {
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.08);
}

/* ── Invoices / finance modals ──────────────────────────────────────── */
html[data-theme="light"] .invoice-detail-wrap,
html[data-theme="light"] .settle-modal-body {
  background: #fff;
  border-color: rgba(0,0,0,0.08);
}
html[data-theme="light"] .line-item-row {
  border-bottom-color: rgba(0,0,0,0.06);
}
html[data-theme="light"] .line-item-row td {
  color: #334155;
}
html[data-theme="light"] .amount-cell {
  color: #0f172a;
}
html[data-theme="light"] .total-row {
  border-top-color: rgba(0,0,0,0.12);
  font-weight: 600;
}

/* ── Miscellaneous shared elements ─────────────────────────────────── */
html[data-theme="light"] .tag,
html[data-theme="light"] .label-tag {
  background: rgba(0,0,0,0.06);
  color: #334155;
}
html[data-theme="light"] .divider,
html[data-theme="light"] hr {
  border-color: rgba(0,0,0,0.10);
}
html[data-theme="light"] .empty-state {
  color: #94a3b8;
}
html[data-theme="light"] .empty-state .icon {
  opacity: 0.35;
}
html[data-theme="light"] .pagination-btn {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.10);
  color: #334155;
}
html[data-theme="light"] .pagination-btn:hover,
html[data-theme="light"] .pagination-btn.active {
  background: var(--signal);
  color: #fff;
  border-color: var(--signal);
}
html[data-theme="light"] .dropdown-menu,
html[data-theme="light"] .context-menu {
  background: #fff;
  border-color: rgba(0,0,0,0.12);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}
html[data-theme="light"] .dropdown-menu li:hover,
html[data-theme="light"] .context-menu li:hover {
  background: rgba(0,0,0,0.05);
}
html[data-theme="light"] .accordion-header {
  border-bottom-color: rgba(0,0,0,0.10);
  color: #0f172a;
}
html[data-theme="light"] .accordion-body {
  border-bottom-color: rgba(0,0,0,0.06);
  background: rgba(0,0,0,0.01);
}
html[data-theme="light"] .alert-banner {
  border-left-color: var(--signal);
  background: rgba(0,112,243,0.06);
  color: #334155;
}
html[data-theme="light"] .code-block,
html[data-theme="light"] pre {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.10);
  color: #334155;
}
