/* BudeFix approved visual system — 2026-08-01
   Base background: CMYK 100/0/0/48 -> sRGB approximation #008585
   Accent: Neon Orange #FF5A00
*/
:root,
[data-budefix-theme="approved"] {
  color-scheme: dark;
  --bf-bg-cmyk: 100%, 0%, 0%, 48%;
  --bf-bg: #008585;
  --bf-bg-deep: #004E53;
  --bf-bg-dark: #00363A;
  --bf-surface: rgba(0, 54, 58, .78);
  --bf-surface-strong: rgba(0, 43, 47, .94);
  --bf-surface-soft: rgba(255, 255, 255, .09);
  --bf-accent: #FF5A00;
  --bf-accent-hover: #FF7A1A;
  --bf-accent-ink: #072b2d;
  --bf-text: #F7FBFC;
  --bf-muted: #B8D8DA;
  --bf-border: rgba(255, 255, 255, .16);
  --bf-success: #45e6a8;
  --bf-warning: #ffd166;
  --bf-danger: #ff7d8b;
  --bf-radius-sm: 12px;
  --bf-radius-md: 18px;
  --bf-radius-lg: 26px;
  --bf-shadow: 0 18px 48px rgba(0, 25, 28, .30);
  --bf-glow: 0 0 0 1px rgba(255, 90, 0, .28), 0 0 26px rgba(255, 90, 0, .20);
  --bf-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-budefix-theme="approved"],
body.budefix-theme { background: var(--bf-bg); color: var(--bf-text); }
body.budefix-theme {
  min-height: 100vh;
  font-family: var(--bf-font);
  background-image:
    radial-gradient(circle at 15% -10%, rgba(0, 208, 220, .24), transparent 42%),
    linear-gradient(150deg, var(--bf-bg) 0%, #006b71 42%, var(--bf-bg-deep) 100%);
  background-attachment: fixed;
}
body.budefix-theme *, body.budefix-theme *::before, body.budefix-theme *::after { box-sizing: border-box; }
body.budefix-theme :focus-visible { outline: 3px solid var(--bf-accent); outline-offset: 3px; }
body.budefix-theme a { color: var(--bf-text); text-decoration-color: var(--bf-accent); }
body.budefix-theme h1, body.budefix-theme h2, body.budefix-theme h3 { color: var(--bf-text); letter-spacing: -.025em; }
body.budefix-theme input, body.budefix-theme select, body.budefix-theme textarea {
  color: var(--bf-text); background: var(--bf-surface-strong); border: 1px solid var(--bf-border); border-radius: var(--bf-radius-sm);
}
body.budefix-theme button, body.budefix-theme .btn, body.budefix-theme [role="button"] { border-radius: var(--bf-radius-sm); }
body.budefix-theme button.primary, body.budefix-theme .btn-primary, body.budefix-theme [data-variant="primary"] {
  background: var(--bf-accent); color: var(--bf-accent-ink); border: 1px solid transparent; box-shadow: var(--bf-glow); font-weight: 800;
}
body.budefix-theme button.primary:hover, body.budefix-theme .btn-primary:hover { background: var(--bf-accent-hover); }
body.budefix-theme .card, body.budefix-theme [data-card], body.budefix-theme .panel, body.budefix-theme dialog {
  color: var(--bf-text); background: var(--bf-surface); border: 1px solid var(--bf-border); border-radius: var(--bf-radius-md); box-shadow: var(--bf-shadow); backdrop-filter: blur(18px);
}
body.budefix-theme nav, body.budefix-theme header, body.budefix-theme footer { color: var(--bf-text); }
body.budefix-theme nav .active, body.budefix-theme [role="tab"][aria-selected="true"], body.budefix-theme [aria-current="page"], body.budefix-theme [data-active="true"] { color: var(--bf-accent); }
body.budefix-theme .progress, body.budefix-theme progress { accent-color: var(--bf-accent); }
body.budefix-theme ::selection { background: var(--bf-accent); color: var(--bf-accent-ink); }

.budefix-brand-lockup { display:flex; align-items:center; gap:12px; min-width:0; }
.budefix-brand-mark { width:44px; height:44px; flex:none; filter: drop-shadow(0 0 12px rgba(255,90,0,.28)); }
.budefix-brand-name { font-weight:900; font-size:1.22rem; line-height:1; white-space:nowrap; }
.budefix-brand-name em { color:var(--bf-accent); font-style:normal; }
.budefix-brand-tagline { color:var(--bf-muted); font-size:.72rem; margin-top:4px; white-space:nowrap; }
.budefix-brand-tagline em { color:var(--bf-accent); font-style:normal; }

#budefix-splash { position:fixed; inset:0; z-index:2147483647; display:grid; place-items:center; padding:24px; background:radial-gradient(circle at 50% 30%, #009ca4, var(--bf-bg-deep) 72%); color:var(--bf-text); transition:opacity .35s ease, visibility .35s ease; }
#budefix-splash[data-hidden="true"] { opacity:0; visibility:hidden; pointer-events:none; }
#budefix-splash .bf-splash-inner { text-align:center; animation:bf-rise .55s ease both; }
#budefix-splash img { width:min(42vw,190px); filter:drop-shadow(0 0 28px rgba(255,90,0,.32)); }
#budefix-splash strong { display:block; font-size:clamp(2.4rem,11vw,5.4rem); margin-top:16px; letter-spacing:-.06em; }
#budefix-splash strong em { color:var(--bf-accent); font-style:normal; }
#budefix-splash p { color:var(--bf-muted); font-weight:700; font-size:clamp(1rem,4vw,1.4rem); }
#budefix-splash p em { color:var(--bf-accent); font-style:normal; }
@keyframes bf-rise { from {opacity:0; transform:translateY(18px) scale(.98)} to {opacity:1; transform:none} }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior:auto!important; animation-duration:.01ms!important; transition-duration:.01ms!important; } }


/* Actual BudeFix 5.0.0-r3 application compatibility layer.
   Maps the legacy UI tokens to the approved BudeFix palette. */
:root,
html[data-budefix-theme="approved"] {
  color-scheme: dark;
  --bg: #008585;
  --surface: rgba(0, 54, 58, .94);
  --surface-2: rgba(255, 255, 255, .09);
  --text: #F7FBFC;
  --muted: #C4E0E2;
  --brand: #FF5A00;
  --brand-2: #FF7A1A;
  --accent: #FF5A00;
  --ok: #45E6A8;
  --warn: #FFD166;
  --danger: #FF7D8B;
  --line: rgba(255, 255, 255, .16);
  --shadow: 0 18px 48px rgba(0, 25, 28, .30);
  --radius: 18px;
  --radius-sm: 12px;
}
html { background:#008585; }
body.budefix-theme { margin:0; }
body.budefix-theme .app-shell { color:var(--text); }
body.budefix-theme .sidebar {
  background:rgba(0, 43, 47, .96);
  border-right-color:var(--line);
  box-shadow:12px 0 38px rgba(0,25,28,.18);
}
body.budefix-theme .brand { padding-bottom:20px; }
body.budefix-theme .brand img { border-radius:14px; box-shadow:0 0 0 1px rgba(255,255,255,.12),0 8px 24px rgba(255,90,0,.22); }
body.budefix-theme .brand strong { color:var(--text); font-size:18px; letter-spacing:-.02em; }
body.budefix-theme .brand-tagline { display:block; margin-top:2px; color:var(--text); font-size:11px; font-style:normal; font-weight:700; }
body.budefix-theme .brand .brand-version { display:block; color:var(--muted); font-size:10px; margin-top:3px; }
body.budefix-theme .topbar {
  background:rgba(0, 78, 83, .88);
  border-bottom-color:var(--line);
  box-shadow:0 10px 34px rgba(0,25,28,.14);
}
body.budefix-theme .topbar p { color:var(--muted); }
body.budefix-theme .main-content { background:transparent; }
body.budefix-theme .card,
body.budefix-theme .task-card,
body.budefix-theme .fuel-card,
body.budefix-theme .person-load-card,
body.budefix-theme .suggestion,
body.budefix-theme .weather-day,
body.budefix-theme .calendar-day,
body.budefix-theme .calendar-weekday {
  background:rgba(0, 54, 58, .92);
  border-color:var(--line);
}
body.budefix-theme .card,
body.budefix-theme .fuel-card,
body.budefix-theme .person-load-card { box-shadow:var(--shadow); }
body.budefix-theme .hero {
  background:
    radial-gradient(circle at 88% 20%, rgba(255,90,0,.26), transparent 32%),
    linear-gradient(135deg,#00363A,#005E63 62%,#008585);
  border:1px solid rgba(255,255,255,.16);
  box-shadow:var(--shadow);
}
body.budefix-theme .fuel-hero {
  background:
    radial-gradient(circle at 88% 20%, rgba(255,90,0,.32), transparent 34%),
    linear-gradient(135deg,#00363A,#005E63 62%,#008585);
}
body.budefix-theme .hero .btn,
body.budefix-theme .btn.primary,
body.budefix-theme button.primary {
  background:#FF5A00;
  color:#072B2D;
  border-color:transparent;
  box-shadow:0 0 0 1px rgba(255,90,0,.28),0 10px 26px rgba(255,90,0,.22);
}
body.budefix-theme .hero .btn:hover,
body.budefix-theme .btn.primary:hover { background:#FF7A1A; filter:none; }
body.budefix-theme .btn.secondary { background:rgba(255,255,255,.10); color:var(--text); border-color:var(--line); }
body.budefix-theme .btn.ghost { background:transparent; color:var(--text); border-color:rgba(255,255,255,.24); }
body.budefix-theme .btn.danger { background:#B83646; color:#fff; }
body.budefix-theme .icon-btn { color:var(--text); }
body.budefix-theme .icon-btn:hover { background:rgba(255,255,255,.10); }
body.budefix-theme .nav-item { color:var(--muted); }
body.budefix-theme .nav-item:hover { background:rgba(255,255,255,.08); color:var(--text); }
body.budefix-theme .nav-item.active,
body.budefix-theme .tab.active {
  background:#FF5A00;
  color:#072B2D;
  border-color:#FF5A00;
  box-shadow:0 8px 22px rgba(255,90,0,.20);
}
body.budefix-theme .mobile-nav { background:rgba(0,43,47,.97); border-top-color:var(--line); }
body.budefix-theme input,
body.budefix-theme select,
body.budefix-theme textarea,
body.budefix-theme .input {
  background:#003F43;
  color:var(--text);
  border-color:rgba(255,255,255,.22);
  accent-color:#FF5A00;
}
body.budefix-theme option { background:#003F43; color:var(--text); }
body.budefix-theme input::placeholder,
body.budefix-theme textarea::placeholder { color:#9FC7C9; opacity:1; }
body.budefix-theme input:focus,
body.budefix-theme select:focus,
body.budefix-theme textarea:focus,
body.budefix-theme .input:focus {
  border-color:#FF8A47;
  box-shadow:0 0 0 3px rgba(255,90,0,.24);
}
body.budefix-theme .status-chip,
body.budefix-theme .network-badge,
body.budefix-theme .badge,
body.budefix-theme .code { background:rgba(255,255,255,.10); color:var(--text); border-color:var(--line); }
body.budefix-theme .badge.ok,
body.budefix-theme .status-chip[data-status="sync"] { background:rgba(69,230,168,.16); color:#B9FFE3; }
body.budefix-theme .badge.warn,
body.budefix-theme .status-chip[data-status="dirty"] { background:rgba(255,209,102,.16); color:#FFE8AE; }
body.budefix-theme .badge.danger,
body.budefix-theme .status-chip[data-status="error"] { background:rgba(255,125,139,.16); color:#FFD1D7; }
body.budefix-theme .progress,
body.budefix-theme .bar { background:rgba(255,255,255,.11); }
body.budefix-theme .progress span,
body.budefix-theme .bar span { background:linear-gradient(90deg,#FF5A00,#FF8A47); }
body.budefix-theme .bar span.over { background:#FF7D8B; }
body.budefix-theme .task-card.today,
body.budefix-theme .calendar-day.today { border-color:#FF8A47; }
body.budefix-theme .calendar-task { background:rgba(255,255,255,.09); border-left-color:#FF5A00; }
body.budefix-theme .recommendation { border-left-color:#FF5A00; }
body.budefix-theme .data-table th { background:#003F43; color:var(--muted); }
body.budefix-theme .data-table tr:hover { background:rgba(255,255,255,.055); }
body.budefix-theme .table-wrap,
body.budefix-theme .calendar-grid { border-color:var(--line); background:rgba(255,255,255,.14); }
body.budefix-theme .catalog-button { color:var(--text); }
body.budefix-theme .catalog-button:hover,
body.budefix-theme .catalog-button.active { background:rgba(255,255,255,.10); }
body.budefix-theme .callout { background:rgba(255,90,0,.12); border-color:rgba(255,138,71,.46); }
body.budefix-theme .callout.danger { background:rgba(255,125,139,.12); border-color:rgba(255,125,139,.44); }
body.budefix-theme .toast { background:#00363A; color:var(--text); border:1px solid var(--line); }
body.budefix-theme dialog { background:rgba(0,43,47,.98); }
body.budefix-theme .modal::backdrop { background:rgba(0,18,20,.72); }
body.budefix-theme .skip-link { background:#00363A; color:var(--text); }
body.budefix-theme ::-webkit-scrollbar { width:10px; height:10px; }
body.budefix-theme ::-webkit-scrollbar-track { background:rgba(0,43,47,.65); }
body.budefix-theme ::-webkit-scrollbar-thumb { background:rgba(255,255,255,.24); border-radius:999px; }
#budefix-splash { background:radial-gradient(circle at 50% 30%,#00747A,#00282A 76%); }
#budefix-splash p,
#budefix-splash p em { color:var(--bf-text); }
#budefix-splash .bf-splash-inner::after { content:""; display:block; width:72px; height:5px; margin:18px auto 0; border-radius:999px; background:#FF5A00; box-shadow:0 0 22px rgba(255,90,0,.42); }
@media (max-width:760px) {
  body.budefix-theme .topbar { background:rgba(0,78,83,.96); }
  body.budefix-theme .sidebar { background:rgba(0,43,47,.99); }
}
@media print {
  body.budefix-theme { background:#fff!important; color:#000!important; }
  body.budefix-theme .card { background:#fff!important; color:#000!important; border-color:#bbb!important; }
}
