/* DiligenTi Ads — estilos do painel */
:root {
  --brand: #d4501e;
  --brand-2: #f47b45;
  --brand-soft: #fde9df;
  --bg: #f6f2ec;
  --surface: #ffffff;
  --surface-2: #f9f5f0;
  --line: #ebe3d9;
  --text: #1b1822;
  --text-2: #4a4453;
  --muted: #7f7787;
  --pos: #15805a;
  --neg: #c63b3b;
  --warn: #a8700f;
  --info: #2f63c4;
  --pos-soft: #e2f3eb;
  --neg-soft: #fbe7e7;
  --warn-soft: #faefd9;
  --info-soft: #e5edfb;
  --chart-a: #f26b3a;
  --chart-b: #1f8a70;
  --chart-grid: #eee7de;
  --shadow: 0 1px 2px rgba(27, 24, 34, .05), 0 4px 16px rgba(27, 24, 34, .06);
  --shadow-lg: 0 20px 60px rgba(27, 24, 34, .22);
  --r: 16px;
  --r-sm: 10px;
  --side: 248px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-h: 'Sora', 'Inter', system-ui, sans-serif;
  --font-s: 'Instrument Serif', Georgia, serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #ff7a45; --brand-2: #ffa477; --brand-soft: #3a2218;
    --bg: #121017; --surface: #1b1821; --surface-2: #231f2a; --line: #302a38;
    --text: #f3eef7; --text-2: #c9c1d2; --muted: #958ca1;
    --pos: #3fcf8e; --neg: #ff7b7b; --warn: #f0b860; --info: #7aa7ff;
    --pos-soft: #10301f; --neg-soft: #3a1a20; --warn-soft: #3a2c12; --info-soft: #18243d;
    --chart-a: #ff7a45; --chart-b: #34c39b; --chart-grid: #2a2531;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: #ff7a45; --brand-2: #ffa477; --brand-soft: #3a2218;
  --bg: #121017; --surface: #1b1821; --surface-2: #231f2a; --line: #302a38;
  --text: #f3eef7; --text-2: #c9c1d2; --muted: #958ca1;
  --pos: #3fcf8e; --neg: #ff7b7b; --warn: #f0b860; --info: #7aa7ff;
  --pos-soft: #10301f; --neg-soft: #3a1a20; --warn-soft: #3a2c12; --info-soft: #18243d;
  --chart-a: #ff7a45; --chart-b: #34c39b; --chart-grid: #2a2531;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased; min-height: 100vh; overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--font-h); margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 24px; } h2 { font-size: 18px; } h3 { font-size: 15px; }
a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
svg.i { width: 20px; height: 20px; flex: none; stroke-width: 2; vertical-align: middle; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.pos { color: var(--pos); } .neg { color: var(--neg); } .warn { color: var(--warn); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.hide-values .money { filter: blur(7px); user-select: none; }
.grow { flex: 1; min-width: 0; } .row { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; } .between { justify-content: space-between; } .center { text-align: center; }
.stack > * + * { margin-top: 12px; } .mt { margin-top: 16px; } .mt-s { margin-top: 8px; } .mb { margin-bottom: 16px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------- layout */
.app { display: flex; min-height: 100vh; }
.side {
  width: var(--side); flex: none; background: var(--surface); border-right: 1px solid var(--line);
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 12px; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; font: 800 20px var(--font-h); color: var(--text); }
.brand img { width: 34px; height: 34px; border-radius: 10px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text-2);
  font-weight: 500; margin-bottom: 2px;
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nav .sep { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 16px 12px 6px; font-weight: 600; }
.nav .badge { margin-left: auto; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; padding: 12px 24px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  min-height: 64px;
}
.top h1 { font-size: 20px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content { padding: 8px 24px 40px; max-width: 1180px; width: 100%; margin: 0 auto; }
.bottom { display: none; }

@media (max-width: 900px) {
  .side { display: none; }
  .top { padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); }
  .content { padding: 4px 16px calc(96px + env(safe-area-inset-bottom)); }
  .bottom {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom a, .bottom button {
    display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted);
    background: none; border: 0; padding: 4px 0; cursor: pointer; font-weight: 500;
  }
  .bottom a.on { color: var(--brand); }
  .bottom .fab {
    width: 52px; height: 52px; border-radius: 18px; margin: -22px auto 0; background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff; display: grid; place-items: center; box-shadow: 0 8px 20px rgba(212, 80, 30, .4);
  }
  .bottom .fab svg { width: 26px; height: 26px; }
}

/* ---------------------------------------------------------- componentes */
.card { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; min-width: 0; }
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-h h2 { font-size: 16px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.g-hero { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .g-hero { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .g2, .g3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) { .g2.keep2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 420px) { .g4 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 12px;
  border: 1px solid transparent; background: var(--brand); color: #fff; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: filter .15s, background .15s; text-decoration: none;
}
.btn:hover { filter: brightness(1.07); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.sec { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn.sec:hover { background: var(--surface-2); filter: none; }
.btn.ghost { background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); filter: none; }
.btn.danger { background: var(--neg); }
.btn.ok { background: var(--pos); }
.btn.sm { height: 34px; padding: 0 12px; border-radius: 10px; font-size: 14px; }
.btn.block { width: 100%; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; border: 0; background: transparent;
  color: var(--text-2); cursor: pointer; position: relative; flex: none;
}
.icon-btn:hover { background: var(--surface); color: var(--text); }
.icon-btn .dot { position: absolute; top: 6px; right: 6px; min-width: 17px; height: 17px; border-radius: 9px; background: var(--neg); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--bg); }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.badge.pos { background: var(--pos-soft); color: var(--pos); }
.badge.neg { background: var(--neg-soft); color: var(--neg); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.brand { background: var(--brand-soft); color: var(--brand); }

/* formulários */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.input, select.input, textarea.input {
  width: 100%; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); padding: 0 12px;
  outline: none; transition: border-color .15s, box-shadow .15s; appearance: none; -webkit-appearance: none;
}
select.input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236b7f96' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
textarea.input { height: auto; min-height: 80px; padding: 10px 12px; resize: vertical; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }
.input.big { height: 60px; font: 700 28px var(--font-h); text-align: center; }
.fields2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 480px) { .fields2.keep { grid-template-columns: 1fr 1fr; } .fields2:not(.keep) { grid-template-columns: 1fr; } }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; cursor: pointer; }
.switch input { display: none; }
.switch i { width: 44px; height: 26px; border-radius: 13px; background: var(--line); position: relative; transition: background .2s; flex: none; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + i { background: var(--pos); }
.switch input:checked + i::after { transform: translateX(18px); }
.seg { display: flex; background: var(--surface-2); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { flex: 1; border: 0; background: none; height: 36px; border-radius: 9px; font-weight: 600; color: var(--muted); cursor: pointer; font-size: 14px; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 6px 12px; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; color: var(--text-2); display: inline-flex; gap: 6px; align-items: center; }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.colors { display: flex; flex-wrap: wrap; gap: 8px; }
.colors button { width: 30px; height: 30px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.colors button.on { border-color: var(--text); }
.icons-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; max-height: 180px; overflow: auto; }
.icons-pick button { height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; display: grid; place-items: center; color: var(--text-2); }
.icons-pick button.on { background: var(--brand); color: #fff; border-color: var(--brand); }

/* listas de lançamentos */
.list { margin: 0 -6px; }
.item { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-radius: 12px; cursor: pointer; min-width: 0; }
.item:hover { background: var(--surface-2); }
.item + .item { border-top: 1px solid var(--line); }
.item:hover + .item, .item:hover { border-color: transparent; }
.ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; color: #fff; }
.ico svg { width: 20px; height: 20px; }
.ico.soft { background: var(--surface-2); color: var(--text-2); }
.item .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .s { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .v { text-align: right; font-weight: 700; }
.day-h { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 14px 0 4px; display: flex; justify-content: space-between; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty svg { width: 44px; height: 44px; stroke-width: 1.5; color: var(--brand-2); margin-bottom: 8px; }
.empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }

/* números grandes */
.stat .l { font-size: 13px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.stat .v { font: 700 22px var(--font-h); margin-top: 4px; letter-spacing: -.02em; }
.hero {
  background: radial-gradient(circle at 85% 0%, #9b3a17 0%, transparent 55%), linear-gradient(135deg, #16141d, #2a1d1c 70%); color: #fff; border-radius: 20px; padding: 22px;
  position: relative; overflow: hidden; box-shadow: 0 12px 30px rgba(22, 20, 29, .28);
}
.hero::after { content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.08); }
.hero .l { opacity: .85; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.hero .v { font: 800 34px var(--font-h); letter-spacing: -.02em; margin: 4px 0 14px; }
.hero .sub { display: flex; gap: 22px; flex-wrap: wrap; font-size: 13px; position: relative; z-index: 1; }
.hero .sub b { display: block; font-size: 16px; font-family: var(--font-h); }
.hero .icon-btn { color: #fff; position: relative; z-index: 1; }
.hero .icon-btn:hover { background: rgba(255,255,255,.15); }
.bar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 4px; background: var(--brand); }
.bar.pos > i { background: var(--pos); } .bar.warn > i { background: var(--warn); } .bar.neg > i { background: var(--neg); }

/* mês */
.month { display: flex; align-items: center; gap: 4px; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); padding: 3px; }
.month b { min-width: 128px; text-align: center; font-size: 14px; text-transform: capitalize; }
.month .icon-btn { width: 34px; height: 34px; }

/* modal / folha */
.overlay { position: fixed; inset: 0; background: rgba(18, 16, 23, .55); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .15s; }
.modal { background: var(--surface); border-radius: 20px; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: pop .18s ease-out; }
.modal.wide { max-width: 760px; }
.modal-h { display: flex; align-items: center; gap: 10px; padding: 16px 18px 8px; }
.modal-h h2 { flex: 1; font-size: 18px; }
.modal-b { padding: 8px 18px 18px; overflow-y: auto; overscroll-behavior: contain; }
.modal-f { padding: 12px 18px 18px; display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid var(--line); }
@media (max-width: 600px) {
  .overlay { align-items: flex-end; padding: 0; }
  .modal { border-radius: 22px 22px 0 0; max-height: 94vh; animation: up .22s ease-out; }
  .modal-f { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .modal-f .btn { flex: 1; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(8px); } }
@keyframes up { from { transform: translateY(40%); opacity: .4; } }

.menu { position: fixed; z-index: 120; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; min-width: 200px; border: 1px solid var(--line); animation: fade .12s; }
.menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border: 0; background: none; border-radius: 9px; cursor: pointer; text-align: left; font-weight: 500; }
.menu button:hover { background: var(--surface-2); }
.menu button.danger { color: var(--neg); }

.toasts { position: fixed; z-index: 200; left: 50%; transform: translateX(-50%); bottom: 24px; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: calc(100% - 32px); max-width: 420px; }
@media (max-width: 900px) { .toasts { bottom: calc(90px + env(safe-area-inset-bottom)); } }
.toast { background: #1b1822; color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-weight: 500; display: flex; gap: 10px; align-items: center; pointer-events: auto; animation: pop .2s; }
.toast.err { background: #a83232; }
.toast button { background: none; border: 0; color: #ffa477; font-weight: 700; cursor: pointer; margin-left: auto; }

/* autocomplete */
.ac { position: relative; }
.ac-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 10; overflow: hidden; }
.ac-list button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 9px 12px; background: none; border: 0; text-align: left; cursor: pointer; }
.ac-list button:hover, .ac-list button.on { background: var(--surface-2); }

/* gráficos */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .tip {
  position: absolute; pointer-events: none; background: var(--text); color: var(--bg); padding: 8px 10px; border-radius: 10px; font-size: 12.5px;
  white-space: nowrap; transform: translate(-50%, -100%); margin-top: -10px; opacity: 0; transition: opacity .1s; z-index: 5; box-shadow: var(--shadow-lg);
}
.chart .tip.on { opacity: 1; }
.chart .tip b { font-weight: 700; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; justify-content: center; }
.donut-wrap > .grow { min-width: 190px; }
.donut-wrap .chart { width: 170px; flex: none; }
@media (max-width: 480px) { .donut-wrap { flex-direction: column; align-items: stretch; } .donut-wrap .chart { margin: 0 auto; } }

/* tabelas */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }

/* entrar */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { background: radial-gradient(circle at 90% 10%, #b8461b 0%, transparent 45%), linear-gradient(150deg, #121017, #1f1a22 60%, #3b2016); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art h1 { font-size: 40px; max-width: 460px; line-height: 1.15; }
.auth-art p { color: #d6cbc4; max-width: 420px; font-size: 16px; }
.auth-art ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.auth-art li { display: flex; gap: 10px; align-items: center; color: #efe6e0; }
.auth-art li svg { color: #ff9a6a; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 32px 20px; background: var(--surface); }
.auth-form form { width: 100%; max-width: 380px; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-art { display: none; } .auth-form { background: var(--bg); align-items: flex-start; padding-top: 10vh; } }

.loading { display: grid; place-items: center; padding: 60px; }
.spin { width: 32px; height: 32px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skel { background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 10px; }
@keyframes sk { to { background-position: -200% 0; } }

.banner { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 14px; background: var(--brand-soft); color: var(--text); }
.banner.warn { background: var(--warn-soft); } .banner.neg { background: var(--neg-soft); }
.banner svg { flex: none; }
.offline-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 300; background: var(--warn); color: #fff; text-align: center; font-size: 13px; padding: 4px; font-weight: 600; }
@media (max-width: 600px) { .hide-sm { display: none !important; } }
@media print { .side, .bottom, .top .icon-btn, .btn { display: none !important; } .card { box-shadow: none; border: 1px solid #ddd; } }

/* ---------------------------------------------------------- DiligenTi Ads */
.serif { font-family: var(--font-s); font-style: italic; font-weight: 400; color: var(--brand); letter-spacing: 0; }
.brand .mark { width: 34px; height: 34px; border-radius: 10px; }
.brand small { display: block; font: 500 11px var(--font); color: var(--muted); letter-spacing: .02em; }

.acc-pick { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; max-width: 260px; min-width: 0; }
.acc-pick span.n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-pick:hover { background: var(--surface-2); }
.cdot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--c, var(--brand)); }

.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--pos); box-shadow: 0 0 0 0 color-mix(in srgb, var(--pos) 60%, transparent); animation: pulse 2s infinite; }
.live.off i { background: var(--warn); animation: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .chips { flex: 1; min-width: 0; }

.kpis { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; min-width: 0; }
.kpi .l { font-size: 13px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.kpi .l svg { width: 16px; height: 16px; }
.kpi .v { font: 700 24px var(--font-h); margin: 6px 0 4px; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .s { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.kpi.main { background: radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--brand) 55%, transparent) 0%, transparent 60%), linear-gradient(135deg, #16141d, #2a1d1c); color: #fff; }
.kpi.main .l, .kpi.main .s { color: #d9cfc8; }
.delta { font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--surface-2); color: var(--text-2); }
.delta.good { background: var(--pos-soft); color: var(--pos); }
.delta.bad { background: var(--neg-soft); color: var(--neg); }
.kpi.main .delta { background: rgba(255,255,255,.14); color: #fff; }
.kpi.main .delta.good { background: rgba(63, 207, 142, .22); color: #8ff0c2; }
.kpi.main .delta.bad { background: rgba(255, 123, 123, .2); color: #ffb1b1; }

.st { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.st i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.st.on i { background: var(--pos); } .st.lim i { background: var(--warn); }
.sw { position: relative; width: 38px; height: 22px; border-radius: 11px; background: var(--line); border: 0; cursor: pointer; flex: none; transition: background .2s; padding: 0; }
.sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.sw.on { background: var(--pos); } .sw.on::after { transform: translateX(16px); }
.sw:disabled { opacity: .5; cursor: default; }

.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: var(--surface-2); }
.table td.r, .table th.r { text-align: right; }
.table .name { font-weight: 600; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table .sub { font-size: 12px; color: var(--muted); }

.thumb { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; background: var(--surface-2); flex: none; display: grid; place-items: center; color: var(--muted); overflow: hidden; }
.thumb.lg { width: 72px; height: 72px; }
.adcard { display: flex; gap: 12px; align-items: center; padding: 10px 0; }
.adcard + .adcard { border-top: 1px solid var(--line); }
.adcard .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adcard .s { font-size: 12.5px; color: var(--muted); }
.mini { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.mini b { color: var(--text); font-weight: 600; }

.tip { display: flex; gap: 12px; padding: 14px; border-radius: 14px; background: var(--surface-2); border-left: 4px solid var(--muted); }
.tip + .tip { margin-top: 10px; }
.tip.neg { border-color: var(--neg); background: var(--neg-soft); } .tip.warn { border-color: var(--warn); background: var(--warn-soft); }
.tip.pos { border-color: var(--pos); background: var(--pos-soft); } .tip.info { border-color: var(--info); background: var(--info-soft); }
.tip .ic { flex: none; margin-top: 1px; }
.tip.neg .ic { color: var(--neg); } .tip.warn .ic { color: var(--warn); } .tip.pos .ic { color: var(--pos); } .tip.info .ic { color: var(--info); }
.tip b { display: block; margin-bottom: 2px; }
.tip p { margin: 0; font-size: 14px; color: var(--text-2); }

.md { font-size: 15px; line-height: 1.6; }
.md h2 { font-size: 17px; margin: 22px 0 8px; } .md h2:first-child { margin-top: 0; }
.md h3 { font-size: 15px; margin: 16px 0 6px; }
.md ul, .md ol { padding-left: 22px; margin: 6px 0; } .md li { margin: 4px 0; }
.md p { margin: 8px 0; }

.steps { display: flex; gap: 6px; margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.steps::-webkit-scrollbar { display: none; }
.steps button { flex: 1; min-width: 110px; border: 0; background: none; padding: 0; cursor: pointer; text-align: left; color: var(--muted); font-size: 13px; font-weight: 600; }
.steps button::before { content: ''; display: block; height: 4px; border-radius: 2px; background: var(--line); margin-bottom: 8px; }
.steps button.on { color: var(--text); } .steps button.on::before, .steps button.done::before { background: var(--brand); }
.steps button.done { color: var(--text-2); }

.opts { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.opt { border: 2px solid var(--line); border-radius: 16px; padding: 16px; cursor: pointer; background: var(--surface); text-align: left; display: flex; flex-direction: column; gap: 6px; }
.opt:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.opt.on { border-color: var(--brand); background: var(--brand-soft); }
.opt svg { color: var(--brand); width: 26px; height: 26px; }
.opt b { font-size: 16px; }
.opt span { font-size: 13.5px; color: var(--text-2); }
.opt.sm { padding: 12px; flex-direction: row; align-items: center; gap: 10px; }
.opt.sm svg { width: 20px; height: 20px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 10px; border-radius: 99px; background: var(--brand-soft); color: var(--text); font-size: 13px; font-weight: 500; }
.tag button { border: 0; background: rgba(0,0,0,.08); width: 20px; height: 20px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; padding: 0; color: inherit; }
.tag button svg { width: 12px; height: 12px; }
.tag select { border: 0; background: transparent; font-size: 12px; color: var(--text-2); }

.adbox { border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: var(--surface); }
.adbox + .adbox { margin-top: 14px; }
.drop { border: 2px dashed var(--line); border-radius: 14px; padding: 18px; text-align: center; color: var(--muted); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.drop:hover, .drop.over { border-color: var(--brand); color: var(--text); background: var(--brand-soft); }
.drop svg { width: 30px; height: 30px; color: var(--brand); }
.media-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; max-height: 280px; overflow: auto; }
.media-pick button { aspect-ratio: 1; border-radius: 10px; border: 2px solid transparent; padding: 0; overflow: hidden; cursor: pointer; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); font-size: 11px; }
.media-pick button img { width: 100%; height: 100%; object-fit: cover; }
.media-pick button:hover { border-color: var(--brand); }

.preview { width: 100%; max-width: 340px; margin: 0 auto; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; box-shadow: var(--shadow); font-size: 13.5px; }
.preview .ph { display: flex; gap: 8px; align-items: center; padding: 10px 12px; }
.preview .ph i { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), #16141d); flex: none; }
.preview .ph b { font-size: 13px; display: block; } .preview .ph small { color: var(--muted); font-size: 11px; }
.preview .txt { padding: 0 12px 10px; white-space: pre-wrap; word-break: break-word; max-height: 140px; overflow: hidden; }
.preview .media { aspect-ratio: 4 / 5; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); overflow: hidden; }
.preview .media img, .preview .media video { width: 100%; height: 100%; object-fit: cover; }
.preview .cta { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface-2); }
.preview .cta b { display: block; font-size: 13px; } .preview .cta small { color: var(--muted); }
.preview .cta span { background: var(--brand); color: #fff; font-weight: 600; font-size: 12.5px; padding: 7px 12px; border-radius: 8px; white-space: nowrap; }

.sum { display: grid; grid-template-columns: 150px 1fr; gap: 6px 14px; font-size: 14px; margin: 0; }
.sum dt { color: var(--muted); } .sum dd { margin: 0; font-weight: 500; }
@media (max-width: 480px) { .sum { grid-template-columns: 1fr; } .sum dd { margin-bottom: 8px; } }

.big-empty { max-width: 560px; margin: 8vh auto; text-align: center; }
.big-empty h2 { font-size: 26px; margin: 12px 0 8px; }
.big-empty p { color: var(--text-2); }
.code { font-family: ui-monospace, Consolas, monospace; font-size: 13px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; word-break: break-all; }
ol.howto { padding-left: 20px; margin: 8px 0; } ol.howto li { margin: 6px 0; }
.wcol { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
@media (max-width: 980px) { .wcol { grid-template-columns: minmax(0, 1fr); } }
.sticky { position: sticky; top: 76px; }
@media (max-width: 600px) { .toolbar .chips { flex-basis: 100%; } .toolbar > .row { margin-left: auto; } }
