/* HubPix — painel do lojista */
:root {
  --bg: #f7f8fa;
  --panel: #ffffff;
  --panel-2: #f2f4f7;
  --line: #e3e6eb;
  --text: #14171c;
  --muted: #5d6472;
  --accent: #0a8f6a;
  --accent-strong: #077356;
  --accent-soft: #e3f4ee;
  --on-accent: #ffffff;
  --amber: #a15c00;
  --amber-soft: #fdf0d9;
  --purple: #6b3fc4;
  --purple-soft: #efe8fc;
  --red: #c4312b;
  --red-soft: #fde8e7;
  --gray: #5d6472;
  --gray-soft: #eef0f3;
  --blue: #1d64c8;
  --blue-soft: #e5effc;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-lg: 0 20px 50px rgba(16, 24, 40, .18);
  --radius: 12px;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --sidebar-w: 240px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1014;
    --panel: #141920;
    --panel-2: #1a2029;
    --line: #252c36;
    --text: #e8ecf1;
    --muted: #9aa3b2;
    --accent: #2fd39c;
    --accent-strong: #5fe0b4;
    --accent-soft: #12302a;
    --on-accent: #06281e;
    --amber: #f2b552;
    --amber-soft: #3a2c12;
    --purple: #b79cf5;
    --purple-soft: #2a2140;
    --red: #f2837d;
    --red-soft: #3b1c1c;
    --gray: #a4adbb;
    --gray-soft: #232a34;
    --blue: #7fb0f5;
    --blue-soft: #18263a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 15px; line-height: 1.5;
  overflow-x: hidden;
}
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
p { margin: 0 0 .75em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono { font-family: var(--mono); font-size: .88em; word-break: break-all; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.noscript { padding: 24px; text-align: center; }

/* ---------- boot / spinner ---------- */
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
.spinner.sm { width: 14px; height: 14px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-block { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 32px 12px; color: var(--muted); }

/* ---------- botões ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; font-size: .93rem; cursor: pointer; text-decoration: none; white-space: nowrap;
  background: var(--panel-2); color: var(--text);
  transition: background .15s, border-color .15s, color .15s, opacity .15s;
}
.btn:hover { border-color: var(--line); }
.btn:focus-visible, .input:focus-visible, .nav-link:focus-visible, .tab:focus-visible, .row-link:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 1px; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-strong); border-color: transparent; }
.btn-ghost { background: var(--panel); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-danger:hover { border-color: var(--red); }
.btn-link { background: none; border: 0; padding: 0; min-height: 0; color: var(--accent); font-weight: 600; }
.btn-link:hover { text-decoration: underline; }
.btn-sm { min-height: 32px; padding: 0 10px; font-size: .84rem; border-radius: 8px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-color: var(--muted); border-top-color: transparent;
  animation: spin .7s linear infinite;
}
.btn-primary.is-loading::after { border-color: var(--on-accent); border-top-color: transparent; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn-row.end { justify-content: flex-end; }

/* ---------- formulários ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.label { font-weight: 600; font-size: .88rem; }
.input, .select, .textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 90px; resize: vertical; font-family: var(--mono); font-size: .88rem; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.input[aria-invalid="true"] { border-color: var(--red); }
.input.code-input { font-family: var(--mono); font-size: 1.4rem; letter-spacing: .35em; text-align: center; }
.input.code-input.recovery { letter-spacing: .15em; font-size: 1.15rem; text-transform: uppercase; }
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1 1 auto; min-width: 0; }
.input-prefix { position: relative; }
.input-prefix span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }
.input-prefix .input { padding-left: 40px; }
.input-prefix .input.usdt-pad { padding-left: 62px; }
.hint { font-size: .82rem; color: var(--muted); }
.field > .btn-link { align-self: flex-start; }
.error-text { font-size: .85rem; color: var(--red); min-height: 0; }
.error-text:empty { display: none; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: .92rem; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); flex: 0 0 auto; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }

/* switch */
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: .88rem; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 38px; height: 22px; border-radius: 99px; background: var(--line); position: relative; transition: background .15s; flex: 0 0 auto; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.switch input:disabled + .track { opacity: .5; }

/* ---------- autenticação ---------- */
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 28px; box-shadow: var(--shadow); }
.auth-card.wide { max-width: 560px; }
.auth-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: var(--text); text-decoration: none; margin-bottom: 22px; }
.auth-brand img { border-radius: 8px; }
.auth-title { font-size: 1.35rem; margin-bottom: 6px; }
.auth-sub { color: var(--muted); margin-bottom: 20px; }
.auth-foot { margin-top: 18px; text-align: center; font-size: .92rem; color: var(--muted); }
.auth-links { margin-top: 16px; text-align: center; font-size: .85rem; }
.auth-links a { color: var(--muted); }
.enroll-grid { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px; align-items: start; margin: 16px 0; }
.qr-img { display: block; width: 100%; max-width: 240px; background: #fff; border-radius: 10px; padding: 8px; border: 1px solid var(--line); }
.steps-list { margin: 0 0 12px; padding-left: 20px; color: var(--muted); font-size: .92rem; }
.steps-list li { margin-bottom: 4px; }

/* ---------- shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 40;
  background: var(--panel); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 18px 12px; overflow-y: auto;
}
.sidebar .auth-brand { margin: 0 8px 18px; }
.side-balance { margin: 0 4px 16px; padding: 12px; border-radius: 10px; background: var(--accent-soft); }
.side-balance .lbl { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.side-balance .val { font-size: 1.15rem; font-weight: 800; }
.side-balance .held { font-size: .78rem; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-link {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px;
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: .93rem;
}
.nav-link svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-link:hover { background: var(--panel-2); color: var(--text); }
.nav-link.active { background: var(--accent-soft); color: var(--accent); }
.side-foot { margin-top: auto; padding: 14px 8px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.side-user { font-size: .82rem; color: var(--muted); word-break: break-all; }
.side-links { display: flex; gap: 12px; font-size: .82rem; }
.side-links a { color: var(--muted); }
.topbar { display: none; }
.backdrop { display: none; }
.main { flex: 1 1 auto; min-width: 0; margin-left: var(--sidebar-w); }
.page { max-width: 1180px; margin: 0 auto; padding: 28px 28px 64px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.page-title { font-size: 1.5rem; font-weight: 800; }
.page-sub { color: var(--muted); margin: 4px 0 0; }
.page.banners-wrap { padding-bottom: 0; }
.banners-wrap:not(.hidden) + .page { padding-top: 0; }

/* banners */
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; font-size: .92rem; border: 1px solid transparent; }
.banner strong { display: block; }
.banner.warn { background: var(--amber-soft); color: var(--amber); border-color: color-mix(in srgb, var(--amber) 25%, transparent); }
.banner.info { background: var(--blue-soft); color: var(--blue); border-color: color-mix(in srgb, var(--blue) 25%, transparent); }
.banner.danger { background: var(--red-soft); color: var(--red); border-color: color-mix(in srgb, var(--red) 25%, transparent); }
.banner.ok { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 25%, transparent); }
.banner p { margin: 2px 0 0; color: inherit; }
.banner .ic { font-weight: 800; flex: 0 0 auto; }

/* ---------- cards ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px; min-width: 0; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.card-title { font-size: 1.02rem; font-weight: 700; }
.card-sub { color: var(--muted); font-size: .86rem; margin: 2px 0 0; }
.card-body { padding: 18px; }
.card-body > :last-child { margin-bottom: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-2 > .card { margin-bottom: 0; }
.grid-2 > *, .split > * { min-width: 0; }
.grid-2 + .card, .grid-2 + .grid-2 { margin-top: 18px; }
.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 18px; align-items: start; }
.split > .card { margin-bottom: 0; }

.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; }
.kpi-label { font-size: .8rem; color: var(--muted); font-weight: 600; }
.kpi-value { font-size: 1.45rem; font-weight: 800; margin-top: 4px; overflow-wrap: anywhere; }
.kpi-sub { font-size: .82rem; color: var(--muted); margin-top: 2px; }
.kpi.accent { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.kpi.accent .kpi-value { color: var(--accent); }

/* ---------- tabelas ---------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; background: var(--panel-2); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table tr.row-link { cursor: pointer; }
.table tr.row-link:hover td { background: var(--panel-2); }
.table .cell-ref { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { padding: 36px 16px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--text); margin-bottom: 4px; }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: .88rem; color: var(--muted); }

/* filtros */
.filters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) auto; gap: 10px; align-items: end; }
.filters .field { margin: 0; }

/* ---------- badges / chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 99px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-green { background: var(--accent-soft); color: var(--accent); }
.b-amber { background: var(--amber-soft); color: var(--amber); }
.b-purple { background: var(--purple-soft); color: var(--purple); }
.b-gray { background: var(--gray-soft); color: var(--gray); }
.b-red { background: var(--red-soft); color: var(--red); }
.b-blue { background: var(--blue-soft); color: var(--blue); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); font-family: var(--mono); font-size: .84rem; max-width: 100%; }
.chip.plain { padding-right: 10px; font-family: var(--font); }
.chip button { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 1rem; line-height: 1; padding: 2px 4px; border-radius: 4px; }
.chip button:hover { color: var(--red); background: var(--red-soft); }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 11px; background: var(--panel-2); border: 1px solid var(--line); margin-bottom: 18px; width: fit-content; max-width: 100%; overflow-x: auto; }
.tab { border: 0; background: none; padding: 8px 16px; border-radius: 8px; font-weight: 600; font-size: .9rem; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--panel); color: var(--text); box-shadow: var(--shadow); }
.tab[disabled] { opacity: .5; cursor: not-allowed; }
.tabs.small .tab { padding: 6px 12px; font-size: .84rem; }

/* ---------- copiar ---------- */
.copy-box { display: flex; align-items: stretch; gap: 8px; min-width: 0; }
.copy-box .copy-value {
  flex: 1 1 auto; min-width: 0; padding: 9px 12px; border-radius: 10px; background: var(--panel-2);
  border: 1px solid var(--line); font-family: var(--mono); font-size: .85rem; word-break: break-all; user-select: all;
}
.copy-box .copy-value.clip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; word-break: normal; }
.copy-box .btn { flex: 0 0 auto; align-self: flex-start; }

/* ---------- lista de definições ---------- */
.dl { display: grid; grid-template-columns: minmax(120px, 34%) minmax(0, 1fr); gap: 0; margin: 0; }
.dl dt, .dl dd { padding: 9px 0; border-bottom: 1px solid var(--line); margin: 0; font-size: .9rem; }
.dl dt { color: var(--muted); padding-right: 12px; }
.dl dd { word-break: break-word; min-width: 0; }
.dl dt:last-of-type, .dl dd:last-of-type { border-bottom: 0; }
.section-label { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin: 18px 0 6px; }

/* resumo de valores */
.summary { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin: 6px 0 14px; }
.summary .line { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: .92rem; }
.summary .line:last-child { border-bottom: 0; }
.summary .line span:last-child { font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; }
.summary .line.total { background: var(--panel-2); font-weight: 800; }
.summary .line.bad span:last-child { color: var(--red); }

/* ---------- QR / cobrança ---------- */
.qr-panel { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.qr-panel .qr-img { max-width: 260px; }
.qr-panel .copy-box { width: 100%; flex-direction: column; }
.qr-panel .copy-box .btn { align-self: stretch; }
.countdown { font-variant-numeric: tabular-nums; font-weight: 700; }
.paid-state { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 0; text-align: center; }
.paid-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 2rem; font-weight: 800; }
.paid-icon.bad { background: var(--gray-soft); color: var(--gray); }
.big-amount { font-size: 1.8rem; font-weight: 800; }

/* códigos de recuperação */
.codes-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0; padding: 14px; border-radius: 10px; background: var(--panel-2); border: 1px dashed var(--line); }
.codes-grid code { font-family: var(--mono); font-size: 1rem; text-align: center; padding: 4px; letter-spacing: .05em; }

/* segredos exibidos uma vez */
.secret-block { margin-bottom: 14px; }
.secret-block .label { display: block; margin-bottom: 6px; }

/* ---------- gráfico ---------- */
.chart { position: relative; width: 100%; min-height: 220px; }
.chart svg { display: block; width: 100%; height: 220px; overflow: visible; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .axis-text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .bar { fill: var(--accent); transition: opacity .1s; }
.chart .bar-hit { fill: transparent; cursor: default; }
.chart .bar.dim { opacity: .45; }
.chart-tip {
  position: absolute; pointer-events: none; z-index: 2; transform: translate(-50%, -100%);
  background: var(--text); color: var(--bg); padding: 6px 10px; border-radius: 8px; font-size: .8rem;
  white-space: nowrap; box-shadow: var(--shadow-lg);
}
.chart-tip strong { display: block; }
.chart-total { font-size: .86rem; color: var(--muted); }

/* ---------- modal / drawer ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; background: rgba(10, 14, 20, .55);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  animation: fade .15s ease-out;
}
.modal {
  width: 100%; max-width: 520px; max-height: calc(100vh - 32px); display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg);
}
.modal.wide { max-width: 760px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-title { font-size: 1.08rem; font-weight: 700; }
.modal-close { border: 0; background: none; cursor: pointer; font-size: 1.4rem; line-height: 1; color: var(--muted); padding: 4px 8px; border-radius: 8px; }
.modal-close:hover { background: var(--panel-2); color: var(--text); }
.modal-body { padding: 18px; overflow-y: auto; min-height: 0; }
.modal-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); }
.modal-backdrop.drawer-mode { justify-content: flex-end; align-items: stretch; padding: 0; }
.modal.drawer { max-width: 520px; max-height: none; height: 100%; border-radius: 0; border-width: 0 0 0 1px; animation: slide .18s ease-out; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(30px); opacity: .4; } }
body.modal-open { overflow: hidden; }

/* ---------- toasts ---------- */
.toasts { position: fixed; z-index: 200; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow-lg); font-size: .9rem;
  border-left: 4px solid var(--accent); animation: fade .15s ease-out;
}
.toast.err { border-left-color: var(--red); }
.toast.warn { border-left-color: var(--amber); }
.toast .t-msg { flex: 1 1 auto; overflow-wrap: anywhere; }
.toast button { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 1.1rem; line-height: 1; }

/* webhooks */
.wh-item { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.wh-item:last-child { border-bottom: 0; }
.wh-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.wh-url { font-family: var(--mono); font-size: .9rem; font-weight: 600; word-break: break-all; min-width: 0; flex: 1 1 260px; }
.wh-desc { color: var(--muted); font-size: .86rem; margin: 4px 0 8px; }
.wh-actions { margin-top: 12px; }
.events-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.events-list .check small { display: block; color: var(--muted); font-family: var(--mono); font-size: .76rem; }
.events-list .all { grid-column: 1 / -1; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.callout { padding: 12px 14px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); font-size: .88rem; }
.callout code { font-family: var(--mono); font-size: .85em; }
.pre { margin: 8px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); overflow-x: auto; font-family: var(--mono); font-size: .8rem; }

/* listas simples */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.list li:last-child { border-bottom: 0; }
.list .meta { color: var(--muted); font-size: .82rem; }
.link-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* ---------- responsivo ---------- */
@media (max-width: 1100px) {
  .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filters .filter-actions { grid-column: 1 / -1; }
}
@media (max-width: 960px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .backdrop.show { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(10, 14, 20, .45); }
  .main { margin-left: 0; }
  .topbar {
    display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30;
    padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line);
  }
  .topbar .auth-brand { margin: 0; font-size: 1.05rem; }
  .topbar .top-balance { margin-left: auto; font-weight: 700; font-size: .9rem; white-space: nowrap; }
  .menu-btn { border: 1px solid var(--line); background: var(--panel); border-radius: 9px; width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; flex: 0 0 auto; }
  .menu-btn svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; }
  .page { padding: 20px 16px 56px; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 12px; }
  .kpi-value { font-size: 1.15rem; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .field.wide { grid-column: 1 / -1; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .enroll-grid { grid-template-columns: 1fr; justify-items: center; }
  .enroll-grid > div { width: 100%; }
  .events-list { grid-template-columns: 1fr; }
  .auth-card { padding: 22px 18px; }
  .card-head, .card-body { padding: 14px; }
  .dl { grid-template-columns: 1fr; }
  .dl dt { border-bottom: 0; padding-bottom: 0; }
  .dl dd { padding-top: 2px; }
  .page-title { font-size: 1.3rem; }
  .modal-backdrop { padding: 8px; align-items: flex-end; }
  .modal { max-height: calc(100vh - 16px); }
  .modal-foot .btn { flex: 1 1 auto; }
  .tabs { width: 100%; }
  .tabs .tab { flex: 1 1 auto; }
}
@media (max-width: 380px) {
  .kpis { grid-template-columns: 1fr; }
  .codes-grid { grid-template-columns: 1fr; }
}
