/* ============ Tokens ============ */
:root {
  --bg: #f5f4ef; --surface: #ffffff; --surface-2: #efeee8;
  --ink: #131517; --ink-2: #3b3f45; --muted: #6a6e75; --line: #e3e1d9;
  --night: #060a13; --night-2: #101826; --night-ink: #eaf1ff; --night-muted: #8e9bb2;
  --lime: #4da3ff; --lime-ink: #04122b;
  --accent: #1d5fd1;
  --danger: #c43c2b; --danger-bg: #fdecea;
  --ok-bg: #e1f3e6; --ok-ink: #1d6b36;
  --radius: 14px; --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(20,20,10,.05), 0 6px 24px -12px rgba(20,20,10,.18);
  --f-head: "Bricolage Grotesque", system-ui, sans-serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;
  /* tool colors: soft bg / strong fg */
  --c-lime-bg: #dde9ff; --c-lime: #1d5fd1;
  --c-sky-bg: #d3f3fb;  --c-sky: #0a7490;
  --c-rose-bg: #ffe2e6; --c-rose: #b4234a;
  --c-amber-bg: #ffefcc; --c-amber: #94590a;
  --c-violet-bg: #ece4ff; --c-violet: #5b3cc4;
  --c-teal-bg: #d6f5ef; --c-teal: #0f7465;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0f0f; --surface: #161a1a; --surface-2: #1d2222;
    --ink: #eef1ec; --ink-2: #c9cec7; --muted: #949a93; --line: #2a302e;
    --night: #090b0b; --night-2: #151a17;
    --accent: #7ab8ff;
    --danger-bg: #3a1714; --ok-bg: #12301d; --ok-ink: #7fe0a0;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px -14px rgba(0,0,0,.7);
    --c-lime-bg: #13264a; --c-lime: #8cc3ff;
    --c-sky-bg: #0f2f38;  --c-sky: #6fd6ee;
    --c-rose-bg: #3a1820; --c-rose: #ff97ad;
    --c-amber-bg: #372912; --c-amber: #ffc861;
    --c-violet-bg: #251d42; --c-violet: #b9a3ff;
    --c-teal-bg: #10302b; --c-teal: #6fe0cb;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d0f0f; --surface: #161a1a; --surface-2: #1d2222;
  --ink: #eef1ec; --ink-2: #c9cec7; --muted: #949a93; --line: #2a302e;
  --night: #090b0b; --night-2: #151a17; --accent: #7ab8ff;
  --danger-bg: #3a1714; --ok-bg: #12301d; --ok-ink: #7fe0a0;
  --c-lime-bg: #13264a; --c-lime: #8cc3ff; --c-sky-bg: #0f2f38; --c-sky: #6fd6ee;
  --c-rose-bg: #3a1820; --c-rose: #ff97ad; --c-amber-bg: #372912; --c-amber: #ffc861;
  --c-violet-bg: #251d42; --c-violet: #b9a3ff; --c-teal-bg: #10302b; --c-teal: #6fe0cb;
  color-scheme: dark;
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.6 var(--f-body); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--f-head); line-height: 1.12; margin: 0 0 .4em; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(26px, 4vw, 34px); }
h2 { font-size: clamp(22px, 3vw, 30px); }
p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.mono { font-family: var(--f-mono); font-size: .92em; letter-spacing: -0.01em; }
.ic { flex: none; vertical-align: middle; }
code { font-family: var(--f-mono); background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }

/* ============ Buttons ============ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px; border: 0;
  background: var(--ink); color: var(--bg); font: 600 15px var(--f-body); cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: transform .12s, opacity .12s; }
.btn:hover { opacity: .9; }
.btn:active { transform: scale(.98); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-lime { background: var(--lime); color: var(--lime-ink); }
.btn-ghost { background: rgba(255,255,255,.08); color: var(--night-ink); border: 1px solid rgba(255,255,255,.14); }
.btn-ghost-dark { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost-dark:hover { background: var(--surface-2); opacity: 1; }
.btn-danger { background: var(--danger-bg); color: var(--danger); }
.copied { background: var(--ok-bg) !important; color: var(--ok-ink) !important; }

/* ============ Nav ============ */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.home .nav { background: color-mix(in srgb, var(--night) 90%, transparent); border-color: rgba(255,255,255,.08); }
.home .nav .logo, .home .nav-links a:not(.btn) { color: var(--night-ink); }
.home .nav .btn { background: var(--lime); color: var(--lime-ink); }
.home .nav-burger span { background: var(--night-ink); }
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font: 800 20px var(--f-head); color: var(--ink); letter-spacing: -0.03em; text-decoration: none !important; }
.logo-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: #02060f; overflow: hidden; flex: none; }
.logo-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a:not(.btn) { color: var(--ink-2); font-weight: 500; font-size: 14.5px; }
.nav-t { display: none; }
.nav-burger { display: none; width: 40px; height: 40px; cursor: pointer; flex-direction: column; justify-content: center; gap: 6px; padding: 0 9px; }
.nav-burger span { height: 2px; background: var(--ink); border-radius: 2px; }
@media (max-width: 760px) {
  .nav-burger { display: flex; }
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 4px; padding: 12px 16px 18px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .home .nav-links { background: var(--night-2); }
  .nav-links a:not(.btn) { padding: 10px 4px; }
  .nav-t:checked ~ .nav-links { display: flex; }
}

/* ============ Flash ============ */
.flash { padding: 12px 16px; border-radius: 12px; margin: 14px 0; font-size: 14px; font-weight: 500; }
.flash-ok { background: var(--ok-bg); color: var(--ok-ink); }
.flash-err { background: var(--danger-bg); color: var(--danger); }

/* ============ Hero ============ */
.hero { background: radial-gradient(1200px 500px at 85% -10%, #12306a 0%, transparent 60%), var(--night); color: var(--night-ink); padding: 72px 0 64px; overflow: hidden; }
.hero-in { max-width: 820px; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--night-muted); border: 1px solid rgba(255,255,255,.12); padding: 6px 14px; border-radius: 999px; margin-bottom: 22px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(77,163,255,.22); }
.hero h1 { font-size: clamp(36px, 7vw, 68px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.02; margin-bottom: 18px; }
.hero h1 em { font-style: normal; color: var(--lime); }
.lead { font-size: clamp(16px, 2.2vw, 19px); color: var(--night-muted); max-width: 600px; margin: 0 auto 32px; }
.shorten { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 999px; padding: 6px 6px 6px 18px; max-width: 680px; margin: 0 auto; box-shadow: 0 20px 50px -20px rgba(77,163,255,.38); scroll-margin-top: 90px; }
.shorten-ic { color: #8b8f86; display: flex; }
.shorten input { flex: 1; min-width: 0; border: 0; outline: 0; font: 500 16px var(--f-body); color: #131517; background: transparent; height: 46px; }
.shorten .btn { height: 48px; }
.hero-err { color: #ffb4a8; margin: 14px 0 0; font-size: 14px; }
.result { max-width: 680px; margin: 18px auto 0; background: var(--night-2); border: 1px solid rgba(77,163,255,.38); border-radius: var(--radius-lg); padding: 16px 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; text-align: left; }
.result-main { flex: 1; min-width: 200px; display: flex; flex-direction: column; }
.result-main .muted { color: var(--night-muted); }
.result-url { color: var(--lime); font-size: 19px; word-break: break-all; }
.result-act { display: flex; gap: 8px; }
.result-note { width: 100%; margin: 0; color: var(--night-muted); }
.result-note a { color: var(--lime); }
.hero-stats { display: flex; justify-content: center; gap: clamp(20px, 6vw, 64px); margin-top: 48px; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font: 800 30px var(--f-head); letter-spacing: -0.03em; }
.hero-stats span { color: var(--night-muted); font-size: 13px; }

/* ============ Sections ============ */
.sec { padding: 80px 0; }
.sec-alt { background: var(--surface); border-block: 1px solid var(--line); }
.sec-head { max-width: 560px; margin-bottom: 36px; }
.eyebrow-dark { font: 600 12.5px var(--f-body); text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin-bottom: 10px; }
.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.tool { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; color: var(--ink); text-decoration: none !important; transition: transform .15s, box-shadow .15s, border-color .15s; }
.tool:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.tool h3 { font-size: 19px; margin: 16px 0 6px; }
.tool p { color: var(--muted); font-size: 14px; flex: 1; }
.tool-go { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.tool-ic { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--c-lime-bg); color: var(--c-lime); flex: none; }
.tool-ic.big { width: 54px; height: 54px; border-radius: 16px; }
.tool-lime .tool-ic, .tool-ic.tool-lime { background: var(--c-lime-bg); color: var(--c-lime); }
.tool-sky .tool-ic, .tool-ic.tool-sky { background: var(--c-sky-bg); color: var(--c-sky); }
.tool-rose .tool-ic, .tool-ic.tool-rose { background: var(--c-rose-bg); color: var(--c-rose); }
.tool-amber .tool-ic, .tool-ic.tool-amber { background: var(--c-amber-bg); color: var(--c-amber); }
.tool-violet .tool-ic, .tool-ic.tool-violet { background: var(--c-violet-bg); color: var(--c-violet); }
.tool-teal .tool-ic, .tool-ic.tool-teal { background: var(--c-teal-bg); color: var(--c-teal); }
.feat-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: start; }
.feats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 26px 28px; }
.feats li { display: flex; gap: 14px; }
.feats li > .ic { color: var(--accent); margin-top: 2px; }
.feats h4 { font-size: 16.5px; margin-bottom: 4px; }
.feats p { color: var(--muted); font-size: 14px; margin: 0; }
@media (max-width: 820px) { .feat-grid { grid-template-columns: 1fr; gap: 28px; } .feats { grid-template-columns: 1fr; } }
.faq-wrap { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; font: 600 17px var(--f-head); padding: 16px 32px 16px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 24px; font-weight: 400; color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq p { color: var(--muted); margin: -4px 0 16px; }
.cta { background: var(--night); color: var(--night-ink); padding: 64px 0; }
.cta-in { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.cta h2 { margin: 0; font-size: clamp(24px, 4vw, 38px); }

/* ============ Footer ============ */
.foot { border-top: 1px solid var(--line); padding: 40px 0 26px; margin-top: 0; }
.dash .foot, .auth-page .foot { margin-top: 60px; }
.foot-in { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot-in p { margin: 6px 0 0; font-size: 14px; }
.foot nav { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.foot nav a { color: var(--ink-2); font-size: 14px; }
.foot-copy { font-size: 13px; margin-top: 26px; }

/* ============ Cards & forms ============ */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; min-width: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-h h2 { font-size: 17px; margin: 0; letter-spacing: -0.01em; }
.auth { display: grid; place-items: center; padding: 56px 16px; }
.auth-card { width: 100%; max-width: 420px; padding: 32px; }
.form { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
input, select, textarea { font: 15px var(--f-body); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px; outline: none; width: 100%; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
textarea { resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }
.req { color: var(--danger); font-weight: 600; }
.prefix-input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 11px; background: var(--bg); overflow: hidden; }
.prefix-input span { padding: 0 2px 0 12px; color: var(--muted); font-weight: 500; white-space: nowrap; font-size: 13px; max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
.prefix-input input { border: 0; background: transparent; padding-left: 2px; box-shadow: none !important; }
.adv { border: 1px dashed var(--line); border-radius: 12px; padding: 4px 14px; }
.adv summary { cursor: pointer; font-weight: 600; font-size: 14px; padding: 10px 0; color: var(--ink-2); }
.adv[open] { padding-bottom: 14px; }

/* ============ Dashboard ============ */
.dash-main { padding-top: 30px; }
.dash-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.dash-top h1 { margin: 0; }
.dash-top p { margin: 0 0 2px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.kpi span { color: var(--muted); font-size: 13px; font-weight: 500; }
.kpi strong { font: 800 30px var(--f-head); letter-spacing: -0.03em; line-height: 1.1; }
.kpi .kpi-sm { font-size: 20px; }
.kpi-hi { background: var(--night); border-color: var(--night); color: var(--night-ink); }
.kpi-hi span { color: var(--night-muted); }
.kpi-hi strong { color: var(--lime); }
@media (max-width: 760px) { .kpis { grid-template-columns: 1fr 1fr; } .kpi strong { font-size: 24px; } }
.dash-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 14px; margin-bottom: 14px; }
@media (max-width: 860px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-grid > .card:has(.bars) { display: flex; flex-direction: column; }
.bars { display: flex; align-items: flex-end; gap: 5px; height: 200px; padding-top: 22px; }
.dash-grid .bars { flex: 1; min-height: 200px; height: auto; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; min-width: 0; }
.bar i { display: block; width: 100%; max-width: 30px; background: var(--c-lime); opacity: .85; border-radius: 6px 6px 3px 3px; transition: opacity .15s; }
.bar:last-child i { background: var(--accent); opacity: 1; }
.bar:hover i { opacity: 1; }
.bar-v { font-size: 10.5px; color: var(--muted); font-weight: 600; margin-bottom: 3px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-l { font-size: 11px; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .bar-v { display: none; } .bars { gap: 3px; } }
.rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rank li { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-radius: 9px; overflow: hidden; font-size: 14px; background: var(--surface-2); }
.rank-fill { position: absolute; inset: 0 auto 0 0; background: var(--c-lime-bg); }
.rank-k, .rank-n { position: relative; }
.rank-k { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 8px; }
.rank-n { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.quick { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; scrollbar-width: none; }
.quick-i { display: inline-flex; align-items: center; gap: 9px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 16px 6px 6px; color: var(--ink); font-weight: 600; font-size: 14px; white-space: nowrap; text-decoration: none !important; }
.quick-i .tool-ic { width: 30px; height: 30px; border-radius: 50%; }
.quick-i:hover { border-color: var(--ink-2); }
.search input { height: 38px; padding: 7px 14px; border-radius: 999px; width: 220px; max-width: 100%; }
.empty { text-align: center; padding: 36px 0; color: var(--muted); }
.links { display: flex; flex-direction: column; }
.link-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.link-row:first-child { border-top: 0; padding-top: 0; }
.link-row.is-off { opacity: .6; }
.link-info { flex: 1; min-width: 0; }
.link-title { font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.link-short { font-size: 13.5px; }
.link-target { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--c-lime-bg); color: var(--c-lime); }
.tag-off { background: var(--danger-bg); color: var(--danger); }
.link-clicks { text-align: right; display: flex; flex-direction: column; min-width: 56px; }
.link-clicks strong { font: 700 19px var(--f-head); }
.link-clicks span { font-size: 11.5px; color: var(--muted); }
.link-act { display: flex; gap: 4px; align-items: center; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; font-size: 16px; text-decoration: none !important; list-style: none; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn::-webkit-details-marker { display: none; }
.more { position: relative; }
.more-menu { position: absolute; right: 0; top: 42px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; min-width: 150px; z-index: 5; }
.more-menu button { width: 100%; text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 8px; font: 500 14px var(--f-body); color: var(--ink); cursor: pointer; }
.more-menu button:hover { background: var(--surface-2); }
.more-menu .danger { color: var(--danger); }
@media (max-width: 640px) {
  .link-row { flex-wrap: wrap; }
  .link-row > .tool-ic { display: none; }
  .link-info { flex-basis: calc(100% - 70px); }
  .link-act { width: 100%; }
}
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.pager a { min-width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); color: var(--ink-2); }
.pager a.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; }
.seg a { padding: 6px 14px; border-radius: 999px; color: var(--ink-2); font-size: 13.5px; font-weight: 600; text-decoration: none !important; }
.seg a.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* New link */
.new-main { padding-top: 26px; max-width: 760px; }
.type-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; scrollbar-width: none; }
.type-tab { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 5px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: 13.5px; white-space: nowrap; text-decoration: none !important; }
.type-tab .tool-ic { width: 28px; height: 28px; border-radius: 50%; }
.type-tab.on { border-color: var(--ink); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.new-card { padding: 28px; }
.new-head { display: flex; gap: 16px; align-items: center; }
.new-head h1 { margin-bottom: 2px; }
.new-head p { margin: 0; }
.created { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 0; }
.created .result-url { color: var(--accent); }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* Stats */
.back { display: inline-block; margin-bottom: 12px; color: var(--muted); }
.stats-title { display: flex; gap: 16px; align-items: center; min-width: 0; max-width: 100%; }
.stats-title > div { min-width: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
@media (max-width: 960px) { .stat-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .stat-grid { grid-template-columns: 1fr; } }
.recent { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.recent li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.recent li:first-child { border: 0; }

/* Admin table */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; max-width: 300px; }
.tbl-act { text-align: right; white-space: nowrap; }
.tbl-act form { display: inline-block; margin-left: 6px; }
.prose { max-width: 720px; padding-top: 40px; font-size: 16px; }
.prose p { color: var(--ink-2); }

/* ============ Modal (QR) ============ */
.modal { position: fixed; inset: 0; background: rgba(8,10,9,.6); display: grid; place-items: center; z-index: 50; padding: 16px; animation: fade .15s; }
.modal-box { background: #fff; color: #131517; border-radius: var(--radius-lg); padding: 26px; width: 100%; max-width: 300px; text-align: center; position: relative; }
.modal-x { position: absolute; right: 10px; top: 6px; border: 0; background: none; font-size: 26px; cursor: pointer; color: #6a6e75; }
.qr-box { display: grid; place-items: center; margin: 6px auto 14px; }
.qr-box img, .qr-box canvas { width: 220px; height: 220px; }
.modal-box p { word-break: break-all; color: #3b3f45; }
.modal-box .btn { background: #131517; color: #fff; }
@keyframes fade { from { opacity: 0; } }

/* ============ Public link pages ============ */
.pub { min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(900px 400px at 50% -10%, var(--c-lime-bg), transparent 70%), var(--bg); }
.pub-main { flex: 1; width: 100%; max-width: 560px; margin: 0 auto; padding: 40px 16px; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.pub-main:has(.pub-wide) { max-width: 820px; }
.pub-center { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pub-center .form { width: 100%; }
.pub-card { background: var(--surface); border: 1px solid var(--line); border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); }
.pub-img { width: 100%; max-height: 520px; object-fit: cover; background: var(--surface-2); }
.pub-body { padding: 22px 24px 24px; }
.pub-body p { color: var(--ink-2); }
.pub-video { position: relative; aspect-ratio: 16 / 9; background: #000; }
.pub-video iframe, .pub-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pub-contact { padding: 32px 22px 24px; text-align: center; }
.c-avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin: 0 auto 14px; display: grid; place-items: center; }
.c-initial { background: var(--c-amber-bg); color: var(--c-amber); font: 800 40px var(--f-head); }
.c-list { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; text-align: left; }
.c-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); font-weight: 500; text-decoration: none !important; transition: background .12s; }
.c-row:hover { background: var(--surface-2); }
.c-row span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--c-amber-bg); color: var(--c-amber); flex: none; }
.timer { position: relative; width: 120px; height: 120px; margin-bottom: 14px; }
.timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer circle { fill: none; stroke-width: 7; }
.t-bg { stroke: var(--line); }
.t-fg { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 276.5; stroke-dashoffset: 0; animation: drain linear forwards; }
@keyframes drain { to { stroke-dashoffset: 276.5; } }
.t-num { position: absolute; inset: 0; display: grid; place-items: center; font: 800 38px var(--f-head); }
.t-btn { margin-top: 10px; }
.ad-slot { margin: 18px auto; text-align: center; max-width: 100%; overflow: hidden; }
.pub-foot { text-align: center; padding: 20px; font-size: 13px; }
.pub-foot a { color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.pub-foot .logo-mark { width: 20px; height: 20px; border-radius: 6px; }

/* ============ v1.1: approval, settings, sign-up prompt ============ */
.tag-wait { background: var(--c-amber-bg); color: var(--c-amber); }
.badge { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.hero-cta { margin: 26px auto 0; max-width: 520px; text-align: center; }
.hero-cta p { margin: 0 0 14px; opacity: .85; }
.hero-cta-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.settings { max-width: 720px; margin-bottom: 18px; }
.settings h2 { font-size: 17px; margin: 10px 0 0; }
.settings h2:first-of-type { margin-top: 0; }
.settings textarea, .settings select, .settings input:not([type=checkbox]) { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); }
.settings .check { flex-direction: row; align-items: center; gap: 10px; font-weight: 500; }
.settings .check input { width: 18px; height: 18px; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-form input { flex: 1; min-width: 180px; }
