/* FleetNord — Console maître. Dark, premium, no build step. */

:root {
  --bg: #070b16;
  --bg-2: #0b1020;
  --surface: #0f172a;
  --surface-2: #131c33;
  --surface-3: #192340;
  --border: rgba(148, 163, 184, .12);
  --border-strong: rgba(148, 163, 184, .22);
  --text: #e6ebf5;
  --text-2: #b4bdd0;
  --muted: #7d889f;
  --accent: #3b6cf6;
  --accent-2: #8b5cf6;
  --grad: linear-gradient(135deg, #3b6cf6 0%, #8b5cf6 100%);
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #38bdf8;
  --violet: #a78bfa;
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 22px;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, .75);
  --sidebar: 248px;
  --topbar: 64px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; /* locally installed Inter if present, else the system UI font — no web font is fetched */
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--text); background: var(--bg);
  background-image: radial-gradient(1200px 600px at 10% -10%, rgba(59, 108, 246, .14), transparent 60%), radial-gradient(900px 500px at 100% 0%, rgba(139, 92, 246, .10), transparent 55%);
  background-attachment: fixed; min-height: 100vh; line-height: 1.45; -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01', 'tnum';
}
body.has-overlay { overflow: hidden; }
a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
code { font-family: var(--mono); font-size: .9em; background: rgba(255, 255, 255, .06); padding: 1px 6px; border-radius: 6px; }
pre { font-family: var(--mono); font-size: .85rem; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.block { display: block; }
.mt4 { margin-top: 4px; }
.nowrap { white-space: nowrap; }
.trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.cell-contact { max-width: 220px; }
.trunc-cell > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-clients .cell-co strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.table-clients td, .table-clients th { padding-left: 10px; padding-right: 10px; }
.table-clients .cell-contact { max-width: 200px; }
.text-danger { color: #f87171; }
.text-warning { color: #fbbf24; }
.link { background: none; border: 0; color: var(--info); cursor: pointer; padding: 0; font-size: .86rem; display: inline-flex; align-items: center; gap: 4px; }
.link:hover { text-decoration: underline; }
.icon { flex: 0 0 auto; }

/* ---- Boot ----------------------------------------------------------------- */
.boot { min-height: 100vh; display: grid; place-items: center; color: var(--accent); }
.boot .icon, .boot img { animation: pulse 1.4s ease-in-out infinite; }
.boot-error { text-align: center; padding: 2rem; display: flex; flex-direction: column; gap: 10px; align-items: center; color: var(--text-2); }
@keyframes pulse { 0%, 100% { opacity: .35; transform: scale(.96); } 50% { opacity: 1; transform: scale(1.04); } }

/* ---- Shell ---------------------------------------------------------------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 14px;
  background: linear-gradient(180deg, rgba(15, 23, 42, .9), rgba(7, 11, 22, .95)); border-right: 1px solid var(--border); backdrop-filter: blur(10px);
  z-index: 30;
}
.brand { display: flex; flex-direction: column; gap: 4px; padding: 6px 8px 18px; }
.brand img { width: 150px; height: auto; display: block; }
.brand-tag { font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding-left: 2px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text-2); font-weight: 500; font-size: .93rem;
  transition: background .15s, color .15s; position: relative;
}
.nav-item:hover { background: rgba(255, 255, 255, .05); color: var(--text); text-decoration: none; }
.nav-item.is-active { background: linear-gradient(90deg, rgba(59, 108, 246, .22), rgba(139, 92, 246, .10)); color: #fff; }
.nav-item.is-active::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--grad); }
.nav-item .icon { opacity: .85; }
.nav-badge[hidden] { display: none; }
.nav-badge { margin-left: auto; font-style: normal; font-size: .72rem; font-weight: 700; background: var(--danger); color: #fff; border-radius: 999px; min-width: 20px; height: 20px; display: inline-grid; place-items: center; padding: 0 6px; }
.sidebar-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 6px 0; border-top: 1px solid var(--border); }
.mode-pill { font-size: .72rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; }
.mode-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(255, 255, 255, .06); }
.mode-pill.is-live { color: #4ade80; background: rgba(34, 197, 94, .12); }
.mode-pill.is-mock { color: #fbbf24; background: rgba(245, 158, 11, .14); }
.lang-toggle { background: none; border: 1px solid var(--border); color: var(--text-2); border-radius: 8px; padding: 4px 8px; font-size: .75rem; font-weight: 600; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.lang-toggle:hover { border-color: var(--border-strong); color: var(--text); }
.scrim { display: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--topbar); display: flex; align-items: center; gap: 14px; padding: 0 24px;
  background: rgba(7, 11, 22, .75); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border);
}
.topbar .topbar-menu { display: none; }
.search { position: relative; flex: 1 1 0; min-width: 0; max-width: 560px; display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, .04); border: 1px solid var(--border); border-radius: 12px; padding: 0 12px; height: 40px; color: var(--muted); transition: border-color .15s, box-shadow .15s; }
.search:focus-within { border-color: rgba(59, 108, 246, .6); box-shadow: 0 0 0 4px rgba(59, 108, 246, .14); color: var(--text-2); }
.search input { flex: 1 1 0; width: 100%; background: none; border: 0; color: var(--text); font: inherit; outline: none; min-width: 0; height: 100%; }
.search input::placeholder { color: var(--muted); }
.search kbd { font-family: var(--font); font-size: .7rem; color: var(--muted); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; }
.search-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; max-height: 420px; overflow-y: auto; }
.sr-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; color: var(--text); border-bottom: 1px solid var(--border); }
.sr-item:last-child { border-bottom: 0; }
.sr-item:hover, .sr-item.is-active { background: rgba(59, 108, 246, .14); text-decoration: none; }
.sr-item .icon { color: var(--muted); }
.sr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sr-main strong { font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-main small { color: var(--muted); font-size: .78rem; }
.sr-item em { font-style: normal; font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.sr-empty { padding: 16px; color: var(--muted); font-size: .9rem; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.user-menu { position: relative; }
.user-btn { display: flex; align-items: center; gap: 10px; background: none; border: 1px solid transparent; border-radius: 999px; padding: 4px 10px 4px 4px; cursor: pointer; color: var(--text); }
.user-btn:hover { border-color: var(--border); background: rgba(255, 255, 255, .03); }
.user-name { font-weight: 600; font-size: .9rem; }
.dropdown { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 40; }
.dropdown-head { padding: 10px 12px; display: flex; flex-direction: column; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.dropdown-head span { color: var(--muted); font-size: .8rem; }
.dropdown-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 0; background: none; border-radius: 10px; cursor: pointer; text-align: left; font-size: .9rem; }
.dropdown-item:hover { background: rgba(255, 255, 255, .06); }
.mock-banner { display: flex; align-items: center; gap: 8px; padding: 8px 24px; font-size: .82rem; color: #fcd34d; background: rgba(245, 158, 11, .10); border-bottom: 1px solid rgba(245, 158, 11, .2); }

.content { padding: 28px 28px 60px; min-width: 0; }
.page { max-width: 1440px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; animation: fadeUp .35s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-title { font-size: 1.65rem; font-weight: 800; letter-spacing: -.02em; }
.page-sub { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.page-sub::first-letter { text-transform: uppercase; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.error-box { display: flex; gap: 12px; padding: 18px; border: 1px solid rgba(239, 68, 68, .35); background: rgba(239, 68, 68, .08); border-radius: var(--r-lg); color: #fca5a5; }

/* ---- Cards ---------------------------------------------------------------- */
.card { background: linear-gradient(180deg, rgba(255, 255, 255, .025), rgba(255, 255, 255, 0)), var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 0; }
.card-title { font-size: .95rem; font-weight: 700; }
.card-body { padding: 16px 20px 20px; }
.card-body--flush { padding: 0; }
.card-head + .card-body--flush { padding-top: 12px; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.grid-1-1 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-1-1.tight, .grid-2-1.tight { gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.mini-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 18px 0 8px; }

/* ---- KPI ------------------------------------------------------------------ */
.kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.kpi-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi-grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpi { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px 18px 14px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); min-width: 0; transition: transform .2s var(--ease), border-color .2s; }
.kpi:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.kpi::after { content: ''; position: absolute; inset: auto -30% -60% auto; width: 70%; aspect-ratio: 1; border-radius: 50%; background: var(--kpi-glow, rgba(59, 108, 246, .18)); filter: blur(30px); pointer-events: none; }
.kpi-accent { --kpi-c: #60a5fa; --kpi-glow: rgba(59, 108, 246, .22); }
.kpi-violet { --kpi-c: #a78bfa; --kpi-glow: rgba(139, 92, 246, .22); }
.kpi-info { --kpi-c: #38bdf8; --kpi-glow: rgba(56, 189, 248, .18); }
.kpi-success { --kpi-c: #4ade80; --kpi-glow: rgba(34, 197, 94, .18); }
.kpi-warning { --kpi-c: #fbbf24; --kpi-glow: rgba(245, 158, 11, .2); }
.kpi-danger { --kpi-c: #f87171; --kpi-glow: rgba(239, 68, 68, .22); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-label { font-size: .72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; line-height: 1.25; }
.kpi-icon { color: var(--kpi-c); background: color-mix(in srgb, var(--kpi-c) 14%, transparent); border-radius: 9px; width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 auto; }
.kpi-value { font-size: 1.75rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-foot { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--muted); min-height: 18px; flex-wrap: wrap; }
.kpi:has(.kpi-spark) { padding-bottom: 40px; }
.kpi-sub::first-letter { text-transform: uppercase; }
.kpi-delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; font-size: .78rem; padding: 1px 7px; border-radius: 999px; }
.kpi-delta.up { color: #4ade80; background: rgba(34, 197, 94, .14); }
.kpi-delta.down { color: #f87171; background: rgba(239, 68, 68, .14); }
.kpi-spark { position: absolute; left: 1px; right: 1px; bottom: 0; height: 36px; color: var(--kpi-c); opacity: .85; pointer-events: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 100%); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 100%); }
.kpi-spark .spark { width: 100%; height: 100%; }
.kpi-skel { gap: 12px; }

/* ---- Chips / badges ------------------------------------------------------- */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; line-height: 1.3; border: 1px solid transparent; }
.chip-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip-success { color: #4ade80; background: rgba(34, 197, 94, .13); border-color: rgba(34, 197, 94, .25); }
.chip-info { color: #7dd3fc; background: rgba(56, 189, 248, .12); border-color: rgba(56, 189, 248, .25); }
.chip-warning { color: #fcd34d; background: rgba(245, 158, 11, .13); border-color: rgba(245, 158, 11, .28); }
.chip-danger { color: #fca5a5; background: rgba(239, 68, 68, .13); border-color: rgba(239, 68, 68, .28); }
.chip-violet { color: #c4b5fd; background: rgba(139, 92, 246, .14); border-color: rgba(139, 92, 246, .3); }
.chip-neutral { color: var(--text-2); background: rgba(148, 163, 184, .1); border-color: rgba(148, 163, 184, .18); }
.chip-muted { color: var(--muted); background: rgba(148, 163, 184, .06); border-color: rgba(148, 163, 184, .12); }
.chip-btn { cursor: pointer; }
.chip-btn:hover { border-color: var(--border-strong); color: var(--text); }

/* ---- Buttons -------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 14px; height: 38px; border-radius: 10px; border: 1px solid var(--border-strong); background: rgba(255, 255, 255, .04); color: var(--text); font-weight: 600; font-size: .88rem; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s, box-shadow .15s; text-decoration: none; }
.btn:hover { background: rgba(255, 255, 255, .08); border-color: rgba(148, 163, 184, .35); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 8px 20px -8px rgba(59, 108, 246, .7); }
.btn-primary:hover { background: var(--grad); filter: brightness(1.08); box-shadow: 0 10px 24px -8px rgba(139, 92, 246, .8); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: rgba(255, 255, 255, .06); border-color: transparent; color: var(--text); }
.btn-danger { background: var(--danger); border-color: transparent; color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-danger-ghost { color: #fca5a5; border-color: rgba(239, 68, 68, .35); background: rgba(239, 68, 68, .06); }
.btn-danger-ghost:hover { background: rgba(239, 68, 68, .14); }
.btn-sm { height: 32px; padding: 0 11px; font-size: .82rem; border-radius: 9px; }
.btn-lg { height: 46px; font-size: 1rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn.is-busy { position: relative; color: transparent !important; }
.btn.is-busy::after { content: ''; position: absolute; width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-icon { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 9px; border: 1px solid transparent; background: transparent; color: var(--text-2); cursor: pointer; transition: background .15s, color .15s; }
.btn-icon:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
.btn-icon--solid { background: rgba(15, 23, 42, .8); border-color: var(--border-strong); color: var(--text); }

/* ---- Forms ---------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: .8rem; font-weight: 600; color: var(--text-2); }
.req { color: #f87171; font-style: normal; margin-left: 3px; }
.field-hint { font-size: .76rem; color: var(--muted); }
.field-error { font-size: .76rem; color: #fca5a5; }
.input { width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border-strong); background: rgba(7, 11, 22, .6); color: var(--text); font: inherit; font-size: .92rem; transition: border-color .15s, box-shadow .15s; min-width: 0; }
.input:focus { outline: none; border-color: rgba(59, 108, 246, .7); box-shadow: 0 0 0 4px rgba(59, 108, 246, .15); }
.input::placeholder { color: var(--muted); }
.input.is-invalid { border-color: rgba(239, 68, 68, .7); }
textarea.input { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237d889f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 34px; }
.select option { background: var(--surface); }
input[type='date'].input::-webkit-calendar-picker-indicator { filter: invert(.7); }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--accent); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.wizard-form { display: flex; flex-direction: column; gap: 16px; }
.wizard-form.tight { gap: 12px; }
.wizard-foot { display: flex; justify-content: flex-end; gap: 10px; padding-top: 6px; flex-wrap: wrap; align-items: center; }
.confirm-text { color: var(--text-2); line-height: 1.55; }

/* ---- Toolbar / tabs / segmented ------------------------------------------ */
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.toolbar-group { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar .select { width: auto; min-width: 180px; height: 36px; }
.toolbar-search { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--muted); background: rgba(255, 255, 255, .03); border: 1px solid var(--border); border-radius: 10px; padding: 0 10px; height: 36px; min-width: 220px; }
.toolbar-search .input { border: 0; background: none; height: 100%; padding: 0; box-shadow: none; }
.segmented { display: inline-flex; background: rgba(255, 255, 255, .04); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg { border: 0; background: none; color: var(--text-2); font-weight: 600; font-size: .82rem; padding: 6px 12px; border-radius: 8px; cursor: pointer; transition: background .15s, color .15s; white-space: nowrap; }
.seg:hover { color: var(--text); }
.seg.is-active { background: var(--surface-3); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 4px 12px -6px rgba(0, 0, 0, .6); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 10px 14px; color: var(--text-2); font-weight: 600; font-size: .88rem; cursor: pointer; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tab:hover { color: var(--text); }
.tab.is-active { color: #fff; border-image: var(--grad) 1; }
.tab-count { font-size: .72rem; background: rgba(255, 255, 255, .08); border-radius: 999px; padding: 1px 7px; }
.toolbar .tabs { margin-left: auto; border: 0; }

/* ---- Tables --------------------------------------------------------------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .al-right { text-align: right; }
.table .al-center { text-align: center; }
.table small.block { font-size: .78rem; margin-top: 2px; }
.row-link { cursor: pointer; transition: background .12s; }
.row-link:hover, .row-link:focus-visible { background: rgba(59, 108, 246, .07); outline: none; }
.cell-co { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cell-co strong { display: block; font-weight: 600; }
.cell-co small { color: var(--muted); font-size: .78rem; }
.cell-actions { white-space: nowrap; }
.cell-actions .btn-icon { opacity: .6; }
tr:hover .cell-actions .btn-icon { opacity: 1; }
.avatar { display: inline-grid; place-items: center; border-radius: 10px; font-weight: 700; color: #fff; flex: 0 0 auto; background: linear-gradient(135deg, hsl(var(--h) 70% 52%), hsl(calc(var(--h) + 40) 70% 42%)); letter-spacing: .02em; }
.table-lines td { padding: 10px 20px; }
.table-lines tr.sub td { color: var(--muted); border-bottom: 0; padding: 4px 20px; }
.table-lines tr.sub:first-of-type td { padding-top: 12px; }
.table-lines tr.total td { font-weight: 800; font-size: 1.05rem; border-top: 1px solid var(--border-strong); border-bottom: 0; padding-top: 10px; padding-bottom: 14px; }
.table-taxes th:first-child { width: 50%; }
.table-taxes tr.total td { font-weight: 800; border-top: 1px solid var(--border-strong); }

/* ---- Lists / feeds ------------------------------------------------------- */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty-icon { width: 56px; height: 56px; border-radius: 16px; background: rgba(255, 255, 255, .04); display: grid; place-items: center; color: var(--text-2); }
.dl { display: grid; gap: 10px; }
.dl > div { display: grid; grid-template-columns: 140px 1fr; gap: 10px; font-size: .9rem; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.feed { display: flex; flex-direction: column; }
.feed-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.feed-item:last-child { border-bottom: 0; }
.feed-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(255, 255, 255, .05); color: var(--text-2); flex: 0 0 auto; }
.feed-ticket .feed-icon { color: #7dd3fc; background: rgba(56, 189, 248, .12); }
.feed-payment .feed-icon, .feed-invoice .feed-icon { color: #4ade80; background: rgba(34, 197, 94, .12); }
.feed-backup .feed-icon { color: #c4b5fd; background: rgba(139, 92, 246, .14); }
.feed-client .feed-icon { color: #60a5fa; background: rgba(59, 108, 246, .14); }
.feed-update .feed-icon { color: #fbbf24; background: rgba(245, 158, 11, .14); }
.feed-main { min-width: 0; }
.feed-main p { font-size: .9rem; }
.feed-main small { color: var(--muted); font-size: .78rem; display: block; margin-top: 2px; }
.health-list { display: flex; flex-direction: column; }
.health-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.health-list li:last-child { border-bottom: 0; }
.health-list li > span:first-child { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); }
.attention li a, .client-mini li a { display: flex; align-items: center; gap: 12px; padding: 9px 8px; margin: 0 -8px; border-radius: 10px; color: var(--text); }
.attention li a:hover, .client-mini li a:hover { background: rgba(255, 255, 255, .04); text-decoration: none; }
.att-main, .cm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.att-main strong, .cm-main strong { font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-main small, .cm-main small { color: var(--muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.cm-right strong { font-size: .9rem; }
.all-good { display: flex; align-items: center; gap: 8px; color: #4ade80; font-size: .9rem; margin-top: 14px; }
.chart-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.chart-head strong { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; }
.notes { white-space: pre-wrap; color: var(--text-2); line-height: 1.6; }

/* ---- Charts --------------------------------------------------------------- */
.chart { display: block; max-width: 100%; height: auto; }
.chart .grid { stroke: rgba(148, 163, 184, .12); stroke-dasharray: 3 4; }
.chart .axis { stroke: rgba(148, 163, 184, .35); }
.chart .tick { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .bar { transition: opacity .15s; }
.chart .bar:hover { opacity: .8; }
.bar-accent { fill: #3b6cf6; }
.bar-success { fill: #22c55e; }
.bar-warning { fill: #f59e0b; }
.bar-danger { fill: #ef4444; }
.bar-violet { fill: #8b5cf6; }
.chart-accent { color: #60a5fa; }
.chart-line .dot { fill: var(--surface); stroke: currentColor; stroke-width: 2; }
.chart-line .dot:hover { r: 5; }
.spark-accent { color: #60a5fa; } .spark-violet { color: #a78bfa; } .spark-success { color: #4ade80; } .spark-danger { color: #f87171; }
.donut { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.donut svg { flex: 0 0 auto; }
.donut-seg { transition: opacity .15s; }
.donut-seg:hover { opacity: .8; }
.donut-center { fill: var(--text); font-size: 20px; font-weight: 800; font-family: var(--font); letter-spacing: -.02em; }
.donut-sub { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.legend { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 6px; }
.legend li { display: grid; grid-template-columns: 10px 1fr auto auto; align-items: center; gap: 10px; font-size: .84rem; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.lg-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.lg-val { font-variant-numeric: tabular-nums; font-weight: 600; }
.lg-pct { color: var(--muted); font-size: .76rem; width: 38px; text-align: right; }
.hbars { display: flex; flex-direction: column; gap: 12px; }
.hb-row { display: flex; justify-content: space-between; font-size: .86rem; margin-bottom: 5px; }
.hb-label { color: var(--text-2); }
.hb-val { font-weight: 600; font-variant-numeric: tabular-nums; }
.hb-track { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.hb-fill { height: 100%; border-radius: 999px; background: var(--grad); transition: width .6s var(--ease); }
.hb-success { background: linear-gradient(90deg, #22c55e, #4ade80); }
.hb-info { background: linear-gradient(90deg, #0ea5e9, #38bdf8); }
.hb-warning { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.hb-danger { background: linear-gradient(90deg, #ef4444, #f87171); }
.legend-row { display: flex; gap: 16px; font-size: .8rem; color: var(--text-2); margin-bottom: 6px; flex-wrap: wrap; }
.legend-row span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.sw-success { background: #22c55e; } .sw-warning { background: #f59e0b; } .sw-accent { background: #3b6cf6; }
.aging { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.aging-cell { background: rgba(255, 255, 255, .03); border: 1px solid var(--border); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.aging-cell small { color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; }
.aging-cell strong { font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; }
.tax-net { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 14px; border-radius: 12px; font-size: .9rem; }
.tax-net strong { margin-left: auto; font-size: 1.1rem; }
.tax-net.owe { background: rgba(245, 158, 11, .1); color: #fcd34d; }
.tax-net.refund { background: rgba(34, 197, 94, .1); color: #4ade80; }
.tax-net + .small { margin-top: 10px; }

/* ---- Skeletons ------------------------------------------------------------ */
.skeleton { height: 14px; border-radius: 7px; background: linear-gradient(90deg, rgba(255, 255, 255, .05) 25%, rgba(255, 255, 255, .11) 50%, rgba(255, 255, 255, .05) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
.skeleton-lg { height: 28px; border-radius: 9px; }
.skeleton-title { height: 28px; border-radius: 9px; }
.skeleton-list { display: flex; flex-direction: column; gap: 12px; padding: 4px 0; }
.page-loading { gap: 24px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---- Toasts --------------------------------------------------------------- */
#toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 200; pointer-events: none; max-width: calc(100vw - 40px); }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); font-size: .88rem; font-weight: 500; transform: translateY(12px); opacity: 0; transition: all .25s var(--ease); pointer-events: auto; }
.toast.is-in { transform: none; opacity: 1; }
.toast-success .icon { color: #4ade80; } .toast-danger .icon { color: #f87171; } .toast-info .icon { color: #7dd3fc; }
.toast-danger { border-color: rgba(239, 68, 68, .4); }

/* ---- Overlays ------------------------------------------------------------- */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(2, 6, 18, .62); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; opacity: 0; transition: opacity .18s; }
.overlay.is-in { opacity: 1; }
.modal { width: 100%; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); max-height: calc(100vh - 40px); display: flex; flex-direction: column; transform: translateY(10px) scale(.98); transition: transform .2s var(--ease); }
.overlay.is-in .modal { transform: none; }
.modal-sm { max-width: 440px; } .modal-md { max-width: 620px; } .modal-lg { max-width: 780px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 0; }
.modal-head h2 { font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em; }
.modal-body { padding: 18px 22px 22px; overflow-y: auto; flex: 1; min-height: 0; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 0 22px 20px; flex-wrap: wrap; }
.overlay-panel { place-items: stretch end; padding: 0; }
.panel { width: 100%; height: 100vh; height: 100dvh; background: var(--bg-2); border-left: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; transform: translateX(30px); transition: transform .25s var(--ease); margin-left: auto; }
.overlay.is-in .panel { transform: none; }
.panel-md { max-width: 640px; } .panel-lg { max-width: 860px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 24px 14px; border-bottom: 1px solid var(--border); }
.panel-head h2 { font-size: 1.2rem; font-weight: 800; letter-spacing: -.01em; overflow-wrap: anywhere; }
.panel-sub { color: var(--muted); font-size: .85rem; margin-top: 2px; }
.panel-body { padding: 20px 24px 40px; overflow-y: auto; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 16px; }
.panel-body > * { flex: 0 0 auto; }
.lightbox { place-items: center; cursor: zoom-out; }
.lightbox figure { margin: 0; max-width: min(1100px, 100%); max-height: 90vh; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.lightbox img { max-height: 84vh; max-width: 100%; border-radius: 12px; box-shadow: var(--shadow-lg); }
.lightbox figcaption { color: var(--text-2); font-size: .85rem; }
.lightbox .btn-icon { position: absolute; top: 16px; right: 16px; }

/* ---- Detail panels --------------------------------------------------------- */
.detail-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.dh-main { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 6px; }
.dh-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.dh-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tab-body { display: flex; flex-direction: column; gap: 14px; }
.danger-zone { display: flex; justify-content: flex-end; padding-top: 4px; }
.payments li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.payments li:last-child { border-bottom: 0; }
.payments .icon { color: #4ade80; }

/* ---- Wizard ---------------------------------------------------------------- */
.steps { display: flex; gap: 6px; margin-bottom: 20px; }
.steps li { flex: 1; display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--muted); font-weight: 600; padding-bottom: 10px; border-bottom: 2px solid var(--border); }
.steps li i { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-style: normal; font-size: .72rem; background: rgba(255, 255, 255, .06); flex: 0 0 auto; }
.steps li.is-current { color: #fff; border-image: var(--grad) 1; }
.steps li.is-current i { background: var(--grad); color: #fff; }
.steps li.is-done { color: #4ade80; border-color: rgba(34, 197, 94, .5); }
.steps li.is-done i { background: rgba(34, 197, 94, .2); color: #4ade80; }
.subdomain { display: flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 10px; background: rgba(7, 11, 22, .6); overflow: hidden; }
.subdomain:focus-within { border-color: rgba(59, 108, 246, .7); box-shadow: 0 0 0 4px rgba(59, 108, 246, .15); }
.subdomain input { flex: 1; min-width: 0; background: none; border: 0; height: 40px; padding: 0 12px; color: var(--text); font: inherit; outline: none; font-family: var(--mono); }
.sd-suffix { padding: 0 12px; color: var(--muted); font-family: var(--mono); font-size: .9rem; background: rgba(255, 255, 255, .03); height: 40px; display: grid; place-items: center; border-left: 1px solid var(--border); }
.sd-preview { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; border-radius: 10px; background: rgba(59, 108, 246, .08); border: 1px dashed rgba(59, 108, 246, .35); font-size: .9rem; }
.sd-preview strong { font-family: var(--mono); font-weight: 600; overflow-wrap: anywhere; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.plan-card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--border-strong); border-radius: 14px; background: rgba(255, 255, 255, .02); cursor: pointer; transition: border-color .15s, background .15s; }
.plan-card input { position: absolute; opacity: 0; pointer-events: none; }
.plan-card strong { font-size: .95rem; }
.plan-card span { font-weight: 700; font-size: 1.1rem; letter-spacing: -.02em; }
.plan-card small { color: var(--muted); font-size: .78rem; }
.plan-card.is-selected { border-color: var(--accent); background: rgba(59, 108, 246, .12); box-shadow: 0 0 0 3px rgba(59, 108, 246, .18); }
.summary-box { background: rgba(255, 255, 255, .03); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.summary-box h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 10px; }
.done { display: flex; flex-direction: column; gap: 14px; }
.done-icon { width: 56px; height: 56px; border-radius: 50%; background: rgba(34, 197, 94, .15); color: #4ade80; display: grid; place-items: center; animation: pop .45s var(--ease); }
@keyframes pop { from { transform: scale(.5); opacity: 0; } to { transform: none; opacity: 1; } }
.done h3 { font-size: 1.25rem; font-weight: 800; }
.pw { font-size: 1.05rem; letter-spacing: .05em; color: #fcd34d; }
.welcome { border: 1px solid var(--border-strong); border-radius: 12px; overflow: hidden; }
.welcome-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: rgba(255, 255, 255, .03); border-bottom: 1px solid var(--border); font-size: .88rem; }
.welcome pre { margin: 0; padding: 14px; white-space: pre-wrap; font-family: var(--font); font-size: .88rem; line-height: 1.55; color: var(--text-2); max-height: 260px; overflow: auto; }
.check-row { display: flex; gap: 20px; flex-wrap: wrap; }
.extra-lines { display: flex; flex-direction: column; gap: 8px; }
.line-row { display: grid; grid-template-columns: 1fr 130px 34px; gap: 8px; align-items: center; }
.entry-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: .88rem; }
.total-line { margin-left: auto; font-size: .95rem; }
.total-line strong { font-size: 1.1rem; }
.receipt-box { border: 1px dashed var(--border-strong); border-radius: 12px; padding: 12px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.receipt-thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }
.receipt-actions { display: flex; gap: 8px; }

/* ---- Tickets --------------------------------------------------------------- */
.ticket-list { display: flex; flex-direction: column; gap: 8px; }
.ticket-list.compact { gap: 4px; }
.tk, .ticket-list.compact a { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; color: var(--text); transition: border-color .15s, transform .15s var(--ease); }
.ticket-list.compact a { padding: 10px 12px; }
.tk:hover, .ticket-list.compact a:hover { border-color: var(--border-strong); transform: translateX(2px); text-decoration: none; }
.tk-kind { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: 0 0 auto; }
.tk-kind.lg { width: 48px; height: 48px; border-radius: 14px; }
.tk-bug { color: #fca5a5; background: rgba(239, 68, 68, .14); }
.tk-idea { color: #fcd34d; background: rgba(245, 158, 11, .14); }
.tk-question { color: #7dd3fc; background: rgba(56, 189, 248, .14); }
.tk-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tk-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tk-title strong { font-weight: 600; }
.tk-main small { color: var(--muted); font-size: .78rem; display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.ticket-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; align-items: start; }
.ticket-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ticket-body { white-space: pre-wrap; line-height: 1.6; color: var(--text-2); }
.thread { display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; }
.thread li { display: flex; gap: 10px; }
.thread li > div { flex: 1; min-width: 0; background: rgba(255, 255, 255, .03); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.thread li.mine > div { background: rgba(59, 108, 246, .1); border-color: rgba(59, 108, 246, .3); }
.th-meta { display: flex; justify-content: space-between; gap: 10px; font-size: .78rem; margin-bottom: 4px; }
.th-meta time { color: var(--muted); }
.thread p { font-size: .9rem; white-space: pre-wrap; line-height: 1.55; }
.reply-box { display: flex; flex-direction: column; gap: 10px; }
.reply-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.console-errors { margin: 0; padding: 12px 16px 16px; color: #fca5a5; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .78rem; line-height: 1.5; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.photo { padding: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: none; cursor: zoom-in; aspect-ratio: 4/3; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- Announcements ------------------------------------------------------- */
.ann-list { display: flex; flex-direction: column; gap: 12px; }
.ann { border-radius: 14px; border: 1px solid; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.ann-info { background: rgba(56, 189, 248, .08); border-color: rgba(56, 189, 248, .3); }
.ann-warning { background: rgba(245, 158, 11, .09); border-color: rgba(245, 158, 11, .35); }
.ann.is-dim { opacity: .62; }
.ann-preview { display: flex; gap: 10px; align-items: flex-start; }
.ann-icon { flex: 0 0 auto; margin-top: 2px; }
.ann-info .ann-icon { color: #7dd3fc; } .ann-warning .ann-icon { color: #fcd34d; }
.ann-fr { font-weight: 500; }
.ann-en { font-size: .85rem; color: var(--text-2); margin-top: 4px; font-style: italic; }
.ann-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .82rem; padding-top: 8px; border-top: 1px solid var(--border); }
.ann-meta .muted { display: inline-flex; align-items: center; gap: 5px; }
.ann-actions { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.ann.preview { flex-direction: row; align-items: flex-start; padding: 10px 14px; font-size: .9rem; }
.ann-live { display: flex; flex-direction: column; gap: 6px; }

/* ---- Journal --------------------------------------------------------------- */
.journal { display: flex; flex-direction: column; gap: 20px; }
.j-day h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 6px; padding-left: 2px; }
.j-day h3::first-letter { text-transform: uppercase; }
.j-day .feed { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 4px 16px; }

/* ---- Login ----------------------------------------------------------------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { position: relative; overflow: hidden; background: radial-gradient(900px 600px at 20% 20%, rgba(59, 108, 246, .35), transparent 60%), radial-gradient(700px 500px at 90% 80%, rgba(139, 92, 246, .3), transparent 60%), var(--bg); display: flex; align-items: center; padding: 60px; }
.orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: float 12s ease-in-out infinite; }
.orb-1 { width: 420px; height: 420px; background: #3b6cf6; top: -120px; left: -100px; }
.orb-2 { width: 360px; height: 360px; background: #8b5cf6; bottom: -120px; right: -60px; animation-delay: -6s; }
@keyframes float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(20px, -24px); } }
.grid-lines { position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%); }
.login-claims { position: relative; display: flex; flex-direction: column; gap: 22px; max-width: 460px; }
.login-claims img { width: 220px; height: auto; }
.login-claims h2 { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; background: linear-gradient(90deg, #fff, #c7d2fe); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-claims ul { display: flex; flex-direction: column; gap: 10px; color: var(--text-2); font-size: .95rem; }
.login-claims li { display: flex; align-items: center; gap: 10px; }
.login-claims li .icon { color: #a5b4fc; }
.login-side { display: grid; place-items: center; padding: 40px 24px; }
.login-card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 14px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-xl); padding: 34px 32px; box-shadow: var(--shadow-lg); }
.login-logo { width: 48px; height: 48px; border-radius: 12px; }
.login-card h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.login-card .muted { margin-top: -8px; font-size: .88rem; }
.input-wrap { position: relative; display: block; }
.input-wrap .input { padding-right: 42px; }
.eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); width: 30px; height: 30px; display: grid; place-items: center; cursor: pointer; border-radius: 8px; }
.eye:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.login-error { color: #fca5a5; background: rgba(239, 68, 68, .1); border: 1px solid rgba(239, 68, 68, .3); border-radius: 10px; padding: 9px 12px; font-size: .86rem; }
.login-hint { display: flex; align-items: center; gap: 6px; color: #fcd34d; font-size: .82rem; justify-content: center; }
.login-foot { display: flex; justify-content: center; gap: 8px; align-items: center; font-size: .82rem; margin-top: 6px; }

/* ---- Responsive ------------------------------------------------------------ */
@media (max-width: 1280px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi-grid--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-2-1 { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; width: var(--sidebar); transform: translateX(-100%); transition: transform .25s var(--ease); box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; background: rgba(2, 6, 18, .6); z-index: 25; opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.nav-open .scrim { opacity: 1; pointer-events: auto; }
  .topbar .topbar-menu { display: inline-grid; }
  .content { padding: 20px 20px 48px; }
  .grid-1-1 { grid-template-columns: 1fr; }
  .ticket-grid { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
}
@media (max-width: 720px) {
  html { font-size: 14.5px; }
  .topbar { padding: 0 14px; gap: 8px; }
  .search kbd, .user-name, .topbar-new span, .user-btn > .icon { display: none; }
  .user-btn { padding: 4px; }
  .topbar-new { padding: 0 8px; }
  .content { padding: 16px 16px 40px; }
  .page-title { font-size: 1.35rem; }
  .kpi-grid, .kpi-grid--3, .kpi-grid--4, .kpi-grid--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 12px 14px 12px; }
  .kpi-value { font-size: 1.35rem; }
  .kpi-spark { height: 26px; opacity: .6; }
  .kpi:has(.kpi-spark) { padding-bottom: 30px; }
  .toolbar-search { margin-left: 0; width: 100%; min-width: 0; }
  .toolbar .tabs { margin-left: 0; width: 100%; }
  .segmented { width: 100%; }
  .seg { flex: 1; padding: 6px 8px; font-size: .78rem; }
  .toolbar .select { width: 100%; }
  .toolbar-group { width: 100%; }
  .toolbar-group .select { flex: 1; min-width: 0; }
  .card-head { padding: 14px 16px 0; }
  .card-body { padding: 14px 16px 16px; }
  .aging { grid-template-columns: repeat(2, 1fr); }
  .donut { justify-content: center; }
  .dl > div { grid-template-columns: 1fr; gap: 2px; }
  .modal-body, .panel-body { padding: 16px; }
  .modal-head, .panel-head { padding: 16px 16px 0; }
  .panel-head { padding-bottom: 12px; }
  .modal-foot { padding: 0 16px 16px; }
  .steps li span { display: none; }
  .steps li { justify-content: center; }
  .line-row { grid-template-columns: 1fr 100px 34px; }
  .tk { padding: 12px; gap: 10px; }
  .tk > .chip { display: none; }
  .legend li { grid-template-columns: 10px 1fr auto; }
  .lg-pct { display: none; }
  #toasts { right: 12px; left: 12px; bottom: 12px; }
  /* Tables → stacked cards */
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 10px 14px; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
  .table tr:last-child { border-bottom: 0; }
  .table td { border: 0; padding: 4px 0; text-align: left !important; white-space: normal !important; min-width: 0; }
  .table td .nowrap { white-space: normal; }
  .trunc, .cell-contact, .trunc-cell > span { max-width: none; }
  .table td::before { content: attr(data-th); display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 1px; }
  .table td[data-th='']::before { display: none; }
  .table td:first-child { grid-column: 1 / -1; }
  .table td.cell-actions { grid-column: 1 / -1; text-align: right !important; display: flex; justify-content: flex-end; gap: 4px; }
  .table td.cell-actions .btn-icon { opacity: 1; }
  .table-lines tr, .table-taxes tr { display: table-row; padding: 0; }
  .table-lines td, .table-taxes td, .table-taxes th { display: table-cell; width: auto; padding: 8px 14px; border-bottom: 1px solid var(--border); }
  .table-lines td::before, .table-taxes td::before { display: none; }
  .table-taxes thead { display: table-header-group; }
  .table-lines .al-right, .table-taxes .al-right { text-align: right !important; }
  .table-lines, .table-taxes { display: table; }
  .table-lines tbody, .table-taxes tbody { display: table-row-group; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .sidebar, .topbar, .mock-banner, #toasts { display: none !important; }
  .shell { display: block; }
  body { background: #fff; color: #000; }
}

.chart-empty { display: grid; place-items: center; color: var(--muted); border: 1px dashed var(--border); border-radius: 12px; font-size: .9rem; }

/* ---- 2.9 additions ----------------------------------------------------------- */
.chart-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.run-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.run-list li { display: flex; align-items: center; gap: 8px; font-size: .88rem; padding: 6px 0; border-bottom: 1px solid var(--border); }
.run-list li:last-child { border-bottom: 0; }
.run-list li em { margin-left: auto; font-style: normal; font-weight: 600; }
.run-list li.is-done { color: var(--muted); }
.run-list li.is-done .icon { color: #4ade80; }
.dot-new { width: 8px; height: 8px; border-radius: 50%; background: var(--info); box-shadow: 0 0 0 3px rgba(56, 189, 248, .2); display: inline-block; }
.receipt-thumb.pdf { display: grid; place-items: center; background: rgba(255, 255, 255, .06); color: var(--text-2); font-weight: 700; font-size: .8rem; }
a.plain { color: inherit; }
.ann-success { background: rgba(34, 197, 94, .09); border-color: rgba(34, 197, 94, .35); }
.ann-success .ann-icon { color: #4ade80; }
.ann-danger { background: rgba(239, 68, 68, .09); border-color: rgba(239, 68, 68, .35); }
.ann-danger .ann-icon { color: #fca5a5; }
.page > .tabs { margin-bottom: -6px; }
@media (max-width: 720px) {
  .chart-scroll .chart { min-width: 560px; }
  .card-body .chart-line { min-width: 480px; }
  .card-body:has(> .chart-line) { overflow-x: auto; }
}
