/* Fase 73: the dashboard as a command center (the look of getdoneez.com). Background layers, glass, neon and the assistant dock.
   Levels (fx.js sets html[data-fx]): full = everything; light = glass only (no particles, no aurora); off = solid surfaces, no animation.
   Tokens live in theme.css. Rule of thumb: glass on containers, never on text; blur on at most ~6 things at once (sidebar, top bar, dock,
   conversation, bottom bar); rows, list items and calendar events never get their own blur. */

/* ---------- background of every page ---------- */
#fx-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  background: radial-gradient(ellipse 70% 60% at 50% 35%, #F7FAFD 0%, #EEF3F9 70%); }
html.dark #fx-bg { background: radial-gradient(ellipse 70% 60% at 50% 35%, #0C1E35 0%, #070E1A 55%, #04070D 100%); }
#fx-bg::before { content: ""; position: absolute; inset: 0; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cpath d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9zM0 15l12.98-7.5V0h-2v6.35L0 12.69v2.3zm0 18.5L12.98 41v8h-2v-6.85L0 35.81v-2.3zM15 0v7.5L27.99 15H28v-2.31h-.01L17 6.35V0h-2zm0 49v-8l12.99-7.5H28v2.31h-.01L17 42.15V49h-2z' fill='%230E7490'/%3E%3C/svg%3E"); }
html.dark #fx-bg::before { opacity: .045; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cpath d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9zM0 15l12.98-7.5V0h-2v6.35L0 12.69v2.3zm0 18.5L12.98 41v8h-2v-6.85L0 35.81v-2.3zM15 0v7.5L27.99 15H28v-2.31h-.01L17 6.35V0h-2zm0 49v-8l12.99-7.5H28v2.31h-.01L17 42.15V49h-2z' fill='%2346E3F5'/%3E%3C/svg%3E"); }
/* the aurora: two big blurred blobs drifting across, once every ~26 s */
/* (no blur filter: soft gradients that move by transform only, so it stays cheap; an 80px blur in motion cost half the frames) */
#fx-bg::after { content: ""; position: absolute; left: -20%; top: -10%; width: 80%; height: 70%; opacity: .35;
  background: radial-gradient(closest-side at 30% 50%, rgba(14,116,144,.35), transparent), radial-gradient(closest-side at 70% 50%, rgba(37,99,235,.25), transparent);
  animation: fx-aurora 26s var(--ease) infinite alternate; will-change: transform; }
html.dark #fx-bg::after { opacity: .5; background: radial-gradient(closest-side at 30% 50%, rgba(70,227,245,.26), transparent), radial-gradient(closest-side at 70% 50%, rgba(37,99,235,.32), transparent); }
@keyframes fx-aurora { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(70%, 40%, 0) scale(1.15); } }
#fx-cv { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }

/* ---------- glass and neon ---------- */
.glass { background: var(--glass-bg); backdrop-filter: blur(var(--glass-blur)) saturate(140%); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  border: 1px solid var(--glass-border); box-shadow: inset 0 1px 0 var(--glass-hi), 0 10px 30px rgba(0,0,0,.35); border-radius: 14px; }
:root:not(.dark) .glass { box-shadow: inset 0 1px 0 var(--glass-hi), 0 10px 30px rgba(11,22,38,.10); }
.neon-edge { position: relative; }
.neon-edge::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--a, 0deg), transparent 0 60%, var(--neon) 75%, var(--neon-2) 85%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  --a: 210deg; }
/* the border turns only while something is alive there (hover, typing): a turning border repaints every frame */
.neon-edge:is(:hover, :focus-within)::before { animation: spinA 6s linear infinite; }
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spinA { to { --a: 360deg; } }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .glass { background: var(--glass-bg-strong); } }
.num { font-family: var(--hx-mono); font-variant-numeric: tabular-nums; }

/* the shell in glass */
#sidebar { background: var(--glass-bg); backdrop-filter: blur(var(--glass-blur)) saturate(140%); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%); border-right: 1px solid var(--glass-border); }
html #shell > header { background: var(--glass-bg); backdrop-filter: blur(var(--glass-blur)) saturate(140%); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%); border-bottom: 1px solid var(--glass-border); }
html #bottom-nav { background: var(--glass-bg-strong); backdrop-filter: blur(var(--glass-blur)) saturate(140%); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%); border-top: 1px solid var(--glass-border); }
html .hx-card, html .pg-card { background: var(--glass-bg-strong); border-color: var(--glass-border); box-shadow: inset 0 1px 0 var(--glass-hi); }
html .pg-split > form, html .pg-split > ul { background: var(--glass-bg-strong); border-color: var(--glass-border); }
#toast { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: var(--glow-md), 0 10px 30px rgba(0,0,0,.35); }
:focus-visible { outline: 2px solid var(--neon); outline-offset: 2px; }

/* ---------- the logo ---------- */
.gdz-logo { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; }
.gdz-logo-mark { width: 42px; height: 40px; flex: none; filter: drop-shadow(0 0 8px rgba(70,227,245,.35)); }
:root:not(.dark) .gdz-logo-mark { filter: none; }
.gdz-word { font-family: 'Outfit', var(--hx-hud); font-weight: 700; font-size: 25px; line-height: 1; letter-spacing: -.01em; color: var(--hx-text); }
.gdz-word b { color: var(--neon); font-weight: 700; }
.gdz-logo-sm .gdz-logo-mark { width: 34px; height: 33px; } .gdz-logo-sm .gdz-word { font-size: 21px; }

/* ---------- small animations shared with the toast ---------- */
@keyframes chat-check { to { stroke-dashoffset: 0; } }

/* ---------- effect levels ---------- */
html[data-fx="light"] #fx-cv, html[data-fx="light"] #fx-bg::after { display: none; }
html[data-fx="light"] .neon-edge::before { animation: none; }
html[data-fx="off"] { --glass-bg: var(--hx-surface); --glass-bg-strong: var(--hx-surface); }
html[data-fx="off"] #fx-bg, html[data-fx="off"] #fx-cv, html[data-fx="off"] .neon-edge::before { display: none; }
html[data-fx="off"] .glass, html[data-fx="off"] #sidebar, html[data-fx="off"] #shell > header, html[data-fx="off"] #bottom-nav, html[data-fx="off"] #home-dock, html[data-fx="off"] #chat-card, html[data-fx="off"] #toast { backdrop-filter: none; -webkit-backdrop-filter: none; }
/* (no "*::before, *::after" here: that made the browser compute two pseudo-elements for every element on every style pass) */
html[data-fx="off"] * { animation: none !important; transition: none !important; }
html[data-fx="off"] :is(.sb-item, .gdz-toast .tbar, .gdz-toast .chk)::before, html[data-fx="off"] :is(#home-dock, .sb-item[aria-current="page"], #new-job-btn, #top-primary)::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  #fx-bg::after, .neon-edge::before, .bot svg, #chat-panel:not(.hidden) #chat-card, .chat-act { animation: none !important; }
}
/* the Settings control */
.fx-set { max-width: 52rem; margin-top: .75rem; padding: 1rem 1.25rem; border-radius: 1rem; }
.fx-set fieldset { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.fx-set label { display: flex; align-items: center; gap: .45rem; padding: .5rem .8rem; border-radius: .7rem; border: 1px solid var(--glass-border); cursor: pointer; font-size: 14px; font-weight: 600; }
.fx-set label:has(input:checked) { border-color: var(--neon); color: var(--neon); background: var(--hx-accent-soft); }

/* ---------- Fase 73 part 2: navigation ---------- */
/* the sidebar, grouped, the active page in neon */
.sb-item { position: relative; transition: background var(--t-fast), color var(--t-fast); }
.sb-item svg { transition: transform var(--t-fast) var(--ease), filter var(--t-fast); }
.sb-item:hover svg { transform: translateX(2px); }
.sb-item[aria-current="page"] { background: linear-gradient(90deg, rgba(70,227,245,.16), rgba(70,227,245,.04)); color: var(--neon); }
.sb-item[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: 18%; bottom: 18%; width: 3px; border-radius: 3px; background: var(--neon); box-shadow: 0 0 10px var(--neon-2); }
html.dark .sb-item[aria-current="page"] svg { filter: drop-shadow(0 0 6px rgba(70,227,245,.8)); }
.sb-badge.bump { animation: badge-bump .9s var(--ease) 1; }
@keyframes badge-bump { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(70,227,245,.6); } 35% { transform: scale(1.25); } 100% { transform: scale(1); box-shadow: 0 0 0 8px rgba(70,227,245,0); } }
.sb-fold { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: .55rem; color: var(--hx-muted); flex: none; }
.sb-fold:hover { color: var(--neon); background: var(--hx-accent-soft); }
/* folded: icons only (each has a tooltip) */
@media (min-width: 1024px) {
  html.sb-folded #sidebar { width: 4.6rem; padding-left: .55rem; padding-right: .55rem; }
  html.sb-folded #sidebar .gdz-word, html.sb-folded #sidebar .sb-item > span, html.sb-folded #acct-card > :not(:first-child) { display: none !important; }
  html.sb-folded #sidebar .sb-top { flex-direction: column; }
  html.sb-folded #sidebar .sb-item { justify-content: center; padding: .65rem 0; }
  html.sb-folded #sb-fold svg { transform: scaleX(-1); }
}
/* the top bar: the page's name, one main action */
@media (max-width: 639px) { #top-primary { display: none !important; } }
#top-name { font-family: var(--hx-hud); font-weight: 600; font-size: 16px; letter-spacing: .02em; color: var(--hx-text); }
/* (Prompt 9: the page header says where you are; the top bar no longer carries the title) */
html #top-primary, html #new-job-btn { background: linear-gradient(135deg, var(--neon), var(--neon-2)); color: #04070D; box-shadow: var(--glow-sm); }
:root:not(.dark) #top-primary, :root:not(.dark) #new-job-btn { color: #fff; background: var(--neon); }
html #top-primary:hover, html #new-job-btn:hover { box-shadow: var(--glow-md); }
/* "Needs your OK" */
#ok-go:hover { text-decoration: underline; text-underline-offset: 3px; }
/* the command palette */
.gs-row[aria-selected="true"] { border-color: var(--neon) !important; background: var(--hx-accent-soft) !important; }
.gs-brain { color: var(--neon); }
#gs-results { background: var(--glass-bg-strong); backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur)); border-color: var(--glass-border); }
/* empty states: the robot, a sentence and a phrase to say */
.empty-bot { width: 64px; height: 62px; filter: drop-shadow(0 0 14px rgba(70,227,245,.5)); animation: bot-bob 3.4s ease-in-out infinite; }
.empty-say { font-family: var(--hx-hud); font-size: 14px; color: var(--neon); border: 1px solid rgba(70,227,245,.45); border-radius: 99px; padding: .45rem .9rem; background: var(--hx-accent-soft); }
.empty-say:hover { box-shadow: var(--glow-sm); }
@media (prefers-reduced-motion: reduce) { .empty-bot, .sb-badge.bump { animation: none !important; } }

/* ---------- Fase 73 part 3: motion (cut by "light"/"off" where it moves things, and by prefers-reduced-motion) ---------- */
/* changing page: a fade that rises 8px; the cards follow 40ms apart (8 at most) */
.view-in { animation: view-in var(--t-mid) var(--ease) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.view-in :is(.hx-card, .pg-card) { animation: view-in var(--t-mid) var(--ease) both; }
.view-in :is(.hx-card, .pg-card):nth-child(2) { animation-delay: 40ms; } .view-in :is(.hx-card, .pg-card):nth-child(3) { animation-delay: 80ms; }
.view-in :is(.hx-card, .pg-card):nth-child(4) { animation-delay: 120ms; } .view-in :is(.hx-card, .pg-card):nth-child(5) { animation-delay: 160ms; }
.view-in :is(.hx-card, .pg-card):nth-child(6) { animation-delay: 200ms; } .view-in :is(.hx-card, .pg-card):nth-child(7) { animation-delay: 240ms; }
.view-in :is(.hx-card, .pg-card):nth-child(n+8) { animation-delay: 280ms; }
/* skeletons while a page loads */
.skel { display: flex; flex-direction: column; gap: .75rem; padding: .5rem 0; }
.skel i { display: block; height: 1rem; border-radius: .5rem; background: linear-gradient(90deg, var(--glass-bg) 0%, rgba(70,227,245,.14) 50%, var(--glass-bg) 100%); background-size: 200% 100%; animation: skel 1.3s linear infinite; }
.skel i.big { height: 4.5rem; border-radius: 1rem; } .skel i:nth-child(odd):not(.big) { width: 78%; }
@keyframes skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }
/* buttons: pressed = 97%; the main ones shimmer on hover */
:is(#new-job-btn, #top-primary, .bt-btn, .chat-act-btns button, .empty-say, #chat-send) { transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast); }
:is(#new-job-btn, #top-primary, .bt-btn, .empty-say, #chat-send):active { transform: scale(.97); }
:is(#new-job-btn, #top-primary) { position: relative; overflow: hidden; }
:is(#new-job-btn, #top-primary)::after { content: ""; position: absolute; inset: 0; transform: translateX(-120%); background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%); pointer-events: none; }
:is(#new-job-btn, #top-primary):hover::after { transform: translateX(120%); transition: transform .6s var(--ease); }
/* glass toasts, in the corner, with a time bar */
.gdz-toast { position: fixed; right: 16px; top: 64px; z-index: 70; display: flex; align-items: center; gap: .6rem; max-width: min(26rem, calc(100vw - 32px)); padding: .7rem .9rem .85rem;
  border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--hx-text); overflow: hidden;
  background: var(--glass-bg-strong); border: 1px solid rgba(91,227,160,.55); box-shadow: 0 0 22px rgba(91,227,160,.22), 0 12px 30px rgba(0,0,0,.35);
  backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur)); animation: toast-in var(--t-mid) var(--ease) both; }
.gdz-toast.err { border-color: rgba(255,92,122,.6); box-shadow: 0 0 22px rgba(255,92,122,.25), 0 12px 30px rgba(0,0,0,.35); }
.gdz-toast .ti { flex: none; width: 20px; height: 20px; color: var(--ok); } .gdz-toast.err .ti { color: var(--danger); }
.gdz-toast .tbar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--ok); transform-origin: left; animation: toast-bar linear forwards; }
.gdz-toast.err .tbar { background: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes toast-bar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (min-width: 1024px) { .gdz-toast { top: auto; bottom: 24px; } }   /* (desktop: the corner below, clear of the top bar and the "Needs your OK" bar) */
@media (max-width: 1023px) { .gdz-toast { right: 16px; left: 16px; max-width: none; } }
/* counting numbers keep their width steady */
.counting { font-variant-numeric: tabular-nums; }
/* calendar and Gantt: today in cyan, the moving "now", a glow on what is being dragged */
html.dark { --fc-now-indicator-color: #46E3F5; }
.fc .fc-timegrid-now-indicator-line { border-width: 2px 0 0; box-shadow: 0 0 8px var(--neon-2); }
.fc .fc-day-today { box-shadow: inset 0 2px 0 var(--neon); }
.fc .fc-event { transition: box-shadow var(--t-fast); }
.fc .fc-event:hover, .fc .fc-event-dragging, .fc .fc-event-resizing, .fc .fc-event-mirror { box-shadow: 0 0 0 1px var(--neon), 0 0 16px rgba(70,227,245,.55); }
.gt-today { box-shadow: 0 0 10px var(--neon-2); }
.gt-day.today { box-shadow: inset 0 2px 0 var(--neon); }
.dragging { box-shadow: 0 0 0 1px var(--neon), 0 0 18px rgba(70,227,245,.6) !important; }
html[data-fx="light"] .view-in, html[data-fx="light"] .view-in :is(.hx-card, .pg-card) { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .view-in, .view-in :is(.hx-card, .pg-card), .skel i, .gdz-toast, #home-dock::after { animation: none !important; }
  .gdz-toast .tbar { display: none; } :is(#new-job-btn, #top-primary)::after { display: none; }
}
.gdz-toast .chk { stroke-dasharray: 24; stroke-dashoffset: 24; animation: chat-check .5s var(--ease) .1s forwards; }
@media (prefers-reduced-motion: reduce) { .gdz-toast .chk { animation: none; stroke-dashoffset: 0; } }

/* ---------- Fase 73 part 4: screens. Home ---------- */
/* Coming up: a vertical neon rail, today stands out */
/* numbers: a sparkline under each one */
.spark { width: 100%; height: 28px; margin-top: .25rem; overflow: visible; }
/* the checklist's ring */
.sample-bar { border-radius: 10px; background: var(--glass-bg); border: 1px solid var(--glass-border); font-size: 14px; }
.sample-bar p { font-size: 12px !important; }

/* ---------- screens: neon status pills (Quotes, Projects, Materials, Financial) ---------- */
html:is(.dark, :not(.dark)) .fin-badge { --c: #8DA2BC; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); }
html.dark .fin-badge.fin-badge { box-shadow: 0 0 10px color-mix(in srgb, var(--c) 22%, transparent); }
html:is(.dark, :not(.dark)) .fin-badge:is(.paid, .approved, .stg-approved, .delivered, .ok, .hl-ok, .stg-completed) { --c: var(--ok); color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); }
html:is(.dark, :not(.dark)) .fin-badge:is(.unpaid, .stg-awaiting, .quoting, .needed, .hl-warn, .soon, .low, .stg-closing) { --c: var(--amber); color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); }
html:is(.dark, :not(.dark)) .fin-badge:is(.sent, .ordered, .stg-active) { --c: var(--neon); color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); }
html:is(.dark, :not(.dark)) .fin-badge:is(.declined, .stg-lost, .late, .hl-bad, .no) { --c: var(--danger); color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); }
html:is(.dark, :not(.dark)) .fin-badge:is(.open, .outdated) { --c: var(--hx-muted); color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); }
/* Integrations: a status dot, pulsing while connected */
.ig-state { display: inline-flex; align-items: center; gap: .35rem; }
.ig-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.ig-state.ok::before { box-shadow: 0 0 8px var(--ok); animation: live-dot 2s ease-in-out infinite; }
/* Materials: the supplier request in front; a pulsing dot on what is on its way */
html .fin-badge.ordered::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: .35rem; border-radius: 50%; background: var(--neon); box-shadow: 0 0 6px var(--neon); animation: live-dot 1.6s ease-in-out infinite; vertical-align: middle; }
/* Schedule: the two shares in the Brain */
.sc-brain { color: var(--neon); }
/* Gantt: bars with a gradient and a glow, progress that fills on open */
html.dark .gt-bar { background-image: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,0)) !important; box-shadow: 0 0 10px color-mix(in srgb, currentColor 30%, transparent); }
.gt-today { background: var(--neon) !important; }
/* Financial / Reports charts */
#fin-modal svg polyline, #fin-modal svg path[stroke], #view-reports svg path[stroke], #view-reports svg polyline { filter: drop-shadow(0 0 4px rgba(34,211,255,.55)); }
html .fin-tip { background: var(--glass-bg-strong); border-color: var(--glass-border); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
/* Settings: a solid, readable glass */
html .as-page > #settings-form { background: var(--glass-bg-strong) !important; border-color: var(--glass-border); }
@media (prefers-reduced-motion: reduce) { .ig-state.ok::before, html .fin-badge.ordered::before { animation: none; } }
.gt-prog { transform-origin: left; animation: prog-fill .8s var(--ease) .1s both; }
@keyframes prog-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.gt-bar.ms .gt-dia { animation: ms-pulse 2.4s ease-in-out infinite; }
@keyframes ms-pulse { 50% { box-shadow: 0 0 0 4px rgba(70,227,245,.18), 0 0 12px rgba(70,227,245,.6); } }
.gt-bar.late { box-shadow: 0 0 0 2px var(--danger), 0 0 12px rgba(255,92,122,.5) !important; }
@media (prefers-reduced-motion: reduce) { .gt-prog, .gt-bar.ms .gt-dia { animation: none; } }
/* Customers: initials in a ring, quick actions on hover */
.cl-av { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; flex: none; border-radius: 50%; font-family: var(--hx-hud); font-size: 12px; font-weight: 600; color: var(--neon); background: var(--hx-accent-soft); box-shadow: 0 0 0 2px var(--neon), 0 0 10px rgba(70,227,245,.35); }
.cl-av.warn { color: var(--amber); background: rgba(255,181,71,.12); box-shadow: 0 0 0 2px var(--amber), 0 0 10px rgba(255,181,71,.3); }
.gt-chip.planned { color: var(--hx-text); }   /* (contrast ≥ 4.5 in both themes) */

