/* ===== Protec — Sistema (gerente e colaborador) ===== */
:root {
  --bg: #0b0b0c; --bg-2: #111113; --surface: #17171b; --surface-2: #1e1e23;
  --line: rgba(255,255,255,.08); --line-gold: rgba(212,175,55,.25);
  --text: #f3efe6; --muted: #a39e96; --faint: #6f6a63;
  --gold-1: #f7e08a; --gold-2: #d4a72c; --gold-3: #9c7313;
  --gold: linear-gradient(135deg, var(--gold-1), var(--gold-2) 45%, var(--gold-3));
  --ok: #22c55e; --warn: #f59e0b; --bad: #ef4444; --info: #3b82f6; --mute: #6b7280; --purple: #a855f7;
  --head: "Montserrat", system-ui, sans-serif; --body: "Inter", system-ui, sans-serif;
  --r: 14px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 400 14.5px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
body.is-loading main, body.is-loading .sidebar { visibility: hidden; }
a { color: var(--gold-1); text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--head); margin: 0; line-height: 1.2; }
p { margin: 0; }
img { max-width: 100%; display: block; }
.gold-text { background: var(--gold); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12.5px; }
.hide { display: none !important; }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 13px/1 var(--head); letter-spacing: .03em; padding: 11px 16px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text); cursor: pointer;
  transition: border-color .2s, background .2s, transform .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--gold-2); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.btn--gold { background: var(--gold); color: #141006; border-color: transparent; }
.btn--danger { color: #fca5a5; border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.08); }
.btn--ghost { background: transparent; }
.btn--sm { padding: 7px 10px; font-size: 12px; border-radius: 8px; }
.btn--lg { padding: 18px 22px; font-size: 15px; border-radius: 14px; }
.btn--block { width: 100%; }
.icon-btn { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 8px; }
.icon-btn:hover { color: var(--gold-1); background: rgba(255,255,255,.05); }
.spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; font: 600 12px/1.2 var(--head); color: var(--muted); }
.field input, .field select, .field textarea, .input {
  width: 100%; font: 400 14.5px/1.4 var(--body); color: var(--text);
  background: #0e0e11; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px;
}
.field textarea { resize: vertical; min-height: 70px; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: none; border-color: var(--gold-2); box-shadow: 0 0 0 3px rgba(212,167,44,.15); }
.field select option { background: var(--surface); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.span2 { grid-column: span 2; } .span3 { grid-column: span 3; }
.form { display: grid; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip input { display: none; }
.chip span { display: inline-block; padding: 7px 11px; border-radius: 999px; border: 1px solid var(--line); font: 600 12px/1 var(--head); color: var(--muted); cursor: pointer; }
.chip input:checked + span { background: rgba(212,167,44,.15); border-color: var(--gold-2); color: var(--gold-1); }
.check { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; }
.check:hover { border-color: var(--line-gold); }
.check input { accent-color: var(--gold-2); width: 16px; height: 16px; }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; font: 700 11px/1.2 var(--head); letter-spacing: .02em; white-space: nowrap; background: rgba(255,255,255,.06); color: var(--muted); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge--ok { background: rgba(34,197,94,.12); color: #4ade80; }
.badge--warn { background: rgba(245,158,11,.12); color: #fbbf24; }
.badge--bad { background: rgba(239,68,68,.13); color: #f87171; }
.badge--info { background: rgba(59,130,246,.13); color: #60a5fa; }
.badge--purple { background: rgba(168,85,247,.13); color: #c084fc; }
.badge--mute { background: rgba(255,255,255,.05); color: #9ca3af; }
.badge--dark { background: rgba(255,255,255,.03); color: #6b7280; }

/* ---------- layout admin ---------- */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; background: #08080a; border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 20px 14px; }
.sb-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 22px; }
.sb-brand img { width: 38px; }
.sb-brand strong { display: block; font: 900 16px/1 var(--head); letter-spacing: .08em; }
.sb-brand small { font: 600 9.5px/1 var(--head); letter-spacing: .3em; color: var(--gold-2); }
.sb-nav { display: grid; gap: 4px; }
.sb-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; color: var(--muted); font: 600 13.5px/1 var(--head); position: relative; }
.sb-nav a svg { width: 18px; height: 18px; flex: none; }
.sb-nav a:hover { color: var(--text); background: rgba(255,255,255,.03); }
.sb-nav a.active { color: var(--gold-1); background: rgba(212,167,44,.1); }
.sb-nav a.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold-2); }
.sb-nav .count { margin-left: auto; background: var(--gold-2); color: #111; font-size: 11px; padding: 3px 7px; border-radius: 999px; }
.sb-user { margin-top: auto; border-top: 1px solid var(--line); padding: 14px 8px 0; display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--gold); color: #141006; display: grid; place-items: center; font: 800 13px/1 var(--head); flex: none; }
.sb-user div { min-width: 0; flex: 1; }
.sb-user strong { display: block; font: 700 13px/1.2 var(--head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main { padding: 26px clamp(16px, 3vw, 36px) 60px; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.topbar h1 { font-size: 24px; font-weight: 800; }
.topbar p { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.mobile-bar { display: none; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel__head h2 { font-size: 15px; font-weight: 800; }
.panel__body { padding: 16px 18px; }
.panel + .panel, .row + .panel, .panel + .row, .row + .row { margin-top: 18px; }
.row { display: grid; gap: 18px; }
.row--2 { grid-template-columns: 1.4fr 1fr; }
.row--2e { grid-template-columns: 1fr 1fr; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; position: relative; overflow: hidden; cursor: default; }
.kpi[data-filter] { cursor: pointer; }
.kpi[data-filter]:hover, .kpi.sel { border-color: var(--gold-2); }
.kpi small { display: block; color: var(--muted); font: 600 11.5px/1.2 var(--head); text-transform: uppercase; letter-spacing: .05em; }
.kpi strong { display: block; font: 800 28px/1.1 var(--head); margin-top: 8px; }
.kpi::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c, var(--gold-2)); }

/* tabelas */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font: 700 11px/1 var(--head); text-transform: uppercase; letter-spacing: .06em; color: var(--faint); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.04); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: rgba(255,255,255,.02); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.cell-strong { font-weight: 600; }
.empty { padding: 36px 16px; text-align: center; color: var(--faint); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.filters .field { min-width: 150px; }

/* quadro de colaboradores */
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.person { display: flex; gap: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); align-items: flex-start; }
.person .avatar { width: 38px; height: 38px; background: var(--surface-2); color: var(--text); border: 2px solid var(--c, var(--mute)); }
.person div { min-width: 0; flex: 1; }
.person strong { display: block; font: 700 13.5px/1.25 var(--head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person .where { color: var(--muted); font-size: 12.5px; margin: 3px 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.alert-list { display: grid; gap: 8px; }
.alert { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; background: rgba(239,68,68,.07); border: 1px solid rgba(239,68,68,.25); }
.alert--ok { background: rgba(34,197,94,.06); border-color: rgba(34,197,94,.22); }
.alert strong { font: 700 13.5px/1.3 var(--head); display: block; }
.alert .grow { flex: 1; min-width: 0; }

.map { height: 380px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #1a1a1a; }
.map--sm { height: 260px; }
.leaflet-container { font-family: var(--body); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: #17171b; color: var(--text); }
.leaflet-popup-content { margin: 10px 12px; font-size: 13px; }
.pin { background: none; border: 0; }
.pin .dot { display: block; width: 18px; height: 18px; border-radius: 50%; background: var(--c); border: 3px solid #fff; box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 30%, transparent); }

.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }

/* calendário */
.cal-head { display: flex; align-items: center; gap: 10px; }
.cal-head h2 { min-width: 170px; text-align: center; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.cal__dow { padding: 10px; font: 700 11px/1 var(--head); text-transform: uppercase; color: var(--faint); letter-spacing: .06em; border-bottom: 1px solid var(--line); }
.cal__day { min-height: 118px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px; cursor: pointer; transition: background .15s; }
.cal__day:nth-child(7n) { border-right: 0; }
.cal__day:hover { background: rgba(255,255,255,.02); }
.cal__day.out { opacity: .35; }
.cal__day.today .cal__n { background: var(--gold); color: #141006; }
.cal__n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font: 700 12px/1 var(--head); color: var(--muted); }
.ev { display: block; margin-top: 4px; padding: 4px 6px; border-radius: 6px; font-size: 11.5px; line-height: 1.25; background: rgba(212,167,44,.1); border-left: 3px solid var(--ev, var(--gold-2)); color: var(--text); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; }
.ev:hover { background: rgba(212,167,44,.2); }
.ev b { font-weight: 700; }
.more { display: block; font-size: 11px; color: var(--gold-2); margin-top: 4px; }

/* clientes */
.client { border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); }
.client + .client { margin-top: 12px; }
.client__head { display: flex; gap: 12px; align-items: center; padding: 14px 16px; flex-wrap: wrap; }
.client__head h3 { font-size: 15px; }
.client__head .grow { flex: 1; min-width: 180px; }
.place { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.place .grow { flex: 1; min-width: 200px; }
.place strong { font: 700 13.5px/1.3 var(--head); }

/* dialog */
dialog { background: var(--surface); color: var(--text); border: 1px solid var(--line-gold); border-radius: 18px; padding: 0; width: min(620px, calc(100% - 24px)); max-height: calc(100vh - 32px); box-shadow: 0 40px 80px -20px rgba(0,0,0,.8); }
dialog.wide { width: min(860px, calc(100% - 24px)); }
dialog::backdrop { background: rgba(0,0,0,.7); backdrop-filter: blur(3px); }
.dlg__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 5; }
.dlg__head h3 { font-size: 17px; font-weight: 800; }
.dlg__body { padding: 18px 20px; }
.dlg__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.dlg__foot .left { margin-right: auto; }

/* toast */
#toasts { position: fixed; z-index: 9999; right: 16px; bottom: 16px; display: grid; gap: 8px; max-width: calc(100% - 32px); }
.toast { padding: 12px 16px; border-radius: 12px; background: #1f1f24; border: 1px solid var(--line); border-left: 4px solid var(--ok); box-shadow: 0 16px 40px -10px rgba(0,0,0,.6); font-size: 14px; animation: tin .25s ease; transition: opacity .3s, transform .3s; }
.toast--bad { border-left-color: var(--bad); }
.toast--warn { border-left-color: var(--warn); }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(50% 50% at 50% 30%, rgba(212,167,44,.14), transparent 70%), var(--bg); }
.login__card { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--line-gold); border-radius: 22px; padding: 32px 26px; box-shadow: 0 40px 80px -30px rgba(0,0,0,.9); }
.login__card img { width: 96px; margin: 0 auto 16px; filter: drop-shadow(0 14px 30px rgba(212,167,44,.35)); }
.login__card h1 { text-align: center; font-size: 22px; font-weight: 900; letter-spacing: .04em; }
.login__card > p { text-align: center; color: var(--muted); margin: 6px 0 24px; font-size: 13.5px; }
.pw { position: relative; }
.pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }

/* ---------- colaborador (mobile first) ---------- */
.colab { max-width: 560px; margin: 0 auto; padding: 0 16px 100px; }
.colab-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin: 0 -16px 14px; background: rgba(11,11,12,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.colab-top img { width: 34px; }
.colab-top div { flex: 1; min-width: 0; }
.colab-top strong { display: block; font: 800 14.5px/1.2 var(--head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(8,8,10,.96); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); backdrop-filter: blur(10px); }
.tabs button { background: none; border: 0; color: var(--faint); font: 700 11px/1 var(--head); display: grid; justify-items: center; gap: 5px; padding: 8px 4px; cursor: pointer; border-radius: 10px; }
.tabs button svg { width: 22px; height: 22px; }
.tabs button.active { color: var(--gold-1); background: rgba(212,167,44,.08); }

.clock { text-align: center; padding: 22px 16px 18px; }
.clock strong { display: block; font: 800 54px/1 var(--head); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.clock span { color: var(--muted); font-size: 14px; }
.shift { padding: 16px; border-radius: 16px; background: linear-gradient(180deg, rgba(212,167,44,.1), rgba(212,167,44,.03)); border: 1px solid var(--line-gold); }
.shift small { display: block; font: 700 11px/1 var(--head); text-transform: uppercase; letter-spacing: .1em; color: var(--gold-2); margin-bottom: 8px; }
.shift h3 { font-size: 18px; font-weight: 800; }
.shift p { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.shift .hrs { font: 800 15px/1 var(--head); color: var(--text); margin-top: 10px; }
.shift--none { background: var(--surface); border-color: var(--line); }
.tipo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0 12px; }
.tipo-grid label input { display: none; }
.tipo-grid label span { display: block; text-align: center; padding: 13px 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font: 700 13px/1 var(--head); color: var(--muted); cursor: pointer; }
.tipo-grid label input:checked + span { border-color: var(--gold-2); color: var(--gold-1); background: rgba(212,167,44,.1); }
.punch { width: 100%; padding: 22px; border-radius: 18px; border: 0; background: var(--gold); color: #141006; font: 900 18px/1 var(--head); letter-spacing: .04em; text-transform: uppercase; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 12px; box-shadow: 0 18px 40px -14px rgba(212,167,44,.65); }
.punch svg { width: 26px; height: 26px; }
.punch:disabled { opacity: .7; }
.hint { text-align: center; color: var(--faint); font-size: 12.5px; margin-top: 10px; }
.section-title { font: 800 13px/1 var(--head); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 26px 0 10px; }
.log { display: grid; gap: 8px; }
.log__item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.log__item strong { font: 800 16px/1 var(--head); min-width: 52px; }
.log__item .grow { flex: 1; min-width: 0; }

.result { text-align: center; padding: 6px 0 4px; }
.result__icon { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px; }
.result__icon svg { width: 40px; height: 40px; }
.result--ok .result__icon { background: rgba(34,197,94,.15); color: #4ade80; }
.result--bad .result__icon { background: rgba(239,68,68,.15); color: #f87171; }
.result--warn .result__icon { background: rgba(245,158,11,.15); color: #fbbf24; }
.result h3 { font-size: 21px; font-weight: 900; }
.result p { color: var(--muted); margin-top: 6px; }
.result .big { font: 900 30px/1.1 var(--head); margin-top: 12px; }

.day { border-radius: 14px; border: 1px solid var(--line); background: var(--surface); padding: 14px; }
.day + .day { margin-top: 10px; }
.day.is-today { border-color: var(--gold-2); }
.day__date { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.day__date strong { font: 800 15px/1 var(--head); }
.day__item + .day__item { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.day__item h4 { font-size: 15px; font-weight: 800; }
.day__links { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.tg-card { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: rgba(42,171,238,.08); border: 1px solid rgba(42,171,238,.3); margin-bottom: 14px; }
.tg-card svg { width: 34px; height: 34px; color: #2aabee; flex: none; }
.tg-card .grow { flex: 1; }

/* ---------- responsivo ---------- */
@media (max-width: 1280px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1100px) { .row--2, .row--2e { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 100; left: 0; top: 0; width: 270px; transform: translateX(-100%); transition: transform .3s; }
  .sidebar.open { transform: none; box-shadow: 30px 0 60px rgba(0,0,0,.6); }
  .mobile-bar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 50; padding: 12px 16px; background: rgba(8,8,10,.95); border-bottom: 1px solid var(--line); }
  .mobile-bar img { width: 30px; }
  .mobile-bar strong { font: 900 15px/1 var(--head); letter-spacing: .08em; flex: 1; }
  .main { padding-top: 18px; }
  .cal__day { min-height: 84px; padding: 4px; }
  .ev { font-size: 10.5px; padding: 3px 4px; }
  .ev .loc { display: none; }
}
@media (max-width: 600px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .span2, .span3 { grid-column: auto; }
  .cal__dow { padding: 6px 2px; font-size: 9.5px; text-align: center; }
  .cal__day { min-height: 64px; }
  .ev { font-size: 0; height: 6px; padding: 0; margin-top: 3px; border-left: 0; background: var(--ev, var(--gold-2)); }
  .ev * { display: none; }
  .more { font-size: 10px; }
  .topbar h1 { font-size: 20px; }
  .map { height: 300px; }
}

/* ===================== FINANCEIRO ===================== */
.fin { --s1:#c98500; --s2:#3987e5; --s3:#d95926; --s4:#199e70; --s5:#9085e9;  /* paleta validada (CVD) */
  --good:#0ca30c; --warning:#fab219; --serious:#ec835a; --critical:#d03b3b; --grid:#2a2a2e; --axis:#3a3a3f; }
.fin-tabs { display:flex; gap:4px; flex-wrap:wrap; background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:4px; }
.fin-tabs button { background:none; border:0; color:var(--muted); font:700 12.5px/1 var(--head); padding:9px 12px; border-radius:9px; cursor:pointer; }
.fin-tabs button:hover { color:var(--text); }
.fin-tabs button.on { color:var(--gold-1); background:rgba(212,167,44,.12); }
.fkpis { display:grid; grid-template-columns:repeat(6,1fr); gap:12px; }
.fkpi { background:var(--surface); border:1px solid var(--line); border-radius:var(--r); padding:15px 16px; }
.fkpi small { display:block; color:var(--muted); font:700 11px/1.2 var(--head); text-transform:uppercase; letter-spacing:.06em; }
.fkpi strong { display:block; font:800 24px/1.1 var(--head); margin-top:9px; white-space:nowrap; }
.fkpi .d { display:block; font-size:12px; color:var(--muted); margin-top:6px; }
.fkpi--hero { background:linear-gradient(160deg,rgba(212,167,44,.16),rgba(212,167,44,.03) 60%),var(--surface); border-color:var(--line-gold); }
.up { color:#4ade80; } .down { color:#f87171; }
.fgrid { display:grid; gap:16px; margin-top:16px; }
.fg-2 { grid-template-columns:1.55fr 1fr; } .fg-2e { grid-template-columns:1fr 1fr; }
.fcard { background:var(--surface); border:1px solid var(--line); border-radius:var(--r); min-width:0; }
.fcard__h { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:15px 18px 6px; flex-wrap:wrap; }
.fcard__h h2 { font-size:15px; font-weight:800; } .fcard__h p { color:var(--muted); font-size:12.5px; margin-top:3px; }
.fcard__b { padding:10px 18px 18px; }
.fin .legend i.ln { height:2px; width:14px; border-radius:2px; vertical-align:3px; }
.linkbtn { background:none; border:0; color:var(--gold-2); font:600 12px/1 var(--body); cursor:pointer; padding:4px 0; }
.fchart { position:relative; } .fchart svg { display:block; width:100%; overflow:visible; }
.ftip { position:absolute; pointer-events:none; z-index:5; background:#0f0f12; border:1px solid var(--line-gold); border-radius:10px; padding:9px 11px; font-size:12.5px; min-width:170px; box-shadow:0 14px 30px -10px rgba(0,0,0,.7); opacity:0; transition:opacity .12s; }
.ftip.on { opacity:1; } .ftip b { font-family:var(--head); display:block; margin-bottom:4px; }
.ftip .r { display:flex; justify-content:space-between; gap:14px; } .ftip .r span:last-child { font-variant-numeric:tabular-nums; }
.ftip i { display:inline-block; width:8px; height:8px; border-radius:2px; margin-right:6px; }
.fbars { display:grid; gap:7px; }
.fbar { display:grid; grid-template-columns:minmax(110px,190px) 1fr auto; gap:10px; align-items:center; font-size:13px; }
.fbar:hover .fbar__t { filter:brightness(1.18); }
.fbar__n { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:var(--muted); }
.fbar__tr { height:14px; position:relative; }
.fbar__t { position:absolute; left:0; top:0; bottom:0; border-radius:0 4px 4px 0; background:var(--s1); }
.fbar__v { font-variant-numeric:tabular-nums; font-weight:600; min-width:84px; text-align:right; }
.fseg { display:flex; height:42px; gap:2px; border-radius:8px; overflow:hidden; margin:6px 0 14px; }
.fseg div { height:100%; display:flex; align-items:center; justify-content:center; font:800 12px/1 var(--head); color:#fff; min-width:0; }
.fseg div:hover { filter:brightness(1.15); }
.fseg-list { display:grid; gap:8px; }
.fseg-row { display:grid; grid-template-columns:14px 1fr auto auto; gap:10px; align-items:center; font-size:13px; }
.fseg-row i { width:12px; height:12px; border-radius:3px; }
.fseg-row .v { font-variant-numeric:tabular-nums; font-weight:600; } .fseg-row .p { color:var(--muted); font-variant-numeric:tabular-nums; min-width:44px; text-align:right; }
table.ftable { width:100%; border-collapse:collapse; font-size:13.5px; }
.ftable th { text-align:left; font:700 10.5px/1.2 var(--head); text-transform:uppercase; letter-spacing:.06em; color:var(--faint); padding:11px 12px; border-bottom:1px solid var(--line); white-space:nowrap; }
.ftable th.sort { cursor:pointer; } .ftable th.sort:hover { color:var(--gold-2); }
.ftable td { padding:10px 12px; border-bottom:1px solid rgba(255,255,255,.04); white-space:nowrap; }
.ftable tbody tr:hover { background:rgba(255,255,255,.02); }
.ftable .num { text-align:right; font-variant-numeric:tabular-nums; }
.ftable tfoot td { font-weight:700; border-top:1px solid var(--line); border-bottom:0; }
.ftable td input, .ftable td select { font:400 13.5px/1.3 var(--body); color:var(--text); background:#0e0e11; border:1px solid var(--line); border-radius:8px; padding:7px 9px; width:110px; }
.ftable td input:focus, .ftable td select:focus { outline:none; border-color:var(--gold-2); }
.ftable td input.qty { width:56px; text-align:center; } .ftable td select.cli { width:220px; } .ftable td input[type=month] { width:150px; }
.st { display:inline-flex; align-items:center; gap:6px; padding:4px 9px; border-radius:999px; font:700 11px/1.2 var(--head); white-space:nowrap; }
.st svg { width:12px; height:12px; }
.st--good { background:rgba(12,163,12,.13); color:#4ade80; } .st--warning { background:rgba(250,178,25,.12); color:#fab219; }
.st--serious { background:rgba(236,131,90,.13); color:#ec835a; } .st--critical { background:rgba(208,59,59,.15); color:#f87171; }
.minibar { height:6px; border-radius:0 3px 3px 0; background:var(--s1); min-width:2px; }
.insights { display:grid; gap:10px; }
.ins { display:flex; gap:12px; padding:12px 14px; border-radius:12px; background:var(--bg-2); border:1px solid var(--line); }
.ins .ic { width:30px; height:30px; border-radius:9px; display:grid; place-items:center; flex:none; } .ins .ic svg { width:16px; height:16px; }
.ins strong { font:700 13.5px/1.3 var(--head); display:block; } .ins p { color:var(--muted); font-size:13px; margin-top:2px; }
.fparams { display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:14px; }
.fparam { background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:14px; }
.fparam label { display:block; font:700 12.5px/1.3 var(--head); margin-bottom:4px; }
.fparam p { color:var(--muted); font-size:12.5px; margin-bottom:10px; }
.fparam input { width:100%; font:400 14px var(--body); color:var(--text); background:#0e0e11; border:1px solid var(--line); border-radius:10px; padding:10px 11px; }
.fnote { margin-top:14px; padding:12px 14px; border-radius:12px; border:1px dashed var(--line-gold); color:var(--muted); font-size:13px; }
@media (max-width:1280px) { .fkpis { grid-template-columns:repeat(3,1fr); } }
@media (max-width:1100px) { .fg-2, .fg-2e { grid-template-columns:1fr; } }
@media (max-width:600px) { .fkpis { grid-template-columns:1fr 1fr; } .fkpi strong { font-size:19px; } .fbar { grid-template-columns:96px 1fr auto; } }
