/**
 * GCE Craft UI — compact navy chrome.
 * Does not kill liquid glass (that lives in responsive-ui.css).
 * Load after page CSS; keep scroll-contract.css last.
 */

:root {
  --gce-craft-navy: #1e3a8a;
  --gce-craft-navy-2: #1e40af;
  --gce-craft-border: #d8e0ea;
  --gce-craft-muted: #64748b;
  --gce-craft-text: #0f172a;
  --gce-craft-bg: #eeeae3;
  --gce-craft-card: #ffffff;
  --gce-craft-radius: 12px;
  --gce-craft-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  --radius: 12px;
  /* Retired milk/orange shell: keep navy if any leftover --gce-shell-orange refs remain. */
  --gce-shell-orange: #1e3a8a;
  --gce-shell-orange-2: #1e40af;
  --gce-shell-orange-dim: rgba(30, 58, 138, 0.12);
}

/* —— Tokens: light default = navy —— */
html[data-gce-mode="light"],
body[data-gce-mode="light"] {
  --gce-craft-navy: #1e3a8a;
  --gce-craft-navy-2: #1e40af;
  --gce-craft-border: #d8e0ea;
  --gce-craft-muted: #64748b;
  --gce-craft-text: #0f172a;
  --gce-craft-bg: #eeeae3;
  --gce-craft-card: #ffffff;
  --gce-craft-radius: 12px;
  --gce-craft-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  --radius: 12px;
  --gce-shell-orange: #1e3a8a;
  --gce-shell-orange-2: #1e40af;
  --gce-shell-orange-dim: rgba(30, 58, 138, 0.12);
  --gce-bg: #eeeae3;
  --gce-surface: #ffffff;
  --gce-surface-2: #f8fafc;
  --gce-elevated: #ffffff;
  --gce-border: #d8e0ea;
  --gce-border-strong: #cbd5e1;
  --gce-accent: #1e3a8a;
  --gce-accent-2: #1e40af;
  --gce-accent-dim: rgba(30, 58, 138, 0.12);
  --gce-accent-glow: rgba(30, 58, 138, 0.22);
  --blue: #1e3a8a;
  --blue2: #1e40af;
  --purple: #1e3a8a;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #d8e0ea;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  --dash-deadline-date: #1e3a8a;
}

html[data-gce-mode="dark"],
body[data-gce-mode="dark"],
body:not([data-gce-mode="light"]) {
  --gce-accent: #93c5fd;
  --gce-accent-2: #60a5fa;
  --gce-accent-dim: rgba(147, 197, 253, 0.14);
  --gce-accent-glow: rgba(147, 197, 253, 0.22);
  --blue: #93c5fd;
  --blue2: #60a5fa;
  --purple: #93c5fd;
  --dash-deadline-date: #93c5fd;
}

/* —— Primary actions: solid navy, no gradient glow —— */
html[data-gce-mode="light"] body.gce-viewport-shell .btn-primary,
html[data-gce-mode="light"] body.gce-viewport-shell button.primary,
html[data-gce-mode="light"] body.gce-viewport-shell .stm-btn-primary,
html[data-gce-mode="light"] body.gce-viewport-shell .crw-btn-primary,
html[data-gce-mode="light"] body.gce-viewport-shell .tsk-btn-primary,
html[data-gce-mode="light"] body.gce-viewport-shell .cert-btn-primary,
html[data-gce-mode="light"] body.gce-viewport-shell .fin-mock-btn-primary,
html[data-gce-mode="light"] body.gce-viewport-shell .sfty-btn-primary,
html[data-gce-mode="light"] body.gce-viewport-shell .stg-btn-primary,
html[data-gce-mode="light"] body.gce-viewport-shell .eq-btn-primary {
  background: #1e3a8a !important;
  border-color: #1e3a8a !important;
  color: #fff !important;
  box-shadow: none !important;
  background-image: none !important;
}

html[data-gce-mode="light"] body.gce-viewport-shell .btn-primary:hover,
html[data-gce-mode="light"] body.gce-viewport-shell button.primary:hover,
html[data-gce-mode="light"] body.gce-viewport-shell .stm-btn-primary:hover,
html[data-gce-mode="light"] body.gce-viewport-shell .fin-mock-btn-primary:hover {
  background: #1e40af !important;
  border-color: #1e40af !important;
}

/* —— Avatars / logo: flat navy (kill indigo→purple gradients) —— */
.sidebar-user-avatar,
.dash-user-avatar,
.dash-user-avatar--solo,
.sfty-user-avatar,
.cert-user-avatar,
.cal-user-avatar,
.logo {
  background: #1e3a8a !important;
  background-image: none !important;
  box-shadow: none !important;
}

/* —— Purple → navy accents used as “AI” chrome —— */
.dash-prog-purple,
.dash-progress--purple .dash-prog-fill {
  background: #1e3a8a !important;
  background-image: none !important;
}
.dash-svg-line-alarm { stroke: #1e3a8a !important; }
.dash-svg-dot-alarm { fill: #1e3a8a !important; }
.dash-util-dot-av,
.dash-util-donut--field .dash-util-dot-o,
.ai-ops-dot--av {
  background: #1e3a8a !important;
}
.ai-chip--purple {
  border-color: #93c5fd !important;
  background: #dbeafe !important;
  color: #1e3a8a !important;
}

/* Calendar indigo → navy */
.cal-day--selected,
.cal-day--selected.cal-day--today {
  box-shadow: inset 0 0 0 2px #1e3a8a !important;
  background: #dbeafe !important;
}
.cal-ev-card--sel {
  box-shadow: 0 0 0 2px #1e3a8a, 0 2px 8px rgba(15, 23, 42, 0.08) !important;
}

/* —— Compact page chrome —— */
html[data-gce-mode="light"] body.gce-viewport-shell .stm-page-head h2,
html[data-gce-mode="light"] body.gce-viewport-shell .crw-page-head h2,
html[data-gce-mode="light"] body.gce-viewport-shell .tsk-page-head h2,
html[data-gce-mode="light"] body.gce-viewport-shell .dash-ops-hero h2,
html[data-gce-mode="light"] body.gce-viewport-shell .fin-mock-header h2 {
  font-size: 18px !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
  color: #0f172a !important;
}

html[data-gce-mode="light"] body.gce-viewport-shell .stm-page-head,
html[data-gce-mode="light"] body.gce-viewport-shell .crw-page-head,
html[data-gce-mode="light"] body.gce-viewport-shell .tsk-page-head {
  padding: 10px 12px !important;
}

html[data-gce-mode="light"] body.gce-viewport-shell .nav-item.active,
html[data-gce-mode="light"] body.gce-viewport-shell .sidebar .nav-item.active {
  background: #dbeafe !important;
  color: #1e3a8a !important;
  border-color: #93c5fd !important;
  box-shadow: none !important;
}

/* KPI icon blobs: flat fills */
html[data-gce-mode="light"] body.gce-viewport-shell [class*="-kpi-icon"],
html[data-gce-mode="light"] body.gce-viewport-shell [class*="-ico-"] {
  background-image: none !important;
}

/* Tables denser */
html[data-gce-mode="light"] body.gce-viewport-shell table th {
  font-size: 11px !important;
  letter-spacing: 0.04em !important;
  color: #64748b !important;
  background: #f8fafc !important;
}
html[data-gce-mode="light"] body.gce-viewport-shell table td {
  font-size: 13px !important;
}

/* Status pills: square-ish, not candy */
html[data-gce-mode="light"] body.gce-viewport-shell .stm-status-pill,
html[data-gce-mode="light"] body.gce-viewport-shell .badge,
html[data-gce-mode="light"] body.gce-viewport-shell .pill {
  border-radius: 6px !important;
}

/* Ask AI / workflow FAB: navy accent */
html[data-gce-mode="light"] .ai-workflow-fab,
html[data-gce-mode="light"] .gce-ai-fab,
html[data-gce-mode="light"] .ai-wf-fab,
html[data-gce-mode="light"] .gce-ai-panel-header,
html[data-gce-mode="light"] .ai-wf-send {
  background: #1e3a8a !important;
  background-image: none !important;
  box-shadow: 0 8px 20px rgba(30, 58, 138, 0.28) !important;
}
html[data-gce-mode="light"] .ai-wf-progress-fill {
  background: #1e3a8a !important;
  background-image: none !important;
}

/* Dashboard ops: less “hero poster”, more product UI */
html[data-gce-mode="light"] .dash-ops-hero h2 {
  font-size: 20px !important;
  font-weight: 700 !important;
}
html[data-gce-mode="light"] .dash-ops-kpi,
html[data-gce-mode="light"] .dash-ops-card {
  border-radius: 1.25rem !important;
  box-shadow: var(--gce-craft-shadow) !important;
}

/* Boot spinner was purple / teal */
.gce-boot-spinner {
  border-top-color: #1e3a8a !important;
}

/* Vendor New contact drawer — light panel on body (never inherit dark stg-input white text) */
.vd-contact-drawer-panel {
  background: #fff !important;
  color: #0f172a !important;
}
.vd-contact-drawer .vd-cd-field > span,
.vd-contact-drawer .vd-cd-section h4,
.vd-contact-drawer-head p,
.vd-contact-drawer .vd-cd-notify-to,
.vd-contact-drawer .vd-cd-check small {
  color: #64748b !important;
}
.vd-contact-drawer-head h3,
.vd-contact-drawer .vd-cd-check b {
  color: #0f172a !important;
}
.vd-contact-drawer .vd-cd-input,
.vd-contact-drawer input.vd-cd-input,
.vd-contact-drawer select.vd-cd-input,
.vd-contact-drawer .stg-input {
  background: #fff !important;
  border-color: #d8e0ea !important;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
}
