/**
 * public/css/tokens-daylight.css
 * VCSO Daylight Editorial Design System (Layer 1, 2 & 4: Tokens, Surfaces, Typography & 60fps Motion)
 * Zero neon, zero dark-cyber default, WCAG AA/AAA verified contrast, <= 500 lines.
 */
@font-face {
  font-family: 'SVN-Be Vietnam Pro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/be-vietnam-pro/be-vietnam-pro-vietnamese-400-normal.woff2') format('woff2'),
       url('../fonts/be-vietnam-pro/be-vietnam-pro-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'SVN-Be Vietnam Pro';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/be-vietnam-pro/be-vietnam-pro-vietnamese-500-normal.woff2') format('woff2'),
       url('../fonts/be-vietnam-pro/be-vietnam-pro-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'SVN-Be Vietnam Pro';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/be-vietnam-pro/be-vietnam-pro-vietnamese-600-normal.woff2') format('woff2'),
       url('../fonts/be-vietnam-pro/be-vietnam-pro-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'SVN-Be Vietnam Pro';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/be-vietnam-pro/be-vietnam-pro-vietnamese-700-normal.woff2') format('woff2'),
       url('../fonts/be-vietnam-pro/be-vietnam-pro-latin-700-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'SVN-Be Vietnam Pro';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/be-vietnam-pro/be-vietnam-pro-vietnamese-800-normal.woff2') format('woff2'),
       url('../fonts/be-vietnam-pro/be-vietnam-pro-latin-800-normal.woff2') format('woff2');
}

:root {
  /* Surface Hierarchy: Warm Daylight Stone & Crisp Paper */
  --vcso-canvas: #F6F7F4;
  --vcso-surface: #FFFFFF;
  --vcso-surface-subtle: #F8FAFC;
  --vcso-surface-muted: #EEF1EE;
  --vcso-surface-tint: #F0FDFA;

  /* Borders & Hairlines */
  --vcso-border: #E4E7EC;
  --vcso-border-strong: #CBD5E1;
  --vcso-border-brand: #99F6E4;

  /* Typography Ink (WCAG AAA >= 7:1 on #FFFFFF and #F6F7F4) */
  --vcso-ink: #101828;
  --vcso-ink-secondary: #344054;
  --vcso-ink-muted: #475467;

  /* Brand Accent: Deep Emerald Teal (#0F766E -> 5.47:1 with #FFFFFF) */
  --vcso-brand: #0F766E;
  --vcso-brand-hover: #115E59;
  --vcso-brand-soft: #CCFBF1;
  --vcso-brand-ink: #134E4A;

  /* Semantic Status Tokens (Calm Pastels + Deep Readable Ink >= 7:1) */
  --vcso-safe-bg: #ECFDF5;
  --vcso-safe-border: #A7F3D0;
  --vcso-safe-ink: #065F46;

  --vcso-warn-bg: #FFFBEB;
  --vcso-warn-border: #FDE68A;
  --vcso-warn-ink: #92400E;

  --vcso-danger-bg: #FEF2F2;
  --vcso-danger-border: #FECACA;
  --vcso-danger-ink: #991B1B;

  --vcso-info-bg: #F0F9FF;
  --vcso-info-border: #BAE6FD;
  --vcso-info-ink: #075985;

  /* Natural Ambient Elevation (Zero Neon Glow) */
  --vcso-shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.04);
  --vcso-shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
  --vcso-shadow-md: 0 8px 20px -4px rgba(16, 24, 40, 0.08), 0 2px 6px -2px rgba(16, 24, 40, 0.04);
  --vcso-shadow-sheet: 0 20px 44px -10px rgba(16, 24, 40, 0.16), 0 4px 12px -2px rgba(16, 24, 40, 0.06);

  /* Radii & Motion Easings */
  --vcso-radius-sm: 8px;
  --vcso-radius-md: 10px;
  --vcso-radius-lg: 14px;
  --vcso-radius-xl: 18px;
  --vcso-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

body.vcso-slim-3tab-active {
  background: var(--vcso-canvas) !important;
  color: var(--vcso-ink) !important;
}

#vcsoSlim3TabRoot {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--vcso-canvas);
  color: var(--vcso-ink);
  overflow-y: auto;
  font-family: 'SVN-Be Vietnam Pro', 'Inter', 'Segoe UI', Roboto, -apple-system, sans-serif;
  font-size: 15.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.vcso-slim-container {
  max-width: 1020px;
  margin: 0 auto;
  padding: 20px 18px 44px;
  box-sizing: border-box;
}

/* Typography Scale */
.vcso-fs-14 { font-size: 14px !important; line-height: 1.5; }
.vcso-fs-16 { font-size: 15.5px !important; line-height: 1.55; }
.vcso-fs-20 { font-size: 18.5px !important; font-weight: 700; letter-spacing: -0.015em; line-height: 1.35; }
.vcso-fs-24 { font-size: 22px !important; font-weight: 800; letter-spacing: -0.02em; line-height: 1.28; }
.vcso-tabular { font-variant-numeric: tabular-nums; }

/* SVG Icon Alignment */
.vcso-ico {
  display: inline-block;
  vertical-align: -0.18em;
  flex-shrink: 0;
}

/* Focus Ring (WCAG 2.2 AA) */
#vcsoSlim3TabRoot :focus-visible,
#vcsoV19DrawerOverlay :focus-visible,
#vcsoAuthGateOverlay :focus-visible {
  outline: 2px solid var(--vcso-brand);
  outline-offset: 2px;
}

/* Header Bar */
.vcso-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 18px;
  background: var(--vcso-surface);
  border: 1px solid var(--vcso-border);
  border-radius: var(--vcso-radius-lg);
  box-shadow: var(--vcso-shadow-xs);
  margin-bottom: 16px;
}

.vcso-brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vcso-header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* Interactive Controls & Button Hierarchy (44px Touch Target) */
#vcsoSlim3TabRoot button,
#vcsoSlim3TabRoot select,
#vcsoSlim3TabRoot .vcso-touch-btn,
.vcso-daylight-sheet button,
.vcso-daylight-sheet select {
  min-height: 44px;
  padding: 9px 15px;
  border-radius: var(--vcso-radius-md);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-decoration: none;
  transition: transform 140ms var(--vcso-ease-out), opacity 140ms ease;
}

#vcsoSlim3TabRoot button:active,
.vcso-daylight-sheet button:active {
  transform: scale(0.985);
}

.vcso-btn-primary {
  background: var(--vcso-brand);
  color: #FFFFFF;
  border: 1px solid var(--vcso-brand);
  box-shadow: var(--vcso-shadow-xs);
}
.vcso-btn-primary:hover { background: var(--vcso-brand-hover); border-color: var(--vcso-brand-hover); }

.vcso-btn-secondary {
  background: var(--vcso-surface);
  color: var(--vcso-ink);
  border: 1px solid var(--vcso-border-strong);
  box-shadow: var(--vcso-shadow-xs);
}
.vcso-btn-secondary:hover { background: var(--vcso-surface-subtle); }

.vcso-btn-tonal {
  background: var(--vcso-surface-tint);
  color: var(--vcso-brand-ink);
  border: 1px solid var(--vcso-border-brand);
}
.vcso-btn-tonal:hover { background: var(--vcso-brand-soft); }

.vcso-btn-danger-soft {
  background: var(--vcso-danger-bg);
  color: var(--vcso-danger-ink);
  border: 1px solid var(--vcso-danger-border);
}

.vcso-btn-ghost {
  background: transparent;
  color: var(--vcso-ink-secondary);
  border: 1px solid transparent;
}
.vcso-btn-ghost:hover { background: var(--vcso-surface-muted); color: var(--vcso-ink); }

/* Inputs & Textareas */
#vcsoSlim3TabRoot input[type="text"],
#vcsoSlim3TabRoot input[type="email"],
#vcsoSlim3TabRoot input[type="tel"],
#vcsoSlim3TabRoot input[type="number"],
#vcsoSlim3TabRoot textarea,
#vcsoSlim3TabRoot select,
.vcso-daylight-sheet input[type="text"],
.vcso-daylight-sheet input[type="email"],
.vcso-daylight-sheet input[type="tel"],
.vcso-daylight-sheet input[type="number"],
.vcso-daylight-sheet textarea,
.vcso-daylight-sheet select {
  background: var(--vcso-surface);
  color: var(--vcso-ink);
  border: 1px solid var(--vcso-border-strong);
  border-radius: var(--vcso-radius-md);
  font-size: 15px;
  box-sizing: border-box;
}

#vcsoSlim3TabRoot textarea,
#vcsoSlim3TabRoot input[type="text"] {
  padding: 11px 14px;
  width: 100%;
}

/* Segmented 3-Tab Navigation with 60fps Sliding Glider */
.vcso-tab-nav {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 4px;
  background: var(--vcso-surface-muted);
  border: 1px solid var(--vcso-border);
  border-radius: 12px;
  margin-bottom: 16px;
}

.vcso-tab-glider {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 8px) / 3);
  background: var(--vcso-surface);
  border-radius: 9px;
  box-shadow: var(--vcso-shadow-sm);
  transform: translate3d(calc(var(--tab-idx, 0) * 100%), 0, 0);
  transition: transform 240ms var(--vcso-ease-out);
  pointer-events: none;
}

.vcso-tab-btn {
  position: relative;
  z-index: 1;
  background: transparent;
  color: var(--vcso-ink-muted);
  border: none;
  border-radius: 9px;
  font-weight: 600;
}
.vcso-tab-btn.active {
  color: var(--vcso-brand);
  font-weight: 700;
}
.vcso-tab-subnav .vcso-tab-btn {
  background: var(--vcso-surface);
  border: 1px solid var(--vcso-border);
}
.vcso-tab-subnav .vcso-tab-btn.active {
  background: var(--vcso-surface-tint);
  border-color: var(--vcso-brand);
  color: var(--vcso-brand-ink);
}

/* Origin GPS Bar & Filter Grid */
.vcso-origin-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-radius: var(--vcso-radius-lg);
  background: var(--vcso-surface);
  border: 1px solid var(--vcso-border);
  box-shadow: var(--vcso-shadow-xs);
  margin-bottom: 12px;
}

.vcso-filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

/* Cards & Sub-Panels */
.vcso-job-card {
  background: var(--vcso-surface);
  border: 1px solid var(--vcso-border);
  border-radius: var(--vcso-radius-lg);
  padding: 18px 20px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--vcso-shadow-sm);
  transition: transform 180ms var(--vcso-ease-out);
}
.vcso-job-card.vcso-card-interactive:hover {
  transform: translateY(-1.5px);
  border-color: var(--vcso-border-strong);
  box-shadow: var(--vcso-shadow-md);
}

.vcso-inset-panel {
  padding: 14px 16px;
  border-radius: var(--vcso-radius-md);
  background: var(--vcso-surface-subtle);
  border: 1px solid var(--vcso-border);
}

/* Semantic Pills & Chips */
.vcso-risk-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 14px !important;
  font-weight: 600;
}
.vcso-risk-low { background: var(--vcso-safe-bg); color: var(--vcso-safe-ink); border: 1px solid var(--vcso-safe-border); }
.vcso-risk-medium { background: var(--vcso-warn-bg); color: var(--vcso-warn-ink); border: 1px solid var(--vcso-warn-border); }
.vcso-risk-high { background: var(--vcso-danger-bg); color: var(--vcso-danger-ink); border: 1px solid var(--vcso-danger-border); }
.vcso-chip-neutral { background: var(--vcso-surface-muted); color: var(--vcso-ink-secondary); border: 1px solid var(--vcso-border); }
.vcso-chip-info { background: var(--vcso-info-bg); color: var(--vcso-info-ink); border: 1px solid var(--vcso-info-border); }

/* Daylight Modal Backdrop & Sheet */
.vcso-daylight-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, 0.42);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  overflow-y: auto;
}
.vcso-daylight-sheet {
  background: var(--vcso-surface);
  color: var(--vcso-ink);
  border: 1px solid var(--vcso-border);
  border-radius: var(--vcso-radius-xl);
  box-shadow: var(--vcso-shadow-sheet);
}
.vcso-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2200;
  background: rgba(15, 23, 42, 0.54);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.vcso-daylight-sheet.vcso-sheet-modal input,
.vcso-daylight-sheet.vcso-sheet-modal select,
.vcso-daylight-sheet.vcso-sheet-modal textarea {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--vcso-border);
  background: var(--vcso-surface);
  color: var(--vcso-ink);
  font-size: 16px;
  box-sizing: border-box;
}

/* Staggered Card Entrance & Live Audio Waveform */
@keyframes vcsoCardRise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.vcso-stagger-card {
  animation: vcsoCardRise 240ms var(--vcso-ease-out) both;
  animation-delay: calc(var(--stagger-i, 0) * 35ms);
}

@keyframes vcsoEqPulse {
  0%, 100% { transform: scaleY(0.35); }
  50% { transform: scaleY(1); }
}
.vcso-eq-active .vcso-eq-bar {
  transform-origin: center bottom;
  animation: vcsoEqPulse 680ms ease-in-out infinite;
}
.vcso-eq-active .vcso-eq-bar:nth-child(2) { animation-delay: 120ms; }
.vcso-eq-active .vcso-eq-bar:nth-child(3) { animation-delay: 240ms; }
.vcso-eq-active .vcso-eq-bar:nth-child(4) { animation-delay: 90ms; }

@media (max-width: 768px) {
  .vcso-slim-container { padding: 8px 10px calc(88px + env(safe-area-inset-bottom, 0px)); }
  .vcso-header-bar { padding: 8px 10px; gap: 6px; margin-bottom: 8px; }
  .vcso-header-bar .vcso-fs-20 { font-size: 15.5px !important; }
  .vcso-header-bar .vcso-brand-lockup .vcso-fs-14 { display: none; }
  .vcso-header-actions { gap: 4px; width: 100%; justify-content: space-between; }
  .vcso-header-actions button { min-height: 36px !important; padding: 5px 9px !important; font-size: 13px !important; }
  .vcso-tab-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 950;
    grid-template-columns: repeat(3, 1fr); margin: 0;
    border-radius: 14px 14px 0 0; border-bottom: 0;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.97); backdrop-filter: blur(10px);
    box-shadow: 0 -6px 24px rgba(15, 23, 42, 0.1);
  }
  .vcso-tab-btn { min-height: 42px !important; padding: 6px 4px !important; font-size: 13px !important; }
  .vcso-origin-bar { padding: 8px 10px; gap: 6px; margin-bottom: 8px; }
  .vcso-origin-bar button, .vcso-origin-bar select { min-height: 38px !important; padding: 6px 8px !important; font-size: 16px !important; }
  .vcso-filter-row { grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
  .vcso-filter-row > :last-child { grid-column: 1 / -1; }
  #vcsoSlim3TabRoot input, #vcsoSlim3TabRoot select, #vcsoSlim3TabRoot textarea,
  .vcso-daylight-sheet input, .vcso-daylight-sheet select, .vcso-daylight-sheet textarea,
  .vcso-filter-row select, .vcso-filter-row input[type="text"] {
    min-height: 42px !important; padding: 7px 10px !important; font-size: 16px !important;
  }
  .vcso-job-card { padding: 12px 14px; margin-bottom: 10px; gap: 8px; }
  .vcso-sheet-backdrop { align-items: flex-end; padding: 0; }
  .vcso-sheet-modal {
    width: 100% !important; max-width: 100vw !important;
    border-radius: 18px 18px 0 0 !important;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .vcso-stagger-card,
  .vcso-eq-active .vcso-eq-bar {
    animation: none !important;
  }
  .vcso-tab-glider,
  .vcso-job-card,
  #vcsoSlim3TabRoot button,
  .vcso-daylight-sheet button {
    transition: none !important;
  }
}
