/* ==========================================================
   Encurtador de URL — style.css
   Mobile-first · claro/escuro · sem fontes externas (CWV)
   ========================================================== */

:root {
  --bg: #f6f5f0;
  --bg-alt: #efede5;
  --surface: #ffffff;
  --ink: #11181c;
  --muted: #55616b;
  --line: #e2dfd4;
  --accent: #0f766e;
  --accent-strong: #0b5e57;
  --accent-soft: #d9f0ec;
  --accent-ink: #ffffff;
  --danger: #b42318;
  --danger-soft: #fde8e6;
  --ok-soft: #dff5ec;
  --shadow: 0 1px 2px rgba(17, 24, 28, .05), 0 12px 32px -12px rgba(17, 24, 28, .18);
  --radius: 16px;
  --header-h: 64px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1117;
    --bg-alt: #111823;
    --surface: #151c26;
    --ink: #e8edf2;
    --muted: #97a4b0;
    --line: #263142;
    --accent: #2dd4bf;
    --accent-strong: #5eead4;
    --accent-soft: #0f2f2d;
    --accent-ink: #04201d;
    --danger: #ff8a80;
    --danger-soft: #3a1714;
    --ok-soft: #10301f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 36px -14px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1117;
  --bg-alt: #111823;
  --surface: #151c26;
  --ink: #e8edf2;
  --muted: #97a4b0;
  --line: #263142;
  --accent: #2dd4bf;
  --accent-strong: #5eead4;
  --accent-soft: #0f2f2d;
  --accent-ink: #04201d;
  --danger: #ff8a80;
  --danger-soft: #3a1714;
  --ok-soft: #10301f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 36px -14px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body.nav-lock { overflow: hidden; }
main { flex: 1 0 auto; outline: none; }
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -.01em; text-wrap: balance; }
h1, h2 { font-family: var(--serif); font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }
code { font-family: var(--mono); font-size: .9em; background: var(--bg-alt); padding: .1em .35em; border-radius: 6px; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--accent-ink); }

.container { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.narrow { max-width: 760px; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; text-decoration: none; transition: top .2s; }
.skip-link:focus { top: 12px; }
.hint { font-size: .875rem; color: var(--muted); }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: inherit; font-weight: 650; line-height: 1;
  padding: .85em 1.3em; min-height: 44px;
  border: 1.5px solid var(--accent); border-radius: 12px;
  background: var(--accent); color: var(--accent-ink);
  cursor: pointer; text-decoration: none; position: relative;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--accent-ink); }
.btn:active { transform: translateY(1px); }
.btn-lg { min-height: 56px; padding-inline: 1.7em; font-size: 1.05rem; border-radius: 14px; }
.btn-sm { min-height: 40px; padding: .6em 1em; font-size: .9rem; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-alt); color: var(--ink); border-color: var(--muted); }
.btn-light { background: #fff; color: #0b3d38; border-color: #fff; }
.btn-light:hover { background: #e9fffb; color: #0b3d38; border-color: #e9fffb; }
.btn-danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.btn-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--accent-strong); }
.btn .spinner { display: none; width: 18px; height: 18px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn.is-loading .spinner { display: inline-block; }
.btn.is-loading .btn-label { opacity: .75; }
.btn.is-loading { pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border-radius: 12px; border: 1px solid transparent; background: transparent; color: var(--ink); cursor: pointer;
}
.icon-btn:hover { background: var(--bg-alt); }
.theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: block; }
}

/* ---------- header + menu hambúrguer ---------- */
.site-header { position: sticky; top: 0; z-index: 60; height: var(--header-h); border-bottom: 1px solid var(--line); }
/* blur em pseudo-elemento: backdrop-filter no próprio header quebraria o menu fixed */
.site-header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb, var(--bg) 86%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); }
.header-inner { display: flex; align-items: center; gap: 12px; height: 100%; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 600; letter-spacing: -.02em; font-size: 1.15rem; }
.brand:hover { color: var(--ink); }
.brand-text b { color: var(--accent); font-weight: 800; }
.brand-mark { flex: none; border-radius: 9px; }

.header-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }

.nav-toggle { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); cursor: pointer; }
.nav-toggle:hover { background: var(--bg-alt); }
.nav-toggle .bars { position: relative; width: 20px; height: 14px; display: block; }
.nav-toggle .bars i { position: absolute; left: 0; width: 100%; height: 2px; background: currentColor; border-radius: 2px; transition: transform .28s cubic-bezier(.4, 0, .2, 1), opacity .2s, top .28s cubic-bezier(.4, 0, .2, 1); }
.nav-toggle .bars i:nth-child(1) { top: 0; }
.nav-toggle .bars i:nth-child(2) { top: 6px; }
.nav-toggle .bars i:nth-child(3) { top: 12px; }
.nav-toggle[aria-expanded="true"] .bars i:nth-child(1) { top: 6px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars i:nth-child(2) { opacity: 0; transform: scaleX(.2); }
.nav-toggle[aria-expanded="true"] .bars i:nth-child(3) { top: 6px; transform: rotate(-45deg); }

/* Mobile: painel que desce do header */
.site-nav {
  position: fixed; left: 0; right: 0; top: var(--header-h);
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg); border-bottom: 1px solid var(--line);
  box-shadow: 0 24px 40px -20px rgba(0, 0, 0, .35);
  padding: 8px 16px calc(20px + env(safe-area-inset-bottom));
  opacity: 0; visibility: hidden; transform: translateY(-10px);
  transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s;
  z-index: 55;
}
.site-nav.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav li a { display: flex; align-items: center; justify-content: space-between; padding: 16px 4px; min-height: 52px; font-size: 1.1rem; font-weight: 550; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.site-nav li a::after { content: "→"; color: var(--muted); }
.site-nav li a[aria-current="page"] { color: var(--accent); }
.site-nav .nav-cta { width: 100%; margin-top: 18px; min-height: 52px; }
.nav-backdrop { position: fixed; inset: 0; top: var(--header-h); z-index: 50; background: rgba(5, 10, 15, .45); }

@media (min-width: 900px) {
  .nav-toggle, .nav-backdrop { display: none !important; }
  .header-inner { gap: 28px; }
  .header-actions { margin-left: 0; }
  .site-nav { position: static; display: flex; flex: 1; align-items: center; justify-content: space-between; max-height: none; overflow: visible; background: none; border: 0; box-shadow: none; padding: 0; opacity: 1; visibility: visible; transform: none; transition: none; }
  .site-nav ul { display: flex; gap: 4px; }
  .site-nav li a { padding: 8px 14px; min-height: 0; font-size: .95rem; border: 0; border-radius: 10px; }
  .site-nav li a::after { content: none; }
  .site-nav li a:hover { background: var(--bg-alt); color: var(--ink); }
  .site-nav .nav-cta { width: auto; margin: 0; min-height: 40px; }
  .header-actions { order: 3; }
}

/* ---------- hero ---------- */
.hero { position: relative; padding: 44px 0 56px; text-align: center; overflow: hidden; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 50% at 50% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    radial-gradient(40% 40% at 90% 30%, color-mix(in srgb, #f59e0b 12%, transparent), transparent 70%);
}
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 20%, #000, transparent 80%);
  mask-image: radial-gradient(70% 70% at 50% 20%, #000, transparent 80%);
}
.hero-compact { padding-top: 28px; }
.hero-inner { max-width: 860px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: .85rem; font-weight: 600; color: var(--muted); }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .2); }
.hero h1 { font-size: clamp(2.1rem, 7.2vw, 4rem); margin-bottom: 16px; }
.hero h1 em { font-style: italic; color: var(--accent); }
.lead { font-size: clamp(1.02rem, 2.6vw, 1.22rem); color: var(--muted); max-width: 640px; margin: 0 auto 28px; }

.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 0; margin: 0 0 16px; font-size: .88rem; color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; opacity: .6; }
.breadcrumb a { color: var(--muted); }

/* ---------- formulário do encurtador ---------- */
.shortener { text-align: left; margin-top: 8px; }
.input-row { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 10px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s; }
.input-row:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent), var(--shadow); }
.input-icon { position: absolute; left: 26px; top: 29px; color: var(--muted); pointer-events: none; }
.input-row input { width: 100%; min-height: 56px; padding: 0 14px 0 48px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 1.05rem; outline: none; }
.input-row input::placeholder { color: var(--muted); opacity: .8; }
.input-row .btn { width: 100%; }

@media (min-width: 640px) {
  .input-row { flex-direction: row; align-items: center; padding: 8px 8px 8px 10px; }
  .input-icon { top: 50%; transform: translateY(-50%); left: 24px; }
  .input-row .btn { width: auto; flex: none; }
}

.advanced { margin-top: 12px; font-size: .95rem; }
.advanced summary { cursor: pointer; color: var(--muted); font-weight: 550; list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 2px; min-height: 36px; }
.advanced summary::-webkit-details-marker { display: none; }
.advanced summary::before { content: "+"; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--bg-alt); font-weight: 700; line-height: 1; }
.advanced[open] summary::before { content: "−"; }
.advanced summary:hover { color: var(--ink); }
.advanced-body { margin-top: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.advanced-body label { display: block; font-weight: 600; margin-bottom: 8px; font-size: .9rem; }
.alias-row { display: flex; flex-wrap: nowrap; align-items: stretch; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg); }
.alias-row:focus-within { border-color: var(--accent); }
.alias-prefix { display: flex; align-items: center; padding: 0 10px; min-height: 48px; background: var(--bg-alt); color: var(--muted); font-size: .82rem; white-space: nowrap; }
.alias-row input { flex: 1; min-width: 0; min-height: 48px; padding: 0 12px; border: 0; background: transparent; color: var(--ink); font: inherit; outline: none; }
.advanced-body .hint { margin: 8px 0 0; }

.form-error { margin: 12px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--danger-soft); color: var(--danger); font-weight: 550; font-size: .95rem; }

.result { margin-top: 18px; padding: 18px; border: 1.5px solid var(--accent); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); animation: pop .35s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
.result-title { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-weight: 700; color: var(--accent); }
.result-row { display: flex; flex-direction: column; gap: 10px; }
.result-row input { width: 100%; min-height: 54px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; font-size: 1.1rem; font-weight: 600; }
.result-row .btn { min-height: 54px; }
.result-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 14px; font-size: .92rem; color: var(--muted); }
@media (min-width: 640px) { .result-row { flex-direction: row; } .result-row .btn { min-width: 130px; } }

.history { margin-top: 22px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: color-mix(in srgb, var(--surface) 70%, transparent); }
.history-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.history h2 { font-family: var(--font); font-size: 1rem; letter-spacing: 0; }
.history ul { list-style: none; margin: 0; padding: 0; }
.history li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.history li:first-child { border-top: 0; }
.history .h-main { flex: 1; min-width: 0; }
.history .h-short { display: block; font-weight: 650; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history .h-long { display: block; font-size: .82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history .btn { flex: none; }
.history .hint { margin: 8px 0 0; }

.trust { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; padding: 0; margin: 28px 0 0; font-size: .92rem; color: var(--muted); font-weight: 550; }
.trust li::before { content: "✓"; color: var(--accent); font-weight: 800; margin-right: 6px; }

/* ---------- seções ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section-head { max-width: 680px; margin: 0 auto 36px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }
.section-head h2 { font-size: clamp(1.7rem, 4.6vw, 2.5rem); margin-bottom: 10px; }
.section-head p { color: var(--muted); margin: 0; }
.kicker { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 750; color: var(--accent); margin: 0 0 10px; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; counter-reset: s; }
.steps li { position: relative; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.steps h3 { font-size: 1.2rem; margin: 14px 0 6px; font-family: var(--font); }
.steps p { margin: 0; color: var(--muted); }
.steps li > p:only-child { color: var(--ink); margin-top: 12px; }
.step-n { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 1.1rem; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); } }

.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.card { padding: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .2s, box-shadow .2s, border-color .2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.card-icon { color: var(--accent); margin-bottom: 14px; padding: 9px; box-sizing: content-box; background: var(--accent-soft); border-radius: 12px; }
.card h3 { font-size: 1.15rem; font-family: var(--font); margin-bottom: 6px; }
.card p { color: var(--muted); margin: 0; }

.prose-wrap { max-width: 780px; }
.prose h2 { font-size: clamp(1.4rem, 3.4vw, 1.8rem); margin: 2em 0 .5em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.2rem; font-family: var(--font); margin: 1.6em 0 .4em; }
.prose p, .prose li { color: color-mix(in srgb, var(--ink) 88%, var(--muted)); }
.prose li { margin-bottom: .45em; }
.tips { padding: 0; list-style: none; display: grid; gap: 12px; }
.tips li { padding: 16px 18px 16px 52px; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.tips li::before { content: "✓"; position: absolute; left: 16px; top: 15px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: .85rem; }

.faq-wrap { max-width: 800px; }
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 52px 18px 20px; font-weight: 650; position: relative; min-height: 56px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; translate: 0 -50%; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: var(--bg-alt); font-size: 1.2rem; transition: transform .2s; }
.faq details[open] summary::after { content: "−"; background: var(--accent-soft); color: var(--accent); }
.faq details p { padding: 0 20px 18px; margin: 0; color: var(--muted); }
.more-links { margin-top: 28px; text-align: center; color: var(--muted); }
.more-links a { margin-inline: 6px; }

.cta { background: linear-gradient(135deg, #0b4d47, #0f766e 55%, #14b8a6); color: #fff; text-align: center; border: 0; }
.cta h2 { font-size: clamp(1.7rem, 5vw, 2.6rem); color: #fff; margin-bottom: 8px; }
.cta p { color: rgba(255, 255, 255, .85); margin-bottom: 24px; }

/* ---------- páginas internas ---------- */
.page-hero { padding: 40px 0 8px; }
.page-hero h1 { font-size: clamp(1.9rem, 6vw, 3rem); margin-bottom: 12px; }
.page-hero .lead { margin-left: 0; margin-bottom: 8px; }
.page-hero .breadcrumb ol { justify-content: flex-start; }
.page-hero .kicker { margin-bottom: 8px; }
.state-page { padding: 72px 0 40px; }
.state-code { font-family: var(--serif); font-size: clamp(5rem, 22vw, 9rem); line-height: 1; margin: 0; color: var(--accent); opacity: .9; }
.state-page .lead { margin-inline: auto; }

.form-card { padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .95rem; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; }
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
.notice { padding: 14px 16px; border-radius: 12px; margin-bottom: 18px; font-weight: 550; }
.notice-ok { background: var(--ok-soft); color: var(--accent-strong); }
.notice-err { background: var(--danger-soft); color: var(--danger); }
.contact-mail { margin-top: 24px; color: var(--muted); }

/* ---------- estatísticas ---------- */
.stats-title { font-size: clamp(1.5rem, 5.5vw, 2.4rem); word-break: break-all; }
.dest { color: var(--muted); word-break: break-all; margin-top: 8px; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 32px; }
.kpi { padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; display: flex; flex-direction: column; gap: 2px; }
.kpi-n { font-family: var(--serif); font-size: 2rem; font-weight: 700; line-height: 1.1; }
.kpi-n.small { font-size: 1.35rem; padding-top: .5rem; }
.kpi-l { color: var(--muted); font-size: .88rem; }
@media (min-width: 720px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.h-sm { font-size: 1.3rem; margin: 8px 0 14px; }
.chart { margin: 0 0 32px; padding: 20px 16px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.bars-chart { display: grid; grid-template-columns: repeat(30, 1fr); align-items: end; gap: 3px; height: 180px; }
.bar { display: block; height: max(var(--h), 3px); background: var(--accent); border-radius: 3px 3px 0 0; opacity: .9; min-width: 0; }
.bar:hover { opacity: 1; filter: brightness(1.15); }
.chart figcaption { display: flex; justify-content: space-between; margin-top: 8px; font-size: .78rem; color: var(--muted); }
.tops { display: grid; gap: 12px; margin-bottom: 20px; }
@media (min-width: 720px) { .tops { grid-template-columns: 1fr 1fr; } }
.top-card { padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.top-card h3 { font-family: var(--font); font-size: 1rem; margin-bottom: 10px; }
.top-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.top-card li { position: relative; display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 8px; font-size: .92rem; overflow: hidden; z-index: 0; }
.top-card li i { position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--accent-soft); z-index: -1; }
.top-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-val { color: var(--muted); white-space: nowrap; }

/* ---------- rodapé ---------- */
.site-footer { margin-top: 0; background: var(--bg-alt); border-top: 1px solid var(--line); padding: 44px 0 20px; flex-shrink: 0; }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; } }
.footer-brand p { color: var(--muted); max-width: 360px; margin-top: 12px; }
.footer-title { font-family: var(--font); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer li a, .site-footer .link-btn { color: var(--ink); text-decoration: none; display: inline-block; padding: 6px 0; }
.site-footer li a:hover, .site-footer .link-btn:hover { color: var(--accent); text-decoration: underline; }
.footer-bottom { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.footer-bottom p { margin: 0; }

/* ---------- consentimento (LGPD) ---------- */
.consent { position: fixed; z-index: 90; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); max-width: 640px; margin-inline: auto; display: flex; flex-direction: column; gap: 14px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .35); animation: pop .3s ease; }
.consent p { margin: 0; font-size: .92rem; color: var(--muted); }
.consent .consent-title { color: var(--ink); font-weight: 700; margin-bottom: 4px; }
.consent-actions { display: flex; gap: 10px; }
.consent-actions .btn { flex: 1; }
@media (min-width: 640px) { .consent { flex-direction: row; align-items: center; } .consent-actions .btn { flex: none; } }

/* ---------- painel ---------- */
.admin { padding: 24px 0 60px; }
.admin-wrap { max-width: 1100px; }
.admin-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.login-card { max-width: 420px; margin: 8vh auto 0; }
.login-card h1 { margin-bottom: 16px; font-size: 2rem; }
.admin-search { display: flex; gap: 8px; margin-bottom: 12px; }
.admin-search input { flex: 1; min-height: 40px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); margin-bottom: 28px; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--bg-alt); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.url-cell { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.actions { white-space: nowrap; }
.actions form { display: inline-flex; gap: 6px; margin: 0; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--ok-soft); color: var(--accent-strong); font-size: .78rem; font-weight: 650; }
.tag-red { background: var(--danger-soft); color: var(--danger); }

/* ---------- movimento reduzido / impressão ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .consent, .shortener, .nav-backdrop { display: none !important; }
  body { background: #fff; color: #000; }
}
