/* More menu and compact help copy alignment */
.more-item{align-items:center;gap:12px;min-height:66px}
.more-text{display:flex;flex:1 1 auto;min-width:0;flex-direction:column;align-items:flex-start;justify-content:center;gap:3px;text-align:left}
.more-title{display:block;width:100%;line-height:18px;font-size:12px;font-weight:700}
.more-desc{display:block;width:100%;margin:0;font-size:10px;line-height:14px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.more-icon{width:34px;height:34px;flex:0 0 34px}
.more-item>.chevron{flex:0 0 auto;margin-left:2px}
.mini-copy{min-width:0}
.mini-copy .mini-sub{white-space:normal;line-height:1.4}
.help-copy{font-size:10px;line-height:1.45;color:var(--muted)}
.help-panel .section-title{margin-bottom:8px}
@media(max-width:350px){.more-item{gap:9px;padding:11px}.more-title{font-size:11px}.more-desc{font-size:9px}}

/* Hide scrollbar visuals while preserving native scrolling. */
.view-scroll,.modal-sheet,.filter-row{scrollbar-width:none!important;-ms-overflow-style:none!important}
.view-scroll::-webkit-scrollbar,.modal-sheet::-webkit-scrollbar,.filter-row::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}

/* Compliance filters: compact 40px fields across both rows. */
.compliance-filters{align-items:stretch!important;grid-auto-rows:40px!important}
.compliance-filters>select,.compliance-filters>label{height:40px!important;min-height:40px!important;max-height:40px!important;box-sizing:border-box!important}
.compliance-filters>select{padding:6px 9px!important}
.compliance-filters>label{padding:6px 9px!important;overflow:hidden!important}
.compliance-filters>label input[type=date]{height:24px!important;min-height:0!important;width:65%!important;max-width:65%!important;margin:0!important;padding:0!important;font-size:12px!important;line-height:1.2!important;box-sizing:border-box!important}
.compliance-filters>label select{height:calc(100% - 8px)!important;min-height:0!important;max-height:calc(100% - 8px)!important;margin:4px 4px 4px 0!important;padding:0 8px!important;font-size:12px!important;line-height:1.2!important;box-sizing:border-box!important}
.compliance-filters .compliance-date-trigger{width:65%!important;max-width:65%!important;height:26px!important;min-width:0!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;color:#263746!important;font-size:12px!important;line-height:1.2!important;text-align:right!important;cursor:pointer!important;box-shadow:none!important}
.calendar-backdrop{position:absolute;inset:0;z-index:30;display:flex;align-items:center;justify-content:center;padding:12px;background:rgba(17,32,43,.22)}
.calendar-panel{width:min(292px,100%);max-width:100%;padding:14px;background:#fff;border:1px solid #dedad4;border-radius:16px;box-shadow:0 14px 38px rgba(20,30,40,.22);color:#172533}
.calendar-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.calendar-head strong{font-size:14px;font-weight:750}
.calendar-nav{width:32px;height:32px;border:1px solid #e4e0da;border-radius:9px;background:#fff;color:#263746;font-size:22px;line-height:1;cursor:pointer}
.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;text-align:center}
.calendar-weekdays{margin-bottom:5px;color:#7b858e;font-size:10px;font-weight:700}
.calendar-weekdays span{padding:5px 0}
.calendar-day{height:31px;min-width:0;border:0;border-radius:8px;background:transparent;color:#263746;font-size:11px;cursor:pointer}
.calendar-day.today{box-shadow:inset 0 0 0 1px #9aafc0}
.calendar-day.selected{background:#17324a;color:#fff;font-weight:700}
.calendar-empty{height:31px}
.calendar-foot{display:flex;justify-content:space-between;align-items:center;margin-top:12px;padding-top:10px;border-top:1px solid #ece8e3}
.calendar-clear,.calendar-done{border:0;background:transparent;color:#17324a;font-size:11px;font-weight:700;padding:7px 9px;cursor:pointer}
.calendar-done{background:#17324a;color:#fff;border-radius:8px}
.dark-mode .calendar-panel{background:#1b2b34;border-color:#3a4b55;color:#e7eef2}
.dark-mode .calendar-nav{background:#1b2b34;border-color:#3a4b55;color:#e7eef2}
.dark-mode .calendar-day{color:#e7eef2}
.dark-mode .calendar-day.selected{background:#f8a21f;color:#172533}
.dark-mode .compliance-filters .compliance-date-trigger{color:#e7eef2!important}
/* FleetFlow central dropdown system: shared trigger, anchored flyout and frame-aware placement. */
.ff-select-host{position:relative;display:block;min-width:0;max-width:100%;height:100%}
.ff-native-select{position:absolute!important;width:1px!important;height:1px!important;min-height:1px!important;padding:0!important;margin:0!important;opacity:0!important;pointer-events:none!important;overflow:hidden!important;clip-path:inset(50%)!important}
.ff-select-trigger{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;margin:0!important;padding:0 12px!important;border:1px solid #dedad4!important;border-radius:10px!important;background:#fff!important;color:#263746!important;font:inherit!important;font-size:13px!important;line-height:1.2!important;text-align:left!important;white-space:nowrap!important;overflow:hidden!important;box-shadow:0 1px 2px rgba(20,30,40,.04)!important}
.ff-select-trigger:focus-visible,.ff-select-trigger[aria-expanded="true"]{outline:2px solid #8bb1ff!important;outline-offset:1px!important;border-color:#8bb1ff!important}
.ff-select-trigger>span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis}
.ff-select-chevron{flex:0 0 auto;color:#536575;font-size:17px;line-height:1;transform:translateY(-2px)}
.ff-dropdown-menu{position:absolute;z-index:60;display:grid;gap:2px;overflow-y:auto;overscroll-behavior:contain;padding:5px;border:1px solid #dedad4;border-radius:12px;background:#fff;box-shadow:0 12px 32px rgba(18,35,48,.18);scrollbar-width:thin;scrollbar-color:#cbd4dc transparent}
.ff-dropdown-option{display:flex;align-items:center;width:100%;min-height:38px;padding:8px 10px;border:0;border-radius:8px;background:transparent;color:#263746;font-size:12px;line-height:1.25;text-align:left;white-space:normal;overflow-wrap:anywhere}
.ff-dropdown-option:hover,.ff-dropdown-option:focus-visible{background:#f1f4f6;outline:0}
.ff-dropdown-option.selected{background:#edf2f5;color:#17324a;font-weight:700}
.ff-dropdown-option:disabled{opacity:.45;cursor:not-allowed}
.compliance-filters>.ff-select-host{height:40px;min-height:40px;width:100%}
.compliance-filters>label{padding:0 9px!important}
.compliance-filters>label{display:flex!important;justify-content:stretch!important;gap:8px!important;width:100%!important;min-width:0!important;box-sizing:border-box!important;padding:0 1px 0 9px!important}
.compliance-filters>label>.ff-select-host{width:auto!important;height:calc(100% - 4px)!important;min-height:0!important;min-width:0;flex:1 1 0!important;margin:2px 0!important}
.compliance-filters>label>.ff-select-host .ff-select-trigger{width:100%!important;height:100%!important;box-sizing:border-box!important}

/* Persistent page actions and account controls */
#viewScroll{padding-bottom:112px!important}
#floatingActionRoot{position:absolute;z-index:5;right:16px;bottom:calc(78px + env(safe-area-inset-bottom) + 8px);display:flex;justify-content:flex-end;align-items:center;pointer-events:none}
#floatingActionRoot .primary-btn{pointer-events:auto;min-height:48px;padding:0 20px;border-radius:16px;background:#17324a;color:#fff;font-size:14px;font-weight:700;box-shadow:0 8px 22px rgba(15,35,52,.22);display:inline-flex;align-items:center;gap:9px}
#floatingActionRoot .primary-btn svg{width:18px;height:18px}
.ref-heading,.page-heading{align-items:flex-start!important;gap:10px!important;min-height:66px!important}.ref-heading-actions{align-self:flex-start!important;margin-top:0!important}.ref-heading>div:first-child,.page-heading>div:first-child{min-width:0;flex:1 1 auto}
.ref-heading-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex:0 0 auto}
.ref-alert-button{position:relative;width:34px;height:40px;border:0;background:transparent;color:#536474;display:grid;place-items:center;padding:0}
.ref-alert-button svg{display:block;width:25px;height:25px}
.ref-alert-button i{position:absolute;width:7px;height:7px;border-radius:50%;background:#df665f;right:4px;top:6px;border:1px solid var(--canvas)}
.ref-heading-actions .ref-avatar{border:0;cursor:pointer;width:39px;height:39px;flex:0 0 39px}
.page-heading .ref-heading-actions{margin-left:auto}
@media(max-width:350px){#floatingActionRoot{right:12px}#floatingActionRoot .primary-btn{min-height:44px;padding:0 15px;font-size:12px}.ref-heading-actions{gap:7px}.ref-heading-actions .ref-avatar{width:34px;height:34px;flex-basis:34px}}

/* Home screen header: place alerts and profile beside the page title. */
.app-root .app-header{display:none!important}
.app-root.home-screen .view-scroll{padding-top:calc(18px + env(safe-area-inset-top))!important}
.ref-heading-actions{display:flex;align-items:center;gap:14px;flex:0 0 auto}
.ref-alert-button{position:relative;width:34px;height:40px;border:0;background:transparent;color:#536474;display:grid;place-items:center;padding:0}
.ref-alert-button svg{display:block;width:26px;height:26px}
.ref-alert-button i{position:absolute;width:7px;height:7px;border-radius:50%;background:#df665f;right:4px;top:6px;border:1px solid var(--canvas)}
.ref-heading-actions .ref-avatar{width:39px;height:39px;flex:0 0 39px}
.app-root.home-screen .view-scroll{padding-top:calc(18px + env(safe-area-inset-top))!important}
.ref-heading-actions{display:flex;align-items:center;gap:14px;flex:0 0 auto}
.ref-alert-button{position:relative;width:34px;height:40px;border:0;background:transparent;color:#536474;display:grid;place-items:center;padding:0}
.ref-alert-button svg{display:block;width:26px;height:26px}
.ref-alert-button i{position:absolute;width:7px;height:7px;border-radius:50%;background:#df665f;right:4px;top:6px;border:1px solid var(--canvas)}
.ref-heading-actions .ref-avatar{width:39px;height:39px;flex:0 0 39px}

/* Home dashboard metric cards: icon, value and label share one left edge. */
.ref-stats>.ref-stat{min-height:112px!important;box-sizing:border-box!important;padding:16px!important;display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:center!important;gap:0!important;text-align:left!important}
.ref-stats>.ref-stat>svg{display:block!important;width:20px!important;height:20px!important;min-width:20px!important;min-height:20px!important;max-width:20px!important;max-height:20px!important;flex:0 0 20px!important;object-fit:contain!important;transform:none!important;margin:0 0 12px!important;align-self:flex-start!important}
.ref-stats>.ref-stat>b{display:block!important;align-self:flex-start!important;margin:0!important;line-height:1.05!important;text-align:left!important}
.ref-stats>.ref-stat>span{display:block!important;align-self:flex-start!important;margin:5px 0 0!important;line-height:1.3!important;text-align:left!important}
.compliance-filters>.ff-select-host .ff-select-trigger{font-size:13px!important;padding:0 9px!important}
.compliance-filters>label>.ff-select-host .ff-select-trigger{font-size:14px!important;padding:0 8px!important}
.form-field>.ff-select-host{width:100%;height:48px}
#sortVehicles+.ff-select-host{height:34px;width:150px}
.dark-mode .ff-select-trigger,.dark-mode .ff-dropdown-menu{background:#1b2b34!important;border-color:#3a4b55!important;color:#e7eef2!important}
.dark-mode .ff-select-chevron,.dark-mode .ff-dropdown-option{color:#e7eef2}
.dark-mode .ff-dropdown-option:hover,.dark-mode .ff-dropdown-option:focus-visible,.dark-mode .ff-dropdown-option.selected{background:#293d49;color:#fff}

/* Keep the Home heading on the same top rail as every other screen. */
.app-root .view-scroll{padding-top:18px!important}
.app-root.home-screen .view-scroll{padding-top:18px!important}
.app-root .ref-heading,.app-root .page-heading{min-height:66px!important;margin:3px 0 20px!important;align-items:flex-start!important;justify-content:space-between!important}
.app-root .ref-heading-actions{height:40px!important;min-height:40px!important;align-self:flex-start!important;margin:0 0 0 auto!important;gap:12px!important}
.app-root .ref-heading-actions .ref-alert-button{width:34px!important;height:40px!important;flex:0 0 34px!important}
.app-root .ref-heading-actions .ref-avatar{width:39px!important;height:39px!important;flex:0 0 39px!important}

/* Dark appearance: restore clear contrast and a distinct active bottom-navigation item. */
.dark-mode .bottom-nav{background:#1b2b34!important;border-top:1px solid #2a3a43!important}
.dark-mode .bottom-nav .nav-item{color:#a7b5be!important;background:transparent!important;border-radius:12px!important}
.dark-mode .bottom-nav .nav-item svg{color:inherit!important;stroke:currentColor!important}
.dark-mode .bottom-nav .nav-item.active{color:#f8a21f!important;background:#293d49!important;font-weight:650!important}
.dark-mode .bottom-nav .nav-item.active svg{color:#f8a21f!important;stroke:currentColor!important}
.dark-mode .bottom-nav .nav-item:focus-visible{outline:2px solid #f8a21f!important;outline-offset:-3px!important}

/* Dark-mode accessibility pass: replace light-theme hard-coded text colours across every workspace view. */
.dark-mode{
  --color-text-primary:#e7eef2;
  --color-text-secondary:#b7c4cc;
  --color-text-tertiary:#9aabb5;
  --color-border:#354751;
  --color-divider:#30414b;
  --brand-soft:#293d49;
}
.dark-mode .ref-page,
.dark-mode .ref-page .page-title,
.dark-mode .ref-page h1,
.dark-mode .ref-page h2,
.dark-mode .ref-page h3,
.dark-mode .ref-page .ref-section-head b,
.dark-mode .ref-page .ref-stat b,
.dark-mode .ref-page .ref-stat strong,
.dark-mode .ref-page .ref-card strong,
.dark-mode .ref-page .ref-card b,
.dark-mode .ref-page .ref-between b,
.dark-mode .ref-page .ref-client-road,
.dark-mode .ref-page .vehicle-meta,
.dark-mode .ref-page .ref-stop,
.dark-mode .ref-page .ref-alert-main strong,
.dark-mode .ref-page .compliance-meta b,
.dark-mode .ref-page .field-value,
.dark-mode .ref-page .document-card-title{
  color:#e7eef2!important;
}
.dark-mode .ref-page .eyebrow,
.dark-mode .ref-page .page-subtitle,
.dark-mode .ref-page p,
.dark-mode .ref-page small,
.dark-mode .ref-page .ref-stat span,
.dark-mode .ref-page .ref-card p,
.dark-mode .ref-page .ref-between small,
.dark-mode .ref-page .ref-client-road svg,
.dark-mode .ref-page .ref-next,
.dark-mode .ref-page .vehicle-card>p,
.dark-mode .ref-page .vehicle-meta svg,
.dark-mode .ref-page .ref-alert-main p,
.dark-mode .ref-page .ref-between,
.dark-mode .ref-page .record-meta,
.dark-mode .ref-page .field-label,
.dark-mode .ref-page .mini-sub,
.dark-mode .ref-page .mini-time,
.dark-mode .ref-page .compliance-card p,
.dark-mode .ref-page .compliance-association,
.dark-mode .ref-page .compliance-meta small,
.dark-mode .ref-page .document-card-meta,
.dark-mode .ref-page .document-summary-grid small,
.dark-mode .ref-page .legend-row,
.dark-mode .ref-page .donut-center span{
  color:#b7c4cc!important;
}
.dark-mode .ref-page .ref-heading .eyebrow,
.dark-mode .ref-page>.eyebrow,
.dark-mode .ref-page .client-detail-page>.eyebrow{
  color:#b7c4cc!important;
}
.dark-mode .ref-page .ref-section-head button,
.dark-mode .ref-page .client-back,
.dark-mode .ref-page .text-link,
.dark-mode .ref-page .ref-page-link{
  color:#f8b84e!important;
}
.dark-mode .ref-page .ref-card,
.dark-mode .ref-page .ref-stat,
.dark-mode .ref-page .document-card,
.dark-mode .ref-page .compliance-card,
.dark-mode .ref-page .compliance-upcoming,
.dark-mode .ref-page .ref-check-card{
  background:#1b2b34!important;
  border-color:#354751!important;
  color:#e7eef2!important;
}
.dark-mode .ref-page .ref-stat svg,
.dark-mode .ref-page .ref-section-head button svg,
.dark-mode .ref-page .ref-next svg{
  color:#b7c4cc;
}
.dark-mode .ref-page .ref-risk,
.dark-mode .ref-page .compliance-status{
  background:#293d49!important;
}
.dark-mode .ref-page .ref-risk.status-current,
.dark-mode .ref-page .compliance-status.status-current{color:#75d6a1!important}
.dark-mode .ref-page .ref-risk.status-attention,
.dark-mode .ref-page .compliance-status.status-attention{color:#ffc66d!important}
.dark-mode .ref-page .ref-risk.status-action,
.dark-mode .ref-page .compliance-status.status-action{color:#ff8f8f!important}
.dark-mode .ref-page .compliance-status.status-pending{color:#c0d0da!important}
.dark-mode .ref-page .ref-status.moving{color:#75d6a1!important}
.dark-mode .ref-page .ref-status.idle{color:#c0d0da!important}
.dark-mode .ref-page .ref-status.service{color:#ffc66d!important}
.dark-mode .ref-page .ref-status.offline{color:#ff8f8f!important}
.dark-mode .ref-page .ref-risk:before{box-shadow:0 0 0 2px #1b2b34}
.dark-mode .ref-page .ref-map-between,
.dark-mode .ref-page .ref-map .ref-between{color:#c0ccd3!important}
.dark-mode .ref-page .ref-stop i{border-color:#f8b84e!important;background:#1b2b34!important}
.dark-mode .ref-page .ref-stop.destination i{background:#f8b84e!important}
.dark-mode .ref-page .ref-map{filter:brightness(.78) saturate(.82)}
.dark-mode .ref-page .ref-progress{background:#40525d!important}
.dark-mode .ref-page .ref-progress i{background:#f8a21f!important}
.dark-mode .ref-page .ref-alert-dot{box-shadow:0 0 0 5px #293d49}
.dark-mode .ref-page .ref-alert-dot.critical{box-shadow:0 0 0 5px #492e35}
.dark-mode .ref-page .ref-page .filter-chip,
.dark-mode .ref-page .filter-chip{
  background:#243640!important;
  border-color:#40545f!important;
  color:#c7d2d9!important;
}
.dark-mode .ref-page .filter-chip.active{
  background:#f8a21f!important;
  border-color:#f8a21f!important;
  color:#172533!important;
}
.dark-mode .ref-page input,
.dark-mode .ref-page select,
.dark-mode .ref-page textarea,
.dark-mode .ref-page .search-wrap,
.dark-mode .ref-page .form-field input,
.dark-mode .ref-page .form-field select,
.dark-mode .ref-page .form-field textarea{
  background:#172831!important;
  border-color:#40545f!important;
  color:#e7eef2!important;
}
.dark-mode .ref-page input::placeholder,
.dark-mode .ref-page textarea::placeholder{
  color:#9aabb5!important;
  opacity:1;
}
.dark-mode .ref-page .secondary-btn,
.dark-mode .ref-page .small-action,
.dark-mode .ref-page .quick-action{
  background:#243640!important;
  border-color:#40545f!important;
  color:#e7eef2!important;
}
.dark-mode .ref-page .primary-btn{
  background:#f8a21f!important;
  color:#172533!important;
}
.dark-mode .ref-page .document-expiry-pill.expired{background:#492e35!important;color:#ffaaa5!important}
.dark-mode .ref-page .document-expiry-pill.expiring{background:#493a26!important;color:#ffd18a!important}
.dark-mode .ref-page .document-expiry-pill.valid{background:#1e4437!important;color:#8be0b1!important}
.dark-mode .ref-page .document-summary-grid .document-expired b{color:#ffaaa5!important}
.dark-mode .ref-page .document-summary-grid .document-expiring b{color:#ffd18a!important}
.dark-mode .ref-page .empty-state,
.dark-mode .ref-page .empty-icon,
.dark-mode .ref-page .more-icon,
.dark-mode .ref-page .stat-icon,
.dark-mode .ref-page .mini-icon{
  background:#243640!important;
  border-color:#40545f!important;
  color:#c0d0da!important;
}
.dark-mode .ref-page .note-banner{
  background:#243b45!important;
  color:#c0d0da!important;
}
.dark-mode .ref-page .calendar-panel,
.dark-mode .ref-page .modal-sheet{
  background:#1b2b34!important;
  border-color:#40545f!important;
  color:#e7eef2!important;
}
.dark-mode .ref-page .calendar-weekdays,
.dark-mode .ref-page .calendar-day,
.dark-mode .ref-page .calendar-nav,
.dark-mode .ref-page .calendar-clear{
  color:#c0d0da!important;
}
.dark-mode .ref-page .calendar-day.selected,
.dark-mode .ref-page .calendar-done{
  background:#f8a21f!important;
  color:#172533!important;
}
.dark-mode .ref-page .legend-row b,
.dark-mode .ref-page .donut-center strong{
  color:#e7eef2!important;
}
.dark-mode .ref-page .record-grid,
.dark-mode .ref-page .record-footer,
.dark-mode .ref-page .compliance-meta{
  border-color:#354751!important;
}
.dark-mode .ref-page .toast{color:#fff!important}
.dark-mode .ref-page a{color:#f8b84e}

/* Final theme cascade: semantic status tokens take precedence over legacy per-screen colours. */
.dark-mode .ref-page .ref-status.moving,
.dark-mode .ref-page .compliance-status.status-current,
.dark-mode .ref-page .document-expiry-pill.valid{color:var(--status-success-text)!important;background:var(--status-success-bg)!important}
.dark-mode .ref-page .ref-status.service,
.dark-mode .ref-page .compliance-status.status-attention,
.dark-mode .ref-page .document-expiry-pill.expiring{color:var(--status-warning-text)!important;background:var(--status-warning-bg)!important}
.dark-mode .ref-page .ref-status.idle,
.dark-mode .ref-page .ref-status.offline,
.dark-mode .ref-page .compliance-status.status-pending{color:var(--status-neutral-text)!important;background:var(--status-neutral-bg)!important}
.dark-mode .ref-page .compliance-status.status-action,
.dark-mode .ref-page .document-expiry-pill.expired{color:var(--status-danger-text)!important;background:var(--status-danger-bg)!important}
.dark-mode .ref-page .document-summary-grid .document-expired b{color:var(--status-danger-text)!important}
.dark-mode .ref-page .document-summary-grid .document-expiring b{color:var(--status-warning-text)!important}

/* Alert severity and dashboard status visuals use the same semantic status tokens. */
.alert-severity{background:var(--status-warning-bg)!important;color:var(--status-warning-text)!important}
.alert-severity.high,.alert-severity.critical{background:var(--status-danger-bg)!important;color:var(--status-danger-text)!important}
.dark-mode .alert-severity{background:var(--status-warning-bg)!important;color:var(--status-warning-text)!important}
.dark-mode .alert-severity.high,.dark-mode .alert-severity.critical{background:var(--status-danger-bg)!important;color:var(--status-danger-text)!important}
.ref-risk.status-current{color:var(--status-success-text)!important;background:var(--status-success-bg)!important}
.ref-risk.status-attention{color:var(--status-warning-text)!important;background:var(--status-warning-bg)!important}
.ref-risk.status-action{color:var(--status-danger-text)!important;background:var(--status-danger-bg)!important}
.compliance-status.status-current,.compliance-status.status-attention,.compliance-status.status-action,.compliance-status.status-pending{border:1px solid transparent!important}
.dark-mode .ref-page button:focus-visible,
.dark-mode .ref-page a:focus-visible,
.dark-mode .ref-page input:focus-visible,
.dark-mode .ref-page select:focus-visible,
.dark-mode .ref-page textarea:focus-visible{
  outline:2px solid #f8b84e!important;
  outline-offset:2px;
}

/* Settings preference cards use a full-card switch control, never a native checkbox. */
.setting-card{appearance:none;-webkit-appearance:none;cursor:pointer;min-height:76px!important;padding:14px!important;border:1px solid var(--line)!important;border-radius:18px!important;background:#fff!important;transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease}
.setting-card:focus-visible{outline:3px solid rgba(56,105,212,.28);outline-offset:2px;border-color:#3869d4!important}
.setting-card:active{transform:scale(.995)}
.setting-switch{position:relative;display:inline-flex;align-items:center;justify-content:flex-start;flex:0 0 46px;width:46px;height:27px;padding:3px;border-radius:999px;background:#d9dee1;transition:background .18s ease}
.setting-switch-thumb{display:block;width:21px;height:21px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(15,35,52,.2);transform:translateX(0);transition:transform .18s ease}
.setting-switch.is-on{background:#19364d}
.setting-switch.is-on .setting-switch-thumb{transform:translateX(19px)}
.dark-mode .setting-card{background:#1b2b34!important;border-color:#2a3a43!important;color:#e7eef2!important}
.dark-mode .setting-switch{background:#46545c}
.dark-mode .setting-switch.is-on{background:#f8a21f}
.dark-mode .setting-switch-thumb{background:#fff}