:root {
  --bg: #f5f4f0;
  --surface: #ffffff;
  --ink: #0b0b0b;
  --ink-2: #4f4e4a;
  --muted: #74736e;
  --line: #e2e1dc;
  --line-2: #cfcec8;
  --black: #000;
  --blue: #1839ff;
  --views: #1839ff;
  --clicks: #e8590c;
  --good: #0a7a2f;
  --bad: #c62828;
  --radius: 14px;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font: 400 15px/1.45 var(--sans); -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { display: block; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.duck { fill: currentColor; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.boot, .loading { padding: 40px; text-align: center; color: var(--muted); font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); font-size: 11.5px; }
.nowrap { white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--ink); background: var(--surface); color: var(--ink);
  font-weight: 500; text-decoration: none; transition: background .15s, color .15s, opacity .15s;
}
.btn:hover { background: var(--ink); color: #fff; }
.btn.primary { background: var(--ink); color: #fff; }
.btn.primary:hover { background: var(--blue); border-color: var(--blue); }
.btn.ghost { border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.big { height: 50px; font-size: 16px; }
.btn:disabled { opacity: .4; cursor: not-allowed; background: var(--surface); color: var(--ink); }
.btn.primary:disabled { background: var(--ink); color: #fff; }
.icon-btn {
  width: 36px; height: 36px; flex: none; display: grid; place-items: center; cursor: pointer;
  border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); text-decoration: none;
}
.icon-btn:hover { border-color: var(--ink); }
.icon-btn.danger:hover { color: var(--bad); border-color: var(--bad); }
.danger-text { color: var(--bad); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: #ecebe6; color: var(--ink-2); font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .05em; font-style: normal; }
.pill.ok { background: #e3f3e6; color: var(--good); }
.pill.dark { background: var(--ink); color: #fff; }
.pill-btn { border: 0; cursor: pointer; padding: 5px 12px; border-radius: 999px; font: 500 12px var(--sans); }
.pill-btn.ok { background: #e3f3e6; color: var(--good); }
.pill-btn.bad { background: #fde7e7; color: var(--bad); }
.pill-btn:disabled { cursor: default; opacity: .7; }

/* ---------- formulários ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; border: 0; }
.field > span:first-child, .field legend { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.field legend { margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=date], input:not([type]), select, textarea {
  width: 100%; height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.4; }
textarea.code { font: 12.5px/1.5 var(--mono); }
input:focus, select:focus, textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(24, 57, 255, .12); }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 16px; font-size: 14px; cursor: pointer; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--ink); }
.pw { position: relative; display: block; }
.pw-toggle { position: absolute; right: 6px; top: 6px; height: 30px; padding: 0 10px; border: 0; background: #ecebe6; border-radius: 8px; cursor: pointer; font: 500 11px var(--mono); text-transform: uppercase; }
.form-err { color: var(--bad); font-size: 14px; margin-bottom: 12px; }
.slug-input { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); overflow: hidden; }
.slug-input input { border: 0; box-shadow: none !important; flex: 1; min-width: 0; }
.slug-input em { font-style: normal; padding: 0 12px; color: var(--muted); font: 12px var(--mono); white-space: nowrap; }
.slug-input:focus-within { border-color: var(--ink); }
.slug-msg { font-size: 12.5px; }
.slug-msg.good { color: var(--good); }
.slug-msg.bad { color: var(--bad); }
.themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.theme-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--line-2); border-radius: 12px; cursor: pointer; background: var(--surface); }
.theme-card input { position: absolute; opacity: 0; }
.theme-card:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.theme-card:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
.theme-card b { font-size: 13px; font-weight: 500; }
.sw { display: flex; height: 34px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.sw i { flex: 1; }
.color-row { display: flex; align-items: center; gap: 10px; }
.color-row input[type=color] { width: 42px; height: 36px; border: 1px solid var(--line-2); border-radius: 8px; background: none; cursor: pointer; padding: 2px; }
.color-row code { font: 12px var(--mono); color: var(--muted); flex: 1; }

/* ---------- topo ---------- */
.top {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 24px;
  padding: 0 24px; height: 60px; background: var(--black); color: #fff;
}
.logo { display: inline-flex; align-items: flex-start; font-size: 24px; font-weight: 500; letter-spacing: -.05em; text-decoration: none; line-height: 1; }
.logo .duck { width: 12px; height: 8px; margin: 1px 0 0 1px; }
.logo span { font: 500 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; margin: 2px 0 0 8px; padding: 3px 6px; border: 1px solid rgba(255,255,255,.35); border-radius: 4px; }
.top-nav { display: flex; gap: 4px; flex: 1; }
.top-nav a { text-decoration: none; padding: 8px 12px; border-radius: 999px; color: #bbb; font-size: 14px; }
.top-nav a:hover { color: #fff; }
.top-nav a.on { color: #000; background: #fff; }
.user { position: relative; }
.user-btn { display: flex; align-items: center; gap: 10px; background: none; border: 0; cursor: pointer; color: #fff; }
.av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #313130; font: 600 12px var(--sans); }
.un { font-size: 14px; }
.menu { position: absolute; right: 0; top: calc(100% + 10px); width: 240px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.18); padding: 6px; }
.menu-head { padding: 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: flex; flex-direction: column; gap: 2px; }
.menu-head span { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.menu-head .pill { align-self: flex-start; margin-top: 6px; }
.menu button { width: 100%; text-align: left; padding: 10px; border: 0; background: none; border-radius: 8px; cursor: pointer; }
.menu button:hover { background: var(--bg); }

.view { max-width: 1180px; margin: 0 auto; padding: 32px 24px 64px; }
.page-head { display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head > div:first-child { flex: 1; min-width: 220px; }
.eyebrow { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 6px; }
.page-head h1 { font-size: clamp(34px, 5vw, 52px); font-weight: 400; letter-spacing: -.05em; line-height: .95; }
.note { padding: 12px 16px; border-radius: 12px; background: #fff7e6; border: 1px solid #f2dfb5; margin-bottom: 20px; font-size: 14px; }
.empty { text-align: center; padding: 64px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty h2 { font-size: 28px; font-weight: 400; letter-spacing: -.04em; }
.empty p { color: var(--ink-2); max-width: 48ch; }

/* ---------- cota ---------- */
.quota { display: flex; flex-direction: column; gap: 6px; min-width: 170px; font-size: 13px; color: var(--ink-2); }
.meter { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--ink); border-radius: 6px; }

/* ---------- cartões de página ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.pcard { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.pcard header { display: flex; justify-content: space-between; align-items: center; }
.theme-dot { display: flex; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
.theme-dot i { width: 14px; height: 14px; }
.pcard h3 { font-size: 26px; font-weight: 400; letter-spacing: -.04em; line-height: 1.05; }
.url-row { display: flex; align-items: center; gap: 8px; }
.url { display: inline-flex; align-items: center; gap: 4px; font: 12.5px var(--mono); color: var(--ink-2); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.url .ic { width: 14px; height: 14px; }
.url:hover { color: var(--blue); }
.url-row .url { flex: 1; min-width: 0; }
.mini { display: grid; grid-template-columns: 1fr 120px; align-items: end; gap: 4px 12px; padding: 12px 0; border-block: 1px solid var(--line); }
.mini dl { display: flex; gap: 16px; }
.mini dt { font-size: 11.5px; color: var(--muted); }
.mini dd { font-size: 20px; font-weight: 500; letter-spacing: -.03em; }
.spark { width: 120px; height: 32px; }
.spark polyline { fill: none; stroke: var(--views); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.mini-cap { grid-column: 1 / -1; font: 500 10px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.pcard footer { display: flex; gap: 8px; align-items: center; margin-top: auto; }
.pcard footer .icon-btn { margin-left: auto; }
.pcard.slot { align-items: center; justify-content: center; min-height: 300px; border: 1.5px dashed var(--line-2); background: transparent; cursor: pointer; color: var(--muted); gap: 6px; }
.pcard.slot .ic { width: 28px; height: 28px; }
.pcard.slot span { font-size: 18px; color: var(--ink); }
.pcard.slot:hover { border-color: var(--ink); color: var(--ink); }

/* ---------- modais e avisos ---------- */
.modal { margin: auto; border: 0; border-radius: 20px; width: min(520px, calc(100vw - 32px)); padding: 0; background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.modal::backdrop { background: rgba(0, 0, 0, .45); }
.modal-body { padding: 24px; }
.modal-body h3 { font-size: 26px; font-weight: 400; letter-spacing: -.04em; margin-bottom: 18px; }
.confirm-msg { font-size: 16px; margin-bottom: 20px; }
.row-end { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
#toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { padding: 10px 16px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: tin .25s ease; }
.toast.ok::before { content: "✓ "; color: #7ee29a; }
.toast.err { background: var(--bad); }
.toast.out { opacity: 0; transition: opacity .3s; }
@keyframes tin { from { opacity: 0; transform: translateY(10px); } }

/* ---------- login ---------- */
.auth { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.auth-art { background: #000; color: #fff; padding: 36px; display: flex; flex-direction: column; gap: 18px; position: relative; overflow: hidden; }
.auth-art .logo { font-size: 30px; }
.auth-art .logo .duck { width: 15px; height: 10px; }
.auth-shout { margin-top: auto; font-size: clamp(56px, 8vw, 120px); font-weight: 700; font-stretch: 75%; text-transform: uppercase; line-height: .84; letter-spacing: -.02em; }
.auth-sub { color: #bbb; font-size: 18px; max-width: 34ch; }
.auth-meta { display: flex; justify-content: space-between; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.2); font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: #888; }
.auth-main { display: grid; place-items: center; padding: 32px 20px; }
.auth-form { width: min(380px, 100%); }
.auth-form h1 { font-size: 44px; font-weight: 400; letter-spacing: -.05em; line-height: 1; }
.auth-form > .muted { margin: 6px 0 24px; }
.auth-form .btn.big { width: 100%; margin: 6px 0 16px; }

/* ---------- editor ---------- */
.ed { display: grid; grid-template-columns: 300px 1fr 340px; grid-template-rows: 60px 1fr; height: 100vh; overflow: hidden; }
.ed-bar { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 0 16px; background: #000; color: #fff; }
.ed-bar .icon-btn { background: transparent; color: #fff; border-color: #444; }
.ed-bar .btn.ghost { background: transparent; color: #fff; border-color: #444; }
.ed-bar .btn.ghost:hover { border-color: #fff; background: #fff; color: #000; }
.ed-bar .btn.primary { background: #fff; color: #000; border-color: #fff; }
.ed-bar .btn.primary:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.ed-bar .btn.primary:disabled { background: #333; color: #888; border-color: #333; opacity: 1; }
.ed-name { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.ed-name b { font-weight: 500; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-name a { font: 11.5px var(--mono); color: #aaa; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-name a:hover { color: #fff; }
.save-state { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: #888; white-space: nowrap; }
.save-state.warn { color: #ffb37a; }
.switch { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.switch input { position: absolute; opacity: 0; }
.switch span { width: 36px; height: 20px; border-radius: 20px; background: #444; position: relative; transition: background .2s; }
.switch span::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + span { background: #2fb85a; }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.switch em { font-style: normal; }
.ed-tabs { display: none; }
.ed-left, .ed-right { overflow-y: auto; background: var(--surface); padding: 16px; }
.ed-left { border-right: 1px solid var(--line); }
.ed-right { border-left: 1px solid var(--line); }
.ed-left h4 { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 6px 0 10px; display: flex; justify-content: space-between; gap: 8px; }
.ed-left h4 small { font: inherit; text-transform: none; letter-spacing: 0; color: #a5a49e; }
.blist { list-style: none; display: flex; flex-direction: column; gap: 6px; margin-bottom: 22px; min-height: 40px; padding-bottom: 4px; }
.blist li[data-id] { display: grid; grid-template-columns: 16px 28px 1fr auto; align-items: center; gap: 6px; padding: 8px 8px 8px 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; position: relative; }
.blist li:hover { border-color: var(--line-2); }
.blist li.sel { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.blist li.dragging { opacity: .4; }
.blist li.drop-before::before, .blist.drop-end::after { content: ""; position: absolute; left: 0; right: 0; top: -5px; height: 3px; border-radius: 3px; background: var(--blue); }
.blist.drop-end { position: relative; }
.blist.drop-end::after { top: auto; bottom: -2px; }
.blist-empty { color: var(--muted); font-size: 13px; padding: 12px; border: 1px dashed var(--line-2); border-radius: 10px; }
.grip { color: #b7b6b0; cursor: grab; }
.grip .ic { width: 16px; height: 16px; }
.bi { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--bg); font: 600 12px var(--mono); }
.bl { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.bl b { font-size: 13px; font-weight: 500; }
.bl small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bact { display: flex; opacity: 0; transition: opacity .15s; }
.blist li:hover .bact, .blist li.sel .bact, .blist li:focus-within .bact { opacity: 1; }
.bact button { width: 24px; height: 26px; display: grid; place-items: center; border: 0; background: none; cursor: pointer; border-radius: 6px; color: var(--ink-2); }
.bact button:hover { background: var(--bg); color: var(--ink); }
.bact button:disabled { opacity: .25; cursor: default; }
.bact .ic { width: 15px; height: 15px; }
.palette { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.palette button { display: flex; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: grab; font-size: 13px; text-align: left; }
.palette button:hover { border-color: var(--ink); }
.ed-center { position: relative; display: flex; flex-direction: column; align-items: center; padding: 16px; overflow: hidden; background: #e9e8e3; background-image: radial-gradient(#d3d2cc 1px, transparent 1px); background-size: 18px 18px; }
.devices { display: flex; gap: 4px; padding: 4px; background: var(--surface); border-radius: 999px; border: 1px solid var(--line); margin-bottom: 14px; }
.devices button { width: 34px; height: 30px; display: grid; place-items: center; border: 0; background: none; border-radius: 999px; cursor: pointer; color: var(--muted); }
.devices button.on { background: var(--ink); color: #fff; }
.frame { flex: 1; min-height: 0; width: 100%; display: flex; justify-content: center; }
.frame iframe { border: 0; background: #fff; height: 100%; transition: width .3s; }
.frame.phone iframe { width: 390px; max-width: 100%; border-radius: 36px; border: 10px solid #000; box-shadow: 0 30px 60px rgba(0,0,0,.25); }
.frame.desktop iframe { width: 100%; border-radius: 12px; border: 1px solid var(--line-2); box-shadow: 0 20px 40px rgba(0,0,0,.12); }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 7px 12px; border-radius: 999px; cursor: pointer; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.seg button.on { background: var(--ink); color: #fff; }
.ed-right .seg { display: flex; margin-bottom: 18px; }
.ed-right .seg button { flex: 1; }
.ptitle { display: flex; align-items: center; gap: 10px; margin: 4px 0 16px; font-size: 16px; }
.ptitle b { font-weight: 500; }
.hint { color: var(--muted); font-size: 14px; padding: 8px 0; }
.danger-zone { margin-top: 24px; padding: 14px; border-radius: 12px; border: 1px solid #f3c9c9; background: #fff8f8; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.danger-zone p { font-size: 13px; color: var(--ink-2); }
.token-ok { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; margin-bottom: 16px; padding: 12px; border-radius: 12px; background: var(--bg); }
.result { padding: 10px 12px; border-radius: 10px; margin-top: 10px; font-size: 13.5px; }
.result.ok { background: #e3f3e6; color: var(--good); }
.result.err { background: #fde7e7; color: var(--bad); }
.explain { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; font-size: 13.5px; }
.explain summary { cursor: pointer; font-weight: 500; }
.explain ul { margin: 10px 0 10px 18px; display: flex; flex-direction: column; gap: 6px; color: var(--ink-2); }
.explain code { font: 12px var(--mono); background: var(--bg); padding: 1px 4px; border-radius: 4px; }
.ed-right #testCapi { width: 100%; }

/* ---------- métricas ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.back:hover { color: var(--ink); }
.back .ic { width: 15px; height: 15px; }
.stats-head .url { margin-top: 8px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; position: sticky; top: 60px; z-index: 5; padding: 10px 0; background: var(--bg); }
.custom { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.custom input { width: 150px; height: 36px; }
#body.busy { opacity: .5; transition: opacity .2s; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.kpi { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.kl { font-size: 12.5px; color: var(--ink-2); }
.kv { font-size: 30px; font-weight: 500; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.delta { font-size: 12px; font-weight: 500; }
.delta small { font-weight: 400; color: var(--muted); }
.delta.up { color: var(--good); }
.delta.down { color: var(--bad); }
.delta.flat { color: var(--muted); font-weight: 400; }
.card { padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); margin-bottom: 16px; min-width: 0; }
.card h3 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; margin-bottom: 12px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i, .tip i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chart { position: relative; width: 100%; overflow: hidden; }
.lc { display: block; width: 100%; height: auto; }
.lc .grid { stroke: #ecebe6; stroke-width: 1; }
.lc .ax { fill: var(--muted); font: 11px var(--sans); font-variant-numeric: tabular-nums; }
.lc .dl { fill: var(--ink-2); font: 500 12px var(--sans); }
.lc .cross { stroke: var(--line-2); stroke-width: 1; }
.lc .dot { stroke: #fff; stroke-width: 2; }
.lc .hit { cursor: crosshair; }
.tip { position: fixed; z-index: 200; pointer-events: none; background: var(--ink); color: #fff; padding: 8px 10px; border-radius: 10px; font-size: 12.5px; display: flex; flex-direction: column; gap: 3px; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: 280px; }
.tip span { display: flex; align-items: center; gap: 6px; }
.tip em { font-style: normal; font-weight: 600; margin-left: auto; padding-left: 12px; font-variant-numeric: tabular-nums; }
.tip i.ring { background: transparent; border: 2px solid #fff; border-radius: 50%; width: 9px; height: 9px; }
.table-view { margin-top: 10px; font-size: 13px; }
.table-view summary { cursor: pointer; color: var(--muted); }
.table-view table { margin-top: 10px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
.r { text-align: right; }
.barcol { width: 28%; }
.hbar { display: block; height: 8px; border-radius: 0 4px 4px 0; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.grid2 .card { margin-bottom: 0; }
.grid2 + .card { margin-top: 16px; }
.bars { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.bars li { position: relative; display: grid; grid-template-columns: 1fr auto 44px; gap: 10px; align-items: center; padding: 7px 10px; font-size: 13.5px; border-radius: 6px; isolation: isolate; }
.bars .bar { position: absolute; left: 0; top: 2px; bottom: 2px; z-index: -1; background: rgba(24, 57, 255, .13); border-radius: 0 6px 6px 0; min-width: 4px; }
.bars li:hover .bar { background: rgba(24, 57, 255, .22); }
.bk { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bn { font-weight: 600; font-variant-numeric: tabular-nums; }
.bp { color: var(--muted); font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.cols { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 3px; height: 140px; align-items: end; margin-top: 8px; }
.col { height: 100%; display: flex; align-items: flex-end; cursor: default; }
.col span { display: block; width: 100%; background: var(--views); border-radius: 4px 4px 0 0; transition: opacity .15s; }
.cols:hover .col span { opacity: .45; }
.cols .col:hover span { opacity: 1; }
.cols-ax { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 3px; margin-top: 6px; font-size: 11px; color: var(--muted); text-align: center; }
.foot-note { margin-top: 12px; }

/* ---------- admin ---------- */
.subnav { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.subnav a { text-decoration: none; padding: 10px 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.subnav a.on { color: var(--ink); border-color: var(--ink); }
.toolbar { margin-bottom: 14px; max-width: 360px; }
.users select { height: 34px; width: auto; }
.num-in { width: 76px !important; height: 34px !important; }

/* ---------- responsivo ---------- */
@media (max-width: 1100px) {
  .ed { grid-template-columns: 260px 1fr 300px; }
}
@media (max-width: 900px) {
  .top { padding: 0 16px; gap: 12px; }
  .un { display: none; }
  .view { padding: 24px 16px 48px; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { min-height: 260px; padding: 24px; }
  .auth-shout { font-size: 64px; }
  .ed { grid-template-columns: 1fr; grid-template-rows: 60px 44px 1fr; height: 100dvh; }
  .ed-tabs { display: flex; background: var(--surface); border-bottom: 1px solid var(--line); }
  .ed-tabs button { flex: 1; border: 0; background: none; font-weight: 500; cursor: pointer; border-bottom: 2px solid transparent; }
  .ed[data-pane=list] .ed-tabs [data-pane=list], .ed[data-pane=preview] .ed-tabs [data-pane=preview], .ed[data-pane=panel] .ed-tabs [data-pane=panel] { border-color: var(--ink); }
  .ed-left, .ed-center, .ed-right { display: none; border: 0; }
  .ed[data-pane=list] .ed-left, .ed[data-pane=panel] .ed-right { display: block; }
  .ed[data-pane=preview] .ed-center { display: flex; }
  .bact { opacity: 1; }
  .hide-sm, .save-state, .switch em { display: none; }
  .ed-bar { gap: 8px; padding: 0 10px; }
}
@media (max-width: 520px) {
  .page-head { align-items: stretch; }
  .page-head .btn { width: 100%; }
  .mini { grid-template-columns: 1fr; }
  .mini .spark { width: 100%; }
  .themes { grid-template-columns: 1fr 1fr 1fr; }
  .filters .seg { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
