/* =========================================================
   SENSI CALVA — preto e vermelho
   Linguagem visual: galeria escura (grandes tipos, superfícies planas,
   raios de 28px, pílulas) + energia esport (itálico pesado, vermelho).
   ========================================================= */

:root {
  --black: #000;
  --bg: #050506;
  --surface: #0c0c0f;
  --surface-2: #131317;
  --surface-3: #1a1a1f;
  --line: #1f1f25;
  --line-2: #2d2d35;

  --text: #f5f5f7;
  --muted: #9b9ba6;
  --faint: #62626c;

  --red: #e31313;      /* preenchimentos (texto branco por cima) */
  --red-hi: #ff3030;   /* texto, linhas e brilhos sobre preto */
  --red-lo: #7a0000;
  --red-glow: rgba(255, 32, 32, .42);
  --red-soft: rgba(255, 32, 32, .1);

  --ok: #3ddc84;
  --warn: #ffb020;

  --r-card: 28px;
  --r-md: 18px;
  --r-pill: 9999px;

  --display: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --ease: cubic-bezier(0.22, 0.8, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);

  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--black); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.47;
  letter-spacing: -.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
p { margin: 0; }
a { color: inherit; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); }
::selection { background: var(--red); color: #fff; }

/* ---------- títulos ---------- */
.h-display, h1, h2, h3 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -.01em;
  line-height: .98;
  margin: 0;
}
h1 { font-size: clamp(40px, 9vw, 72px); }
h2 { font-size: clamp(26px, 5.2vw, 36px); }
h3 { font-size: 20px; }
.kicker {
  font-family: var(--body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--red-hi);
}

/* ---------- fundo ---------- */
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(60% 38% at 50% -8%, rgba(255, 30, 30, .2), transparent 70%),
    radial-gradient(40% 30% at 100% 100%, rgba(255, 30, 30, .12), transparent 70%);
}
.slash {
  position: absolute; height: 12px; width: min(46vw, 460px);
  background: linear-gradient(90deg, transparent, var(--red) 55%, var(--red-hi));
  transform: rotate(-33deg); filter: drop-shadow(0 0 14px var(--red-glow)); opacity: .8;
}
.slash.s1 { top: 68px; left: -150px; }
.slash.s2 { top: 104px; left: -190px; height: 4px; opacity: .55; }
.slash.s3 { bottom: 96px; right: -150px; transform: rotate(-33deg) scaleX(-1); }
.slash.s4 { bottom: 60px; right: -190px; height: 4px; opacity: .55; transform: rotate(-33deg) scaleX(-1); }

/* ---------- navegação ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  height: calc(60px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) max(16px, calc((100vw - 1100px) / 2)) 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: rgba(0, 0, 0, .66);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.nav__logo { display: block; line-height: 0; }
.nav__logo img { height: 36px; width: auto; }
.nav__right { display: flex; align-items: center; gap: 8px; }
.nav__tag { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.nav__tag b { color: var(--red-hi); font-weight: 700; }

.pill {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px;
  font-size: 12.5px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap;
  border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text);
}
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.pill.ok::before { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.pill.warn { color: var(--warn); border-color: rgba(255, 176, 32, .4); }
.pill.warn::before { background: var(--warn); }
.pill.bad { color: var(--red-hi); border-color: rgba(255, 48, 48, .45); }
.pill.bad::before { background: var(--red-hi); }

/* ---------- estrutura ---------- */
.page { position: relative; z-index: 1; padding-top: calc(60px + env(safe-area-inset-top)); }
.wrap { width: 100%; max-width: 580px; margin: 0 auto; padding: 0 16px; }
.wrap.wide { max-width: 980px; }
.stack { display: grid; gap: 16px; }

/* ---------- botões ---------- */
.btn {
  appearance: none; cursor: pointer; font: inherit; font-weight: 600; letter-spacing: -.011em;
  height: 48px; padding: 0 22px; border-radius: var(--r-pill); font-size: 16px;
  background: var(--surface-3); color: var(--text); border: 1px solid var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
  transition: transform .16s var(--ease), background-color .16s ease, border-color .16s ease, box-shadow .3s ease, opacity .16s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
@media (hover: hover) and (pointer: fine) {
  .btn:not(:disabled):hover { background: #202027; border-color: #3a3a44; }
}
.btn:not(:disabled):active { transform: scale(.97); }
.btn.primary {
  background: var(--red); border-color: var(--red); color: #fff;
  font-family: var(--display); font-style: italic; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; font-size: 18px;
}
@media (hover: hover) and (pointer: fine) {
  .btn.primary:not(:disabled):hover { background: #f21a1a; border-color: #f21a1a; box-shadow: 0 14px 44px -10px var(--red-glow); }
}
.btn.ghost { background: transparent; }
.btn.danger { color: var(--red-hi); }
.btn.small { height: 36px; padding: 0 16px; font-size: 13.5px; }
.btn.block { width: 100%; }
.btn.xl { height: 58px; font-size: 20px; }
.btn:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 2px solid var(--red-hi); outline-offset: 3px; }
button:focus:not(:focus-visible) { outline: none; }

.error { color: var(--red-hi); font-size: 14px; text-align: center; }
.error:empty { display: none; }

/* ---------- campos ---------- */
label.field { display: grid; gap: 7px; font-size: 13px; color: var(--muted); font-weight: 500; }
input[type=text], input[type=password], input[type=number], input[type=search] {
  width: 100%; height: 52px; padding: 0 18px; border-radius: var(--r-pill);
  background: var(--black); color: var(--text); border: 1px solid var(--line-2);
  font: inherit; font-size: 16px; outline: none; transition: border-color .2s, box-shadow .2s;
}
input:focus { border-color: var(--red-hi); box-shadow: 0 0 0 4px var(--red-soft); }
input::placeholder { color: #4b4b55; }
input[type=search] { -webkit-appearance: none; appearance: none; }
.key-input {
  height: 62px; text-align: center; font-family: var(--display); font-style: italic; font-weight: 700;
  font-size: 22px; letter-spacing: .1em; text-transform: uppercase;
}

/* ---------- cartões ---------- */
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 24px 20px;
}
.card.glow { border-color: var(--line); }

/* =========================================================
   GATE (landing + key)
   ========================================================= */
.hero { position: relative; overflow: hidden; }
.hero__stage {
  position: relative; display: grid; place-items: center; max-width: 1240px; margin: 0 auto;
}
.hero__img {
  width: auto; max-width: 100%; max-height: min(52vh, 560px); height: auto; will-change: transform;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent), linear-gradient(to bottom, transparent, #000 8%, #000 72%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent), linear-gradient(to bottom, transparent, #000 8%, #000 72%, transparent);
  mask-composite: intersect;
}

.gate__card { position: relative; z-index: 2; margin-top: -28px; padding: 18px; }
.gate__card .kicker { display: block; margin-bottom: 10px; }
.gate__card h2 { margin-bottom: 10px; }
.gate__card p { color: var(--muted); max-width: 36ch; margin: 0 auto 22px; font-size: 16px; }
.gate__card form { display: grid; gap: 12px; }

.features { display: grid; gap: 12px; padding: 56px 0 8px; }
.item {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-items: start;
  padding: 22px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line);
}
.item__icon {
  grid-row: span 2; width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center;
  background: var(--red-soft); border: 1px solid rgba(255, 48, 48, .25); color: var(--red-hi);
}
.item__icon svg { width: 22px; height: 22px; }
.item h3 { font-size: 21px; align-self: end; }
.item p { color: var(--muted); font-size: 15px; line-height: 1.45; }

.footer { position: relative; z-index: 1; margin-top: 64px; padding: 36px 16px calc(36px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); text-align: center; color: var(--faint); font-size: 13px; }
.footer img { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px; }
.footer p { max-width: 46ch; margin: 0 auto; }

/* =========================================================
   APP (gerador)
   ========================================================= */
.intro { padding: 36px 0 24px; display: grid; gap: 12px; }
.intro p { color: var(--muted); font-size: 17px; max-width: 40ch; }

.profile { padding: 8px 20px; }
.field-row { display: grid; gap: 12px; padding: 20px 0; border-top: 1px solid var(--line); }
.field-row:first-child { border-top: 0; }
.field-row__head { display: flex; align-items: baseline; gap: 12px; }
.field-row__n { font-family: var(--display); font-style: italic; font-weight: 700; font-size: 14px; color: var(--red-hi); min-width: 2ch; }
.field-row__t { font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.field-row__h { font-size: 13px; color: var(--faint); margin-left: auto; text-align: right; }

.gen { padding: 20px 0 8px; display: grid; gap: 10px; }

/* resultado */
.result { margin-top: 20px; overflow: hidden; scroll-margin-top: 76px; }
.result__head { display: grid; gap: 8px; margin-bottom: 8px; }
.result__sum { color: var(--muted); font-size: 14px; }
.sliders { display: grid; }
.slider-row { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: end; padding: 18px 0; border-top: 1px solid var(--line); }
.slider-row:first-child { border-top: 0; padding-top: 14px; }
.slider-row .name { font-weight: 600; font-size: 16px; letter-spacing: -.02em; }
.slider-row .val {
  font-family: var(--display); font-style: italic; font-weight: 800; font-size: 34px; line-height: 1;
  color: var(--text); min-width: 2ch; text-align: right; font-variant-numeric: tabular-nums;
}
.slider-row.main .name { color: var(--red-hi); font-family: var(--body); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }
.slider-row.main .val { font-size: clamp(76px, 22vw, 112px); color: #fff; }
.track { grid-column: 1 / -1; position: relative; height: 10px; border-radius: var(--r-pill); background: var(--surface-3); }
.fill {
  position: absolute; inset: 0 auto 0 0; width: 0; border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--red-lo), var(--red) 60%, var(--red-hi));
  transition: width .9s var(--ease);
}
.thumb {
  position: absolute; top: 50%; left: 0; width: 22px; height: 22px; border-radius: 50%; background: #fff;
  border: 4px solid var(--red); transform: translate(-50%, -50%); transition: left .9s var(--ease);
}
.kv { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 18px 0; border-top: 1px solid var(--line); }
.kv b { font-family: var(--display); font-style: italic; font-weight: 700; font-size: 20px; }
.tips { margin: 0; padding: 18px 0 4px; border-top: 1px solid var(--line); list-style: none; display: grid; gap: 12px; }
.tips li { position: relative; padding-left: 22px; color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.tips li::before { content: ''; position: absolute; left: 2px; top: .5em; width: 8px; height: 8px; background: var(--red); transform: skewX(-20deg); }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }

.history-box { margin-top: 40px; display: grid; gap: 14px; }
.history { display: grid; gap: 10px; }
.history button {
  appearance: none; cursor: pointer; font: inherit; text-align: left; color: var(--text);
  display: grid; gap: 4px; padding: 14px 18px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line);
  transition: border-color .2s, background-color .2s, transform .16s var(--ease);
}
.history button:active { transform: scale(.985); }
@media (hover: hover) { .history button:hover { border-color: rgba(255, 48, 48, .5); background: var(--surface-2); } }
.history small { color: var(--faint); font-size: 12px; font-weight: 500; }
.history span { font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }
.history b { color: var(--red-hi); font-weight: 700; }

/* =========================================================
   ADMIN
   ========================================================= */
.admin-login { max-width: 440px; margin: 0 auto; padding-top: 7vh; text-align: center; }
.admin-login img { width: 84px; height: 84px; margin: 0 auto 22px; border-radius: 24px; }
.admin-login form { display: grid; gap: 14px; margin-top: 24px; }
.admin-login h1 { font-size: clamp(34px, 8vw, 48px); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding-top: 24px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 16px; display: grid; gap: 2px; }
.stat b { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 34px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.stat.hot b { color: var(--red-hi); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.keys-out {
  width: 100%; min-height: 110px; resize: vertical; background: var(--black); color: var(--text);
  border: 1px solid var(--line-2); border-radius: 20px; padding: 14px 16px; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 15px; letter-spacing: .04em; line-height: 1.7;
}
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-title .kicker { margin-bottom: 6px; display: block; }

/* abas com sublinhado deslizante (Blendy) */
.tabs { position: relative; display: flex; gap: 26px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  appearance: none; background: none; border: 0; color: var(--muted); font: inherit; font-size: 15px; font-weight: 600; letter-spacing: -.015em;
  padding: 12px 0 14px; cursor: pointer; white-space: nowrap; transition: color .2s;
}
.tab[aria-selected=true] { color: var(--text); }
@media (hover: hover) { .tab:hover { color: var(--text); } }
.tabs__bar {
  position: absolute; left: 0; bottom: -1px; height: 3px; width: 0; border-radius: 3px; background: var(--red-hi);
  box-shadow: 0 0 12px var(--red-glow); transform: translateX(0);
  transition: transform .6s var(--ease-io), width .6s var(--ease-io);
}

.keylist { display: grid; gap: 12px; }
.keyrow { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px; display: grid; gap: 14px; }
.keyrow .head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.keytext { font-family: var(--display); font-style: italic; font-weight: 700; font-size: 21px; letter-spacing: .06em; cursor: pointer; word-break: break-all; transition: color .15s; }
@media (hover: hover) { .keytext:hover { color: var(--red-hi); } }
.meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; font-size: 13.5px; color: var(--muted); }
.meta b { color: var(--text); font-weight: 500; display: block; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 14px; border-top: 1px solid var(--line); }
.row-actions .hb-host { display: inline-flex; margin-left: auto; }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--r-card); }

/* diálogo */
dialog {
  width: min(92vw, 400px); padding: 24px 22px; border-radius: var(--r-card); border: 1px solid var(--line-2);
  background: var(--surface); color: var(--text); box-shadow: 0 40px 120px -20px #000;
}
dialog::backdrop { background: rgba(0, 0, 0, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
dialog[open] { animation: dlg .35s var(--ease) both; }
dialog h3 { margin-bottom: 6px; }
dialog form { display: grid; gap: 16px; margin-top: 16px; }
dialog .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@keyframes dlg { from { opacity: 0; transform: translateY(16px) scale(.97); } }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translate(-50%, 24px);
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-3); color: var(--text); font-weight: 600; font-size: 14.5px; padding: 12px 20px 12px 16px;
  border-radius: var(--r-pill); border: 1px solid var(--line-2);
  opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .35s var(--ease); z-index: 90; max-width: 90vw;
  box-shadow: 0 20px 60px -20px #000;
}
.toast::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--red-hi); box-shadow: 0 0 10px var(--red-hi); flex: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- wipe (transição de painel, do Blendy) ---------- */
.wipe { position: fixed; inset: 0; z-index: 100; pointer-events: none; overflow: hidden; }
.wipe.scoped { position: absolute; z-index: 20; border-radius: inherit; }
.wipe__a, .wipe__b { position: absolute; inset: 0; clip-path: inset(0 0 0 100%); display: grid; place-items: center; }
.wipe__a { background: linear-gradient(110deg, var(--red-lo), var(--red) 45%, var(--red-hi)); }
.wipe__b { background: #000; }
.wipe__b img { width: min(46vw, 220px); height: auto; filter: drop-shadow(0 0 30px var(--red-glow)); }
.wipe.scoped .wipe__b img { width: min(40%, 150px); }

/* ---------- entrada (opening sequence do Blendy) ---------- */
@keyframes rise { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
@keyframes slide-in { from { opacity: 0; translate: 22% 0; scale: 1.06; } to { opacity: 1; translate: 0 0; scale: 1; } }
.rise { animation: rise 1000ms var(--ease) both; animation-delay: var(--d, 0ms); }
.slide-in { animation: slide-in 1100ms var(--ease) both; }

/* ---------- responsivo ---------- */
@media (min-width: 720px) {
  .stats { grid-template-columns: repeat(6, 1fr); }
  .form-grid { grid-template-columns: repeat(4, 1fr); }
  .form-grid .full { grid-column: span 4; }
  .features { grid-template-columns: repeat(3, 1fr); max-width: 1040px; margin: 0 auto; padding-top: 80px; }
  .item { grid-template-columns: 1fr; padding: 26px; }
  .item__icon { grid-row: auto; margin-bottom: 8px; }
  .item h3 { align-self: start; }
  .gate__features { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
  .meta { grid-template-columns: repeat(3, 1fr); }
  .card { padding: 32px 36px; }
  .profile { padding: 12px 36px; }
}
@media (max-width: 480px) {
  .field-row__head { flex-wrap: wrap; row-gap: 2px; }
  .field-row__h { flex-basis: 100%; margin: 0; text-align: left; padding-left: calc(2ch + 12px); }
  .field-row__h:empty { display: none; }
}
@media (max-width: 380px) {
  .key-input { font-size: 19px; letter-spacing: .06em; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise, .slide-in { animation: none; }
  .fill, .thumb, .tabs__bar { transition: none; }
}

/* =========================================================
   Ajustes dos componentes React Bits (preto + vermelho)
   ========================================================= */
.rubber-segment { display: grid; width: 100%; --rs-ink: #f5f5f7; }
.rubber-segment__item { font-family: var(--body); letter-spacing: -.01em; font-weight: 600; }
.rubber-segment__item:focus-visible { outline-offset: 2px; }
.hold-button { font-family: var(--body); letter-spacing: -.01em; }
.hold-button--sm { height: 36px; font-size: 13.5px; }


/* =========================================================
   Login centralizado + Discord + troca Admin/Gerador
   ========================================================= */
#gate:not(.hidden) {
  min-height: calc(100dvh - 60px - env(safe-area-inset-top));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding-bottom: 24px;
}
#gate .hero { width: 100%; }
#gate .wrap { display: flex; justify-content: center; }
#gate .gate__card { width: 100%; max-width: 440px; margin: -20px auto 0; text-align: center; }
.or { display: flex; align-items: center; gap: 14px; margin: 18px 0; color: var(--faint); font-size: 12.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }
.btn.discord { background: #5865f2; border-color: #5865f2; color: #fff; height: 54px; font-size: 16px; }
@media (hover: hover) and (pointer: fine) {
  .btn.discord:hover { background: #6b77f5 !important; border-color: #6b77f5 !important; box-shadow: 0 14px 40px -12px rgba(88, 101, 242, .6); }
}

.nav__switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--line-2); }
.nav__sw {
  appearance: none; border: 0; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted);
  height: 28px; padding: 0 14px; border-radius: var(--r-pill); background: transparent; transition: background-color .2s, color .2s;
}
.nav__sw[aria-selected=true] { background: var(--red); color: #fff; }

/* ícone do site (admin) */
.icon-edit { display: flex; gap: 18px; align-items: center; }
.icon-edit img { width: 72px; height: 72px; border-radius: 20px; border: 1px solid var(--line-2); background: var(--black); object-fit: cover; flex: none; }
.icon-edit__txt { display: grid; gap: 12px; min-width: 0; }
.icon-edit__btns { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 480px) { .icon-edit { align-items: flex-start; } }

/* =========================================================
   Área do cliente em abas (barra fixa embaixo)
   ========================================================= */
.icon-btn { width: 36px; padding: 0; }
.icon-btn svg { width: 18px; height: 18px; }

.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 30;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, .72); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid rgba(255, 255, 255, .06);
}
.tabbar__in {
  max-width: 580px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 5px;
  border-radius: 24px; background: var(--surface); border: 1px solid var(--line);
}
.tabbtn {
  appearance: none; cursor: pointer; font: inherit; display: grid; justify-items: center; align-content: center; gap: 4px;
  height: 56px; border-radius: 19px; background: transparent; border: 1px solid transparent; color: var(--faint);
  font-size: 11px; font-weight: 600; letter-spacing: -.005em; transition: color .2s, background-color .2s, border-color .2s, transform .16s var(--ease);
}
.tabbtn svg { width: 20px; height: 20px; }
.tabbtn:active { transform: scale(.95); }
.tabbtn[aria-selected=true] { color: #fff; background: var(--surface-3); border-color: var(--line-2); }
.tabbtn[aria-selected=true] svg { color: var(--red-hi); }
body.has-tabbar .page { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
body.has-tabbar .toast { bottom: calc(100px + env(safe-area-inset-bottom)); }

.pane { display: grid; gap: 12px; padding-top: 22px; }
.pane[data-pane=sensi] { display: block; padding-top: 18px; }
.pane__lead { color: var(--muted); font-size: 14.5px; padding: 0 4px 4px; }

.opt, .link-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 22px; }
.opt__ico {
  width: 46px; height: 46px; border-radius: 15px; flex: none; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line-2); color: var(--muted);
}
.opt__ico svg { width: 21px; height: 21px; }
.opt__txt { display: grid; gap: 2px; min-width: 0; flex: 1; }
.opt__txt b { font-size: 16px; font-weight: 600; letter-spacing: -.02em; }
.opt__txt small { color: var(--faint); font-size: 12.5px; line-height: 1.35; }
.switch {
  appearance: none; border: 0; cursor: pointer; flex: none; width: 52px; height: 30px; border-radius: var(--r-pill);
  background: var(--surface-3); border: 1px solid var(--line-2); position: relative; transition: background-color .25s, border-color .25s;
}
.switch::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #6b6b75;
  transition: transform .3s var(--ease), background-color .25s;
}
.switch[aria-checked=true] { background: var(--red); border-color: var(--red); }
.switch[aria-checked=true]::after { transform: translateX(22px); background: #fff; }
.opt:has(.switch[aria-checked=true]) .opt__ico { color: var(--red-hi); border-color: rgba(255, 48, 48, .35); }

.opt-count { padding: 16px 18px; display: grid; gap: 12px; border-radius: 22px; }
.opt-count__row { display: flex; justify-content: space-between; align-items: baseline; color: var(--faint); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.opt-count__row b { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 28px; color: #fff; letter-spacing: 0; }
.opt-count__bar { height: 6px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.opt-count__bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--red-lo), var(--red-hi)); transition: width .5s var(--ease); }

.tip { display: flex; gap: 16px; padding: 18px; border-radius: 22px; align-items: flex-start; }
.tip__n { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 22px; color: var(--red-hi); min-width: 2ch; line-height: 1.1; }
.tip h3 { font-size: 17px; margin-bottom: 6px; text-transform: none; font-style: normal; font-family: var(--body); font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.tip p { color: var(--muted); font-size: 14.5px; line-height: 1.45; }

.links { display: grid; gap: 12px; }
.link-card { text-decoration: none; color: var(--text); transition: border-color .2s, transform .16s var(--ease); }
.link-card:active { transform: scale(.985); }
@media (hover: hover) { .link-card:hover { border-color: rgba(255, 48, 48, .5); } }
.link-card__go { width: 20px; height: 20px; color: var(--faint); flex: none; }
.link-card .opt__ico { color: var(--red-hi); }

.links-form { grid-template-columns: 1fr; }
.links-form .full { grid-column: auto; }

/* =========================================================
   Admin em abas (visão geral, criar, histórico, config)
   ========================================================= */
.apane { display: grid; gap: 22px; }
.apane.hidden { display: none !important; }
.apane .stats { padding-top: 22px; }
.apane > :not(.stats):first-child { margin-top: 22px; }

.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart__v { fill: var(--text); font: 700 11px var(--body); }
.chart__d { fill: var(--faint); font: 500 10.5px var(--body); }

.recent { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.recent__main { display: grid; gap: 3px; min-width: 0; }
.recent__main .keytext { font-size: 17px; }
.recent small, .recent__side small { color: var(--faint); font-size: 12.5px; }
.recent__side { display: grid; gap: 6px; justify-items: end; flex: none; }

/* acessos por aparelho (admin) */
.devs { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.devs h4 { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.dev { display: grid; gap: 2px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13.5px; }
.dev b { font-weight: 600; color: var(--text); }
.dev span { color: var(--muted); font-size: 12.5px; word-break: break-word; }
.recent__dev { color: var(--muted); font-size: 12.5px; }

/* =========================================================
   CLEAN — visual calmo: sem brilhos, sem listras, tipografia simples
   (fica por último de propósito: sobrescreve o estilo anterior)
   ========================================================= */
:root {
  --bg: #08080a;
  --surface: #0e0e11;
  --surface-2: #131316;
  --surface-3: #18181c;
  --line: #1a1a1f;
  --line-2: #26262d;
  --r-card: 20px;
  --r-md: 14px;
}
body { background: var(--bg); }

/* fundo: só um respiro de vermelho bem discreto no topo */
.slash { display: none; }
.bg::before { background: radial-gradient(50% 28% at 50% -6%, rgba(255, 30, 30, .09), transparent 70%); }

/* títulos: simples, sem itálico nem caixa alta */
.h-display, h1, h2, h3 { font-style: normal; text-transform: none; font-weight: 700; letter-spacing: -.025em; line-height: 1.1; }
h1 { font-size: clamp(30px, 7vw, 44px); }
h2 { font-size: 22px; }
h3 { font-size: 17px; }

/* topo */
.nav { background: rgba(8, 8, 10, .8); border-bottom-color: rgba(255, 255, 255, .05); }
.nav__logo img { height: 30px; }
.pill { height: 30px; font-size: 12.5px; background: transparent; border-color: var(--line-2); font-weight: 500; }
.pill.ok::before { box-shadow: none; }
.nav__switch { background: transparent; border-color: var(--line-2); }
.nav__sw { font-weight: 500; }
.btn.small.ghost { border-color: var(--line-2); }

/* botões */
.btn { font-weight: 500; background: var(--surface-2); border-color: var(--line-2); }
.btn.primary { font-family: var(--body); font-style: normal; text-transform: none; letter-spacing: -.01em; font-weight: 600; font-size: 16px; }
.btn.xl { height: 52px; font-size: 16px; }
.btn.primary:not(:disabled):hover { box-shadow: none !important; }
.btn.discord { height: 52px; font-weight: 600; }
.btn.discord:hover { box-shadow: none !important; }

/* campos */
input[type=text], input[type=password], input[type=number], input[type=search] { height: 48px; border-radius: 14px; background: var(--bg); font-size: 15px; }
input:focus { box-shadow: 0 0 0 3px var(--red-soft); }
.key-input { height: 56px; font-family: var(--body); font-style: normal; font-weight: 600; font-size: 18px; letter-spacing: .08em; }
label.field { font-size: 12.5px; }

/* cartões */
.card { padding: 22px 20px; background: var(--surface); border-color: var(--line); }
.gate__card { margin-top: -12px; }

/* login */
.or { margin: 16px 0; letter-spacing: .1em; font-weight: 500; }

/* gerador: perguntas */
.profile { padding: 4px 20px; }
.field-row { padding: 18px 0; gap: 10px; }
.field-row__n { font-family: var(--body); font-style: normal; font-weight: 500; font-size: 12px; color: var(--faint); }
.field-row__t { font-size: 15px; font-weight: 600; }
.field-row__h { font-size: 12px; }
.gen { padding: 16px 0 4px; }

/* resultado */
.result { margin-top: 16px; }
.result__head h2 { font-size: 20px; }
.slider-row { padding: 16px 0; }
.slider-row .name { font-weight: 500; font-size: 15px; color: var(--muted); }
.slider-row .val { font-family: var(--body); font-style: normal; font-weight: 700; font-size: 26px; letter-spacing: -.03em; }
.slider-row.main .name { font-size: 12px; letter-spacing: .12em; font-weight: 600; }
.slider-row.main .val { font-size: clamp(64px, 18vw, 88px); letter-spacing: -.05em; }
.track { height: 6px; background: var(--surface-3); }
.fill { background: var(--red); }
.thumb { width: 16px; height: 16px; border: 0; background: #fff; box-shadow: 0 0 0 4px rgba(227, 19, 19, .28); }
.kv b { font-family: var(--body); font-style: normal; font-weight: 600; font-size: 17px; }
.tips li::before { transform: none; border-radius: 50%; width: 6px; height: 6px; top: .6em; }
.history-box h3 { font-size: 15px; color: var(--muted); font-weight: 600; }
.history button { border-radius: 14px; }

/* barra de baixo: chata de menos — sem caixa interna */
.tabbar { padding: 6px 12px calc(6px + env(safe-area-inset-bottom)); background: rgba(8, 8, 10, .88); }
.tabbar__in { background: transparent; border: 0; padding: 0; gap: 2px; }
.tabbtn { height: 52px; border-radius: 12px; font-weight: 500; }
.tabbtn[aria-selected=true] { background: transparent; border-color: transparent; color: #fff; }
.tabbtn[aria-selected=true] svg { color: var(--red-hi); }
.tabbtn[aria-selected=true] span::after { content: ''; display: block; width: 16px; height: 2px; border-radius: 2px; background: var(--red-hi); margin: 3px auto 0; }
.tabbtn span::after { content: ''; display: block; height: 2px; margin-top: 3px; }
body.has-tabbar .page { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
body.has-tabbar .toast { bottom: calc(86px + env(safe-area-inset-bottom)); }

/* abas internas */
.pane, .apane { gap: 10px; }
.apane { gap: 18px; }
.opt, .link-card { border-radius: 16px; padding: 14px; }
.opt__ico { width: 40px; height: 40px; border-radius: 12px; background: transparent; }
.opt__txt b { font-size: 15px; font-weight: 600; }
.opt-count { border-radius: 16px; }
.opt-count__row b { font-family: var(--body); font-style: normal; font-weight: 700; font-size: 22px; }
.opt-count__bar i { background: var(--red); }
.tip { border-radius: 16px; padding: 16px; }
.tip__n { font-family: var(--body); font-style: normal; font-weight: 600; font-size: 13px; color: var(--faint); padding-top: 3px; }
.tip h3 { font-size: 15px; margin-bottom: 4px; }
.tip p { font-size: 14px; }
.pane__lead { font-size: 14px; }

/* admin */
.stats { gap: 8px; }
.stat { border-radius: 16px; padding: 14px; }
.stat b { font-family: var(--body); font-style: normal; font-weight: 700; font-size: 28px; letter-spacing: -.03em; }
.keytext { font-family: var(--body); font-style: normal; font-weight: 600; font-size: 16px; letter-spacing: .04em; }
.recent__main .keytext { font-size: 15px; }
.keyrow { border-radius: 16px; padding: 16px; }
.recent { border-radius: 14px; }
.section-title h2 { font-size: 18px; }
.tabs__bar { box-shadow: none; }
.tab { font-weight: 500; }
.tab[aria-selected=true] { font-weight: 600; }
.dev { border-radius: 12px; }
.icon-edit img { border-radius: 16px; }

/* toast e detalhes */
.toast { font-weight: 500; }
.toast::before { box-shadow: none; }
.footer { margin-top: 40px; padding-top: 28px; padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
.footer img { width: 44px; height: 44px; border-radius: 12px; opacity: .9; }
.footer p { font-size: 12.5px; }

/* desktop: coluna central mais estreita e respirada */
@media (min-width: 720px) {
  .card { padding: 26px 28px; }
  .profile { padding: 6px 28px; }
  .stats { grid-template-columns: repeat(6, 1fr); }
  h2 { font-size: 24px; }
}
.chart { max-width: 560px; margin: 0 auto; width: 100%; }
