:root {
  --bg: #070b16;
  --bg-soft: #0e1528;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-2: #ffffff;
  --line: rgba(255, 255, 255, 0.1);
  --line-dark: #e8edf6;
  --text: #f8fafc;
  --text-dark: #0f172a;
  --muted: #94a3b8;
  --muted-dark: #64748b;
  --brand: #6366f1;
  --brand-2: #22d3ee;
  --brand-3: #a78bfa;
  --ok: #10b981;
  --warn: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.35);
  --radius: 22px;
  --font: Inter, system-ui, sans-serif;
  --display: Sora, Inter, system-ui, sans-serif;
  --admin-sidebar: 268px;
  --admin-pad-x: clamp(16px, 2.2vw, 40px);
  --admin-gap: 16px;
  --admin-section: 22px;
  --admin-card-radius: 20px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text-dark);
  background: #f5f7fb;
  line-height: 1.6;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: rgba(7, 11, 22, 0.72);
  border-bottom: 1px solid var(--line);
}
.header-inner, .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.brand img, .brand svg { width: 32px; height: 32px; }
.nav-links { display: flex; gap: 22px; color: #cbd5e1; font-size: 14px; }
.nav-links a:hover { color: #fff; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand), #8b5cf6 55%, var(--brand-2));
  color: #fff;
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.35);
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn:disabled, .btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  filter: none;
  pointer-events: none;
}
.btn-ghost {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid var(--line);
}
.btn-light { background: #fff; color: var(--text-dark); border: 1px solid var(--line-dark); }
.btn-danger { background: #fee2e2; color: #991b1b; }
.btn-sm { padding: 8px 12px; border-radius: 10px; font-size: 13px; }
.btn-block { width: 100%; }

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 420px at 15% -10%, rgba(99,102,241,.35), transparent 55%),
    radial-gradient(700px 380px at 90% 10%, rgba(34,211,238,.22), transparent 50%),
    linear-gradient(180deg, #070b16 0%, #10182d 100%);
  color: #fff;
  padding: 72px 0 96px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: auto 10% -180px;
  height: 360px;
  background: radial-gradient(circle, rgba(99,102,241,.25), transparent 70%);
  filter: blur(20px);
  animation: pulse 8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: translateY(0); opacity: .7; }
  50% { transform: translateY(-18px); opacity: 1; }
}
.hero-grid { position: relative; display: grid; gap: 28px; }
.kicker {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid var(--line);
  color: #c7d2fe;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
h1, .display {
  font-family: var(--display);
  letter-spacing: -0.05em;
  line-height: 1.05;
  margin: 16px 0;
}
.hero h1 { font-size: clamp(40px, 7vw, 72px); max-width: 14ch; }
.lede { max-width: 54ch; color: #cbd5e1; font-size: 18px; }
.shorten-card {
  margin-top: 32px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 28px;
  padding: 10px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}
.shorten-form { display: flex; gap: 8px; }
.shorten-form input {
  flex: 1;
  border: 0;
  background: rgba(7,11,22,.55);
  color: #fff;
  border-radius: 18px;
  padding: 16px 18px;
  outline: none;
}
.shorten-form input::placeholder { color: #94a3b8; }
.result-card {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  background: #fff;
  color: var(--text-dark);
  border-radius: 18px;
  padding: 14px 16px;
}
.result-card code { color: var(--brand); font-weight: 700; word-break: break-all; }

.section { padding: 84px 0; }
.section.alt { background: #fff; }
.section-title { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-title h2 { font-family: var(--display); font-size: 36px; letter-spacing: -0.04em; margin: 0 0 8px; }
.muted { color: var(--muted-dark); }
.grid-3, .grid-2 { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card, .glass {
  background: #fff;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}
.feature-card { transition: .2s ease; }
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(15,23,42,.08); }
.icon-wrap {
  width: 48px; height: 48px; border-radius: 16px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #eef2ff, #ecfeff);
  color: var(--brand);
  margin-bottom: 14px;
}
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step-num {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brand); color: #fff; font-weight: 700; margin-bottom: 12px;
}
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.stat-card {
  text-align: center;
  padding: 32px 16px;
  border-radius: 24px;
  background: linear-gradient(180deg, #fff, #f8fafc);
  border: 1px solid var(--line-dark);
}
.stat-card strong {
  display: block;
  font-family: var(--display);
  font-size: 42px;
  letter-spacing: -0.05em;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-footer {
  background: #070b16;
  color: #cbd5e1;
  padding: 48px 0 24px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; }
.site-footer a:hover { color: #fff; }
.copyright { margin-top: 32px; border-top: 1px solid var(--line); padding-top: 16px; font-size: 13px; }

.page-hero { padding: 48px 0 12px; }
.prose { max-width: 760px; }
.prose h1 { font-family: var(--display); letter-spacing: -0.04em; }
.form-grid { display: grid; gap: 14px; }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.input, select, textarea {
  width: 100%;
  border: 1px solid #dbe3f0;
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  outline: none;
}
.input:focus, select:focus, textarea:focus { border-color: #818cf8; box-shadow: 0 0 0 4px rgba(99,102,241,.12); }
.help { color: var(--muted-dark); font-size: 12px; margin-top: 6px; }

.toast-wrap {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 80;
  display: grid;
  gap: 8px;
  justify-items: end;
  width: max-content;
  max-width: min(340px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: 100%;
  min-height: 52px;
  padding: 10px 14px 10px 11px;
  border-radius: 13px;
  color: #ecfdf5;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, 0) 46%),
    linear-gradient(180deg, #0f766e, #115e59);
  border: 1px solid rgba(167, 243, 208, .18);
  box-shadow: 0 10px 28px rgba(15, 39, 68, .18), 0 1px 2px rgba(6, 78, 59, .2);
  opacity: 0;
  transform: translateY(8px) scale(.96);
  transition: opacity .24s ease, transform .24s ease;
}
.toast.is-in {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.toast.is-out {
  opacity: 0;
  transform: translateY(6px) scale(.98);
  transition-duration: .22s;
}
.toast.success { color: #ecfdf5; }
.toast.error {
  color: #fff1f2;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, 0) 46%),
    linear-gradient(180deg, #9f1239, #881337);
  border-color: rgba(254, 205, 211, .18);
}
.toast-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #6ee7b7;
  transform: scale(.84);
  opacity: 0;
  transition: transform .24s ease .04s, opacity .24s ease .04s;
}
.toast.is-in .toast-icon {
  transform: scale(1);
  opacity: 1;
}
.toast-icon svg { width: 18px; height: 18px; display: block; }
.toast.error .toast-icon { color: #fda4af; }
.toast-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.toast-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.toast-sub {
  display: block;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
  color: rgba(236, 253, 245, .72);
}
.toast.error .toast-sub { color: rgba(255, 241, 242, .72); }
@media (max-width: 640px) {
  .toast-wrap {
    left: 12px;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    width: auto;
    max-width: none;
    justify-items: stretch;
  }
  .toast { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .toast, .toast.is-in, .toast.is-out, .toast-icon, .toast.is-in .toast-icon {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .g-copy, .g-copy-ic, .g-copy:hover, .g-copy:active {
    transition: none;
    transform: none;
    filter: none;
  }
}
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
  border: 1px solid transparent;
  font-size: 14px;
  line-height: 1.45;
}
.alert-error { background: #fef2f2; color: #9f1239; border-color: #fecaca; }
.alert-success { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.alert-info { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.alert-warning { background: #fffbeb; color: #92400e; border-color: #fde68a; }

.admin-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  background: #eef2f7;
}
.sidebar {
  width: var(--admin-sidebar);
  flex: 0 0 var(--admin-sidebar);
  max-width: var(--admin-sidebar);
  background: linear-gradient(180deg, #0b1220 0%, #101a33 100%);
  color: #cbd5e1;
  padding: 18px 14px;
  position: sticky;
  top: 0;
  z-index: 30;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-right: 1px solid rgba(255,255,255,.06);
  z-index: 50;
}
.sidebar .brand {
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  gap: 12px;
}
.sidebar .brand span { font-size: 15px; }
.side-nav { display: grid; gap: 4px; }
.side-nav a, .side-nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  color: #cbd5e1;
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
  font-weight: 500;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.side-nav a svg { width: 18px; height: 18px; flex-shrink: 0; }
.side-nav a:hover { background: rgba(255,255,255,.07); color: #fff; transform: translateX(2px); }
.side-nav a.active {
  background: linear-gradient(135deg, rgba(99,102,241,.3), rgba(34,211,238,.1));
  color: #fff;
  box-shadow: inset 3px 0 0 #818cf8;
}
.sidebar-logout {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar-logout-btn {
  --logout-primary: #818cf8;
  --logout-light: #f4f7ff;
  --transform-figure: none;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 52px;
  padding: 0 10px 0 16px;
  border-radius: 14px;
  color: var(--logout-light);
  background: #0e1320;
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: background 250ms ease, border-color 250ms ease, box-shadow 250ms ease;
}
.sidebar-logout-btn > span:first-child {
  color: var(--logout-light);
  font-size: 14px;
  letter-spacing: 0.2px;
  user-select: none;
}
.sidebar-logout-icon {
  position: relative;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  perspective: 140px;
}
.sidebar-logout-btn .doorway {
  position: absolute;
  top: 4px;
  right: 2px;
  width: 20px;
  height: 28px;
  background: #07090e;
  border-radius: 3px;
  border: 1.5px solid rgba(129, 140, 248, 0.35);
  z-index: 2;
}
.sidebar-logout-btn .door {
  position: absolute;
  top: 4px;
  right: 2px;
  width: 20px;
  height: 28px;
  background: var(--logout-primary);
  border-radius: 3px;
  transform-origin: 100% 50%;
  transform-style: preserve-3d;
  transition: transform 250ms cubic-bezier(0.2, 0.1, 0.8, 0.9);
  z-index: 5;
}
.sidebar-logout-btn .door::after {
  content: "";
  position: absolute;
  left: 3.5px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--logout-light);
}
.sidebar-logout-btn .figure {
  position: absolute;
  bottom: 5px;
  right: 18px;
  width: 26px;
  height: 30px;
  fill: var(--logout-primary);
  stroke: var(--logout-primary);
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: var(--transform-figure);
  transition: transform 250ms cubic-bezier(0.2, 0.1, 0.8, 0.9);
  z-index: 4;
  pointer-events: none;
}
.sidebar-logout-btn .figure svg { width: 100%; height: 100%; overflow: visible; }
.sidebar-logout-btn .arm-left { transform-origin: 10px 10px; transition: transform 250ms ease; }
.sidebar-logout-btn .arm-right { transform-origin: 14px 10px; transition: transform 250ms ease; }
.sidebar-logout-btn .leg-left { transform-origin: 10px 17px; transition: transform 250ms ease; }
.sidebar-logout-btn .leg-right { transform-origin: 14px 17px; transition: transform 250ms ease; }
.sidebar-logout-btn:hover {
  background: #121828;
  border-color: rgba(129, 140, 248, 0.4);
  color: #fff;
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.sidebar-logout-btn:hover .door { transform: rotateY(26deg); }
.sidebar-logout-btn:hover .figure { --transform-figure: translateX(11px); }
.sidebar-logout-btn:hover .arm-left { transform: rotate(-32deg); }
.sidebar-logout-btn:hover .arm-right { transform: rotate(28deg); }
.sidebar-logout-btn:hover .leg-left { transform: rotate(30deg); }
.sidebar-logout-btn:hover .leg-right { transform: rotate(-35deg); }
.sidebar-logout-btn:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
}
.sidebar-logout-btn.clicked .door { transform: rotateY(48deg); }
.sidebar-logout-btn.clicked .figure {
  animation: logoutFall 1.3s cubic-bezier(0.4, 0, 0.8, 1) forwards;
}
@keyframes logoutFall {
  0% { transform: translateX(11px) scale(1) rotate(0deg); opacity: 1; }
  22% { transform: translateX(16px) translateY(0) scale(0.92) rotate(8deg); opacity: 1; }
  40% { transform: translateX(18px) translateY(12px) scale(0.75) rotate(24deg); opacity: 0.95; }
  100% { transform: translateX(20px) translateY(80px) scale(0.25) rotate(70deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar-logout-btn .door,
  .sidebar-logout-btn .figure,
  .sidebar-logout-btn .arm-left,
  .sidebar-logout-btn .arm-right,
  .sidebar-logout-btn .leg-left,
  .sidebar-logout-btn .leg-right { transition: none; }
  .sidebar-logout-btn:hover .door,
  .sidebar-logout-btn:hover .figure,
  .sidebar-logout-btn:hover .arm-left,
  .sidebar-logout-btn:hover .arm-right,
  .sidebar-logout-btn:hover .leg-left,
  .sidebar-logout-btn:hover .leg-right { transform: none; }
  .sidebar-logout-btn.clicked .figure { animation: none; }
}
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  z-index: 45;
}
.admin-main {
  flex: 1 1 0%;
  min-width: 0;
  width: calc(100% - var(--admin-sidebar));
  max-width: calc(100% - var(--admin-sidebar));
}
.topbar {
  position: relative;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px var(--admin-pad-x);
}
.topbar-title {
  margin: 0;
  font-family: var(--display);
  letter-spacing: -.03em;
  font-size: 18px;
  color: #0f2744;
}
.admin-shell[data-nav="dashboard"] .topbar-title,
.admin-shell[data-nav="links"] .topbar-title,
.admin-shell[data-nav="subdomains"] .topbar-title,
.admin-shell[data-nav="analytics"] .topbar-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.admin-shell[data-nav="dashboard"] .topbar,
.admin-shell[data-nav="links"] .topbar,
.admin-shell[data-nav="subdomains"] .topbar,
.admin-shell[data-nav="analytics"] .topbar,
.admin-shell[data-nav="settings"] .topbar,
.admin-shell[data-nav="profile"] .topbar {
  padding-top: 10px;
  padding-bottom: 4px;
}
.admin-chip {
  position: relative;
  margin-left: auto;
  flex-shrink: 0;
  z-index: 21;
}
.admin-chip-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line-dark);
  background: #fff;
  border-radius: 16px;
  padding: 6px 10px 6px 6px;
  cursor: pointer;
  color: #0f2744;
  box-shadow: 0 8px 24px rgba(15, 39, 68, 0.04);
}
.admin-chip-btn:hover { border-color: #c7d2fe; }
.admin-chip-btn:focus-visible { outline: 2px solid #818cf8; outline-offset: 2px; }
.admin-avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #6366f1, #22d3ee);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.admin-chip-meta { text-align: left; line-height: 1.2; }
.admin-chip-meta strong { display: block; font-size: 13px; }
.admin-chip-meta em {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-style: normal;
  font-size: 11px;
  color: #059669;
  font-weight: 600;
}
.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, .45);
  animation: onlinePulse 1.8s ease-out infinite;
}
.admin-chip-btn svg { width: 16px; height: 16px; color: #64748b; }
.admin-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--line-dark);
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .12);
  z-index: 30;
}
.admin-menu[hidden] { display: none !important; }
.admin-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 600;
  color: #0f2744;
}
.admin-menu a:hover { background: #f8fafc; }
.admin-menu p {
  margin: 4px 12px 8px;
  font-size: 12px;
  color: #64748b;
  word-break: break-all;
}
@keyframes onlinePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .4); }
  70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}
.menu-toggle { display: none; }
.admin-content {
  width: 100%;
  max-width: none;
  min-width: 0;
  padding: 0 var(--admin-pad-x) 40px;
}
.admin-content > .dash-page,
.admin-content > .an-page,
.admin-content > .subs-page,
.admin-content > .links-manage,
.admin-content > .set-page,
.admin-content > .prof-page,
.admin-content > form.set-page,
.admin-content > form.prof-page {
  width: 100%;
  max-width: none;
  min-width: 0;
}
.cards-6, .cards-4 { display: grid; gap: 14px; margin-bottom: 18px; }
.cards-6 { grid-template-columns: repeat(6, 1fr); }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
.kpi {
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  border: 1px solid var(--line-dark);
}
.kpi span { color: var(--muted-dark); font-size: 12px; }
.kpi b { display: block; font-size: 28px; letter-spacing: -0.04em; margin-top: 4px; }
.table-wrap { overflow: auto; background: #fff; border-radius: 18px; border: 1px solid var(--line-dark); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid #eef2f7; font-size: 14px; }
th { color: var(--muted-dark); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.badge { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-ok { background: #d1fae5; color: #065f46; }
.badge-off { background: #fee2e2; color: #991b1b; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--muted-dark);
}
.chart-card { background: #fff; border-radius: 18px; padding: 18px; border: 1px solid var(--line-dark); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filters .input, .filters select { width: auto; min-width: 160px; }
.pager { display: flex; gap: 8px; justify-content: flex-end; padding: 12px; }

.links-page { display: grid; gap: 16px; }
.links-toolbar {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line-dark);
  border-radius: 20px;
  padding: 12px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
  margin-bottom: 0;
}
.links-search {
  position: relative;
  flex: 1;
  min-width: min(280px, 100%);
}
.links-toolbar-form {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
}
.links-search i, .links-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #94a3b8;
  pointer-events: none;
}
.links-search .input { width: 100%; min-width: 0; padding-left: 40px; }
.links-bulk-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}
.links-select-ctl {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 2px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}
.links-select-ctl em {
  font-style: normal;
  color: #4f46e5;
  font-weight: 700;
}
.links-select-ctl em[hidden] { display: none; }
.links-bulk-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}
.links-bulk-bar[hidden] { display: none !important; }
.links-bulk-bar form { margin: 0; }
.links-bulk-clear {
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
}
.links-bulk-clear:hover { background: #f1f5f9; color: #0f172a; }
.links-bulk-delete {
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
}
.links-check-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  cursor: pointer;
}
.links-check {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #4f46e5;
  cursor: pointer;
}
.links-table .check-cell {
  width: 40px;
  padding-left: 14px;
  padding-right: 8px;
  text-align: center;
  vertical-align: middle;
}
.links-table tbody tr.is-selected { background: #f8fafc; }
.dash-link-card.is-selected { background: #f8fafc; border-color: #e2e8f0; }
.dash-link-card-top .links-check-wrap { flex-shrink: 0; }
@media (max-width: 800px) {
  .links-bulk-tools { margin-left: 0; width: 100%; }
}
.links-table { box-shadow: 0 18px 50px rgba(15, 23, 42, 0.06); }
.links-table table { min-width: 1120px; width: 100%; }
.links-table thead th {
  background: #f8fafc;
  position: sticky;
  top: 0;
  z-index: 1;
  font-weight: 700;
}
.links-table tbody tr { transition: background .15s ease; }
.links-table tbody tr:hover { background: #f8fafc; }
.links-table td, .links-table th { padding: 16px 14px; vertical-align: middle; }
.short-cell {
  display: grid;
  justify-items: start;
  gap: 3px;
}
.short-code {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 4px 8px 4px 6px;
  border-radius: 7px;
  background: #f4f6fb;
  border: 1px solid #e6ebf3;
  color: #1e293b;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: none;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.short-code-mark {
  width: 14px;
  height: 14px;
  border-radius: 0;
  display: grid;
  place-items: center;
  background: none;
  color: #94a3b8;
  flex-shrink: 0;
  transition: color .18s ease;
}
.short-code-mark svg { width: 13px; height: 13px; }
.short-code-text { min-width: 0; }
.short-code:hover {
  text-decoration: none;
  transform: translateY(-1px);
  background: #eef1f7;
  border-color: #d5dce8;
  color: #0f172a;
  box-shadow: none;
}
.short-code:hover .short-code-mark { color: #4f46e5; }
.short-code:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
}
.short-host {
  font-size: 11px;
  font-weight: 500;
  color: #94a3b8;
  letter-spacing: .01em;
  line-height: 1.3;
  padding-left: 27px;
}
.orig-cell { color: #475569; max-width: none; word-break: break-word; }
.num-cell {
  text-align: center;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.links-table th.num-cell,
.links-table td.num-cell {
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}
.dash-created time,
time.dash-created {
  display: grid;
  gap: 2px;
  color: #0f2744;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.dash-created time span {
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
}
time.dash-created {
  display: inline;
  font-weight: 600;
  color: #64748b;
}
.action-bar { display: inline-flex; align-items: center; gap: 6px; }
.action-bar form { display: inline-flex; margin: 0; }
.icon-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid #e8edf3;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.icon-btn:hover {
  background: #f8fafc;
  border-color: #d7dee8;
  color: #0f172a;
  transform: translateY(-1px);
}
.icon-btn:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
}
.icon-btn.danger { color: #64748b; }
.icon-btn.danger:hover {
  background: #fff7f7;
  border-color: #f0d4d6;
  color: #be123c;
}
.icon-btn svg { width: 15px; height: 15px; }
.icon-btn.is-copied {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
}
.empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #eef2ff, #ecfeff);
  color: var(--brand);
}
.empty-icon svg { width: 24px; height: 24px; }

.widget-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.widget-head h3 { margin: 0; font-family: var(--display); letter-spacing: -0.03em; }
.dash-grid .chart-card { min-width: 0; }
.dash-embed { border: 0; box-shadow: none; }
.dash-embed table { min-width: 640px; }
.device-split { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.device-pill {
  background: #f8fafc;
  border: 1px solid var(--line-dark);
  border-radius: 16px;
  padding: 12px;
}
.device-pill span, .device-pill em { display: block; color: var(--muted-dark); font-size: 12px; font-style: normal; }
.device-pill b { display: block; font-size: 22px; letter-spacing: -0.04em; margin: 4px 0; }
.meter {
  height: 6px;
  border-radius: 99px;
  background: #e8edf6;
  overflow: hidden;
  margin-top: 8px;
}
.meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.country-list { display: grid; gap: 10px; margin-bottom: 12px; }
.country-row > div:first-child { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.country-row strong { color: var(--text-dark); }
.country-row span { color: var(--muted-dark); }
.dash-links { margin-top: 22px; }
.links-manage { width: 100%; max-width: none; min-width: 0; }
.links-manage .dash-links { margin-top: 0; }
.dash-links > .widget-head { margin-bottom: 12px; }
.dash-links > .widget-head p { margin: 0; }

.link-form {
  max-width: 640px;
  background: #fff;
  border: 1px solid var(--line-dark);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.05);
}
.link-form .form-grid { gap: 18px; }
.link-form .input { border-radius: 12px; padding: 13px 14px; }
.link-urlbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid var(--line-dark);
}
.link-urlbar span { display: block; font-size: 11px; color: var(--muted-dark); text-transform: uppercase; letter-spacing: .06em; }
.link-urlbar code { color: #4f46e5; font-weight: 700; word-break: break-all; }
.link-inline-url {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted-dark);
  word-break: break-all;
}
.link-inline-url strong { color: #4f46e5; }
.link-quiet {
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--line-dark);
  color: #475569;
  font-size: 14px;
}
.link-quiet a { color: #4f46e5; font-weight: 600; margin-left: 6px; }
.link-form-actions { display: flex; gap: 10px; margin-top: 22px; }
.link-form-actions .btn-primary { min-width: 180px; }

.g-workspace { max-width: 820px; margin: 8px auto 0; }
.g-workspace-dash {
  max-width: none !important;
  width: 100%;
  margin: 0 0 var(--admin-gap);
}
.g-workspace-dash .dash-create,
.g-workspace-dash .g-composer,
.g-workspace-dash .g-bar,
.g-workspace-dash .g-sub,
.g-workspace-dash .g-advanced,
.g-workspace-dash .g-result {
  width: 100%;
  max-width: none;
}
.g-workspace-dash .g-hero h1 { font-size: clamp(28px, 4vw, 40px); }
.g-hero { text-align: center; margin-bottom: 28px; }
.g-hero p {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: .14em;
  font-weight: 700;
  color: #64748b;
}
.g-hero h1 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: clamp(32px, 5vw, 48px);
  letter-spacing: -0.05em;
  color: #0f2744;
}
.g-hero span { color: #64748b; }
.g-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: 18px;
  padding: 10px 10px 10px 18px;
  box-shadow: 0 16px 40px rgba(15, 39, 68, 0.08);
  border: 1px solid #e8eef5;
}
.g-input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 16px;
  color: #0f2744;
  min-width: 0;
  padding: 12px 0;
}
.g-input::placeholder { color: #94a3b8; }
.g-cut {
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}
.g-cut:hover { filter: brightness(1.06); }
.g-cut svg { width: 22px; height: 22px; }
.g-advanced-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 14px 4px 0;
  color: #64748b;
  font-size: 14px;
  cursor: pointer;
}
.g-advanced-toggle input { accent-color: #2563eb; }
.g-advanced {
  display: none;
  margin-top: 14px;
  background: #fff;
  border: 1px solid #e8eef5;
  border-radius: 16px;
  padding: 16px;
  gap: 14px;
}
.g-advanced.is-open {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(148px, 0.72fr);
  align-items: start;
}
.g-result {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 1px solid #e8eef5;
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 10px 30px rgba(15, 39, 68, 0.05);
}
.g-check {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #dcfce7;
  color: #166534;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.g-result-copy { min-width: 0; flex: 1; }
.g-result-copy p {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 700;
  color: #16a34a;
}
.g-result-copy strong { display: block; color: #0f2744; word-break: break-all; }
.g-result-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.g-copy, .g-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  box-sizing: border-box;
  height: 40px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}
.g-copy {
  min-width: 118px;
  border: 1px solid rgba(255, 255, 255, .14);
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 44%),
    linear-gradient(180deg, #0f9f8c, #0b7d72);
  box-shadow: 0 1px 2px rgba(15, 39, 68, .08), 0 6px 14px rgba(13, 148, 136, .2);
  transition: transform .16s ease, filter .16s ease, box-shadow .16s ease, background .2s ease;
}
.g-copy-icons {
  position: relative;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.g-copy-ic {
  position: absolute;
  inset: 0;
  width: 14px;
  height: 14px;
  display: block;
  transition: opacity .18s ease, transform .18s ease;
}
.g-copy-ic svg { width: 14px; height: 14px; display: block; }
.g-copy-ic-idle { opacity: 1; transform: scale(1); }
.g-copy-ic-done { opacity: 0; transform: scale(.7); }
.g-copy.is-copied .g-copy-ic-idle { opacity: 0; transform: scale(.7); }
.g-copy.is-copied .g-copy-ic-done { opacity: 1; transform: scale(1); }
@media (hover: hover) {
  .g-copy:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(15, 39, 68, .08), 0 10px 18px rgba(13, 148, 136, .24);
  }
}
.g-copy:active {
  transform: translateY(0);
  filter: brightness(.97);
  box-shadow: 0 1px 2px rgba(15, 39, 68, .1);
}
.g-copy.is-copied {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0) 44%),
    linear-gradient(180deg, #0d9488, #0b746c);
}
.g-open {
  border: 1px solid #99f6e4;
  color: #0f766e;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 39, 68, .04);
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}
@media (hover: hover) {
  .g-open:hover {
    background: #f0fdfa;
    border-color: #5eead4;
    color: #0f766e;
  }
}
.g-label {
  display: block;
  margin: 16px 2px 8px;
  font-size: 13px;
  font-weight: 700;
  color: #0f2744;
}
.g-label em { font-style: normal; color: #64748b; font-weight: 600; }
.g-label:first-of-type { margin-top: 0; }
.g-route {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}
.g-route-item {
  padding: 12px 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e8eef5;
}
.g-route-item strong { display: block; font-size: 13px; color: #0f2744; margin-bottom: 4px; }
.g-route-item span { font-size: 13px; color: #64748b; }
.g-route-item.yt { background: #fff7ed; border-color: #fed7aa; }
.g-bar-yt { box-shadow: none; }
.g-hint { margin: 8px 4px 0; font-size: 13px; color: #64748b; }
.g-hint a { color: #2563eb; font-weight: 600; }
.g-sub { margin-top: 16px; }
.g-empty-sub {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  color: #1e40af;
  font-size: 14px;
}
.g-empty-sub a { font-weight: 700; color: #1d4ed8; }
.g-empty-sub code { font-size: 13px; }
.sub-create-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.sub-create-bar .input { flex: 1; min-width: 180px; max-width: 280px; }
.sub-suffix {
  font-weight: 700;
  color: #0f2744;
}
@media (max-width: 700px) {
  .g-route { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .g-result { flex-wrap: wrap; }
  .g-result-actions { width: 100%; }
  .g-copy, .g-open { flex: 1; text-align: center; }
}

.settings-page { width: 100%; max-width: none; }
.settings-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
  align-items: stretch;
}
.panel-hero { margin-bottom: 22px; }
.panel-hero p {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: .12em;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
}
.panel-hero h1 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 36px);
  letter-spacing: -0.04em;
  color: #0f2744;
}
.panel-hero span { color: #64748b; }
.panel-card {
  background: #fff;
  border: 1px solid var(--line-dark);
  border-radius: 20px;
  padding: 22px;
  margin-bottom: 16px;
  box-shadow: 0 12px 36px rgba(15, 39, 68, 0.04);
}
.panel-head { margin-bottom: 16px; }
.panel-head h2 { margin: 0 0 4px; font-size: 18px; font-family: var(--display); letter-spacing: -0.03em; }
.panel-head p { margin: 0; color: var(--muted-dark); font-size: 14px; }
.panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.panel-grid .span-2 { grid-column: 1 / -1; }
.upload-row { display: flex; align-items: center; gap: 10px; }
.upload-preview {
  width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0;
  background: #f8fafc; border: 1px solid var(--line-dark);
  display: grid; place-items: center; overflow: hidden; color: #94a3b8;
}
.upload-preview.sm { width: 40px; height: 40px; border-radius: 12px; }
.upload-preview img { width: 100%; height: 100%; object-fit: cover; }
.upload-preview svg { width: 18px; height: 18px; }
.pref-list { display: grid; gap: 4px; }
.pref-toggle {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 4px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
}
.pref-toggle:last-child { border-bottom: 0; }
.pref-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.pref-switch {
  width: 44px; height: 26px; border-radius: 999px; background: #e2e8f0; position: relative; transition: .2s ease;
}
.pref-switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(15,23,42,.15); transition: .2s ease;
}
.pref-toggle input:checked + .pref-switch { background: #4f46e5; }
.pref-toggle input:checked + .pref-switch::after { transform: translateX(18px); }
.pref-toggle strong { display: block; font-size: 14px; }
.pref-toggle em { display: block; font-style: normal; color: var(--muted-dark); font-size: 13px; }
.panel-save { display: flex; justify-content: flex-end; padding: 4px 0 24px; }
.profile-top {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border: 1px solid var(--line-dark); border-radius: 20px;
  padding: 16px 18px; margin-bottom: 16px;
}
.profile-avatar {
  width: 56px; height: 56px; border-radius: 18px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #6366f1, #22d3ee);
  color: #fff; font-weight: 700; font-size: 18px;
}
.profile-top strong { display: block; font-size: 16px; }
.profile-top p { margin: 2px 0 0; }
.snapshot-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.snapshot-logo {
  width: 52px; height: 52px; border-radius: 16px;
  background: linear-gradient(135deg, #6366f1, #22d3ee);
  color: #fff; display: grid; place-items: center; overflow: hidden; font-weight: 700;
}
.snapshot-logo img { width: 100%; height: 100%; object-fit: cover; }
.snapshot-brand strong { display: block; }
.snapshot-brand a { color: #4f46e5; font-size: 13px; word-break: break-all; }
.snapshot-list { margin: 0; display: grid; gap: 10px; }
.snapshot-list div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid #f1f5f9; font-size: 14px; }
.snapshot-list dt { color: var(--muted-dark); }
.snapshot-list dd { margin: 0; font-weight: 600; text-align: right; }
@media (max-width: 980px) {
  .settings-layout { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .panel-grid { grid-template-columns: 1fr; }
  .panel-grid .span-2 { grid-column: auto; }
}

.admin-shell[data-nav="settings"] .topbar-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.admin-shell[data-nav="settings"] .admin-content {
  padding-bottom: 12px;
  background-image:
    radial-gradient(ellipse 70% 42% at 88% -8%, rgba(99, 102, 241, .07), transparent 58%),
    radial-gradient(ellipse 50% 36% at 0% 18%, rgba(34, 211, 238, .05), transparent 55%),
    linear-gradient(rgba(15, 39, 68, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 39, 68, .028) 1px, transparent 1px);
  background-size: auto, auto, 32px 32px, 32px 32px;
}
.set-page {
  width: 100%;
  max-width: none;
  padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  position: relative;
}
.set-page::before,
.set-page::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  filter: blur(36px);
}
.set-page::before {
  width: 180px;
  height: 180px;
  top: -56px;
  right: 8%;
  background: radial-gradient(circle, rgba(99, 102, 241, .1), transparent 72%);
}
.set-page::after {
  width: 160px;
  height: 160px;
  top: 42%;
  left: -40px;
  background: radial-gradient(circle, rgba(34, 211, 238, .08), transparent 72%);
}
.set-page > *:not(.set-savebar) { position: relative; z-index: 1; }
.set-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 0 0 18px;
  padding: 4px 0 0;
  animation: setIn .42s ease both;
}
.set-hero::before {
  content: "";
  position: absolute;
  top: -28px;
  right: 10%;
  width: 260px;
  height: 88px;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, .14), rgba(34, 211, 238, .07) 46%, transparent 72%);
  filter: blur(6px);
}
.set-hero-copy,
.set-hero-status {
  position: relative;
  z-index: 1;
  min-width: 0;
}
.set-hero-status { flex-shrink: 0; }
.set-hero p {
  margin: 0 0 2px;
  font-size: 11px;
  letter-spacing: .12em;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  line-height: 1.2;
}
.set-hero h1 {
  margin: 0 0 2px;
  font-family: var(--display);
  font-size: clamp(22px, 2.2vw, 28px);
  letter-spacing: -0.04em;
  line-height: 1.15;
  color: #0f2744;
}
.set-hero-copy > span {
  display: block;
  max-width: 58ch;
  color: #64748b;
  font-size: 13px;
  line-height: 1.4;
}
.set-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #ecfdf5;
  color: #047857;
  transition: background .2s ease, color .2s ease;
}
.set-status svg { width: 14px; height: 14px; }
.set-status em { font-style: normal; }
.set-status.is-saving svg { animation: setSpin .7s linear infinite; }
.set-status.is-dirty { background: #fff7ed; color: #c2410c; }
.set-status.is-error { background: #fff1f2; color: #be123c; }
.set-status.is-saving { background: #eef2ff; color: #4338ca; }
.set-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .9fr);
  gap: 14px;
  align-items: start;
  width: 100%;
}
.set-main, .set-side {
  min-width: 0;
  display: grid;
  gap: 12px;
  align-content: start;
}
.set-card {
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line-dark);
  border-radius: 16px;
  padding: 18px 20px;
  margin: 0;
  box-shadow: 0 10px 28px rgba(15, 39, 68, 0.04);
  animation: setIn .45s ease both;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.set-main .set-card:nth-child(1) { animation-delay: 0ms; }
.set-main .set-card:nth-child(2) { animation-delay: 60ms; }
.set-side .set-card:nth-child(1) { animation-delay: 80ms; }
.set-side .set-card:nth-child(2) { animation-delay: 140ms; }
@media (hover: hover) {
  .set-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(15, 39, 68, 0.07);
    border-color: #c7d2fe;
  }
}
.set-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.set-card-head > div { min-width: 0; }
.set-head-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, #eef2ff, #ecfeff);
  color: #4f46e5;
}
.set-head-icon.live { color: #0891b2; }
.set-head-icon svg { width: 16px; height: 16px; }
.set-card-head h2 {
  margin: 0 0 2px;
  font-size: 16px;
  font-family: var(--display);
  letter-spacing: -0.03em;
  color: #0f2744;
}
.set-card-head p { margin: 0; color: #64748b; font-size: 13px; line-height: 1.4; }
.set-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 14px; width: 100%; }
.set-page .help { margin-top: 4px; }
.set-grid .span-2 { grid-column: 1 / -1; }
.set-label, .set-grid > div > label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #0f2744;
  margin-bottom: 6px;
}
.set-label svg, .set-grid > div > label svg { width: 14px; height: 14px; color: #64748b; }
.set-field {
  position: relative;
}
.set-field > svg,
.set-field > i[data-lucide] {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #94a3b8;
  pointer-events: none;
  transition: color .2s ease;
}
.set-field-area > svg,
.set-field-area > i[data-lucide] { top: 16px; transform: none; }
.set-field .input { padding-left: 38px; min-height: 46px; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.set-field:focus-within > svg,
.set-field:focus-within > i[data-lucide] { color: #6366f1; }
.set-tz {
  width: 100%;
  min-width: 0;
}
.set-tz select.input {
  width: 100%;
  min-width: 0;
  height: auto;
  min-height: 46px;
  padding: 12px 36px 12px 38px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  appearance: none;
  -webkit-appearance: none;
}
.set-page .set-tz select.input:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, .12);
  background-color: #fff;
}
.set-page .input:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, .12);
  background: #fff;
}
.set-page .input:disabled {
  background: #f8fafc;
  color: #475569;
  cursor: not-allowed;
}
.set-page .input.is-invalid {
  border-color: #e11d48;
  box-shadow: 0 0 0 4px rgba(225, 29, 72, .12);
}
.set-preview, .set-route-preview {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fafc, #fff);
  border: 1px solid #e8eef5;
}
.set-preview > p, .set-route-preview > p {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
}
.set-preview > p svg, .set-route-preview > p svg { width: 14px; height: 14px; }
.set-preview-row { display: flex; align-items: center; gap: 12px; }
.set-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #6366f1, #22d3ee);
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
}
.set-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: setPop .28s ease;
}
.set-preview-row strong, .set-live-brand strong {
  display: block;
  color: #0f2744;
  transition: opacity .2s ease;
}
.set-preview-row span, .set-live-brand a {
  color: #4f46e5;
  font-size: 13px;
  word-break: break-all;
  transition: opacity .2s ease;
}
.set-page .is-updating { opacity: .45; }
.set-route-row {
  display: grid;
  grid-template-columns: minmax(140px, .9fr) 24px 1fr;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  padding: 6px 0;
}
.set-route-device {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #0f2744;
}
.set-route-device svg { width: 16px; height: 16px; color: #6366f1; }
.set-route-arrow { width: 16px; height: 16px; color: #94a3b8; transition: transform .25s ease, color .25s ease; }
.set-card:hover .set-route-arrow { transform: translateX(3px); color: #6366f1; }
.set-route-preview span { color: #64748b; min-width: 0; }
.set-route-preview em { font-style: normal; font-weight: 600; color: #0f2744; }
.set-threshold-panel {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid #e8eef8;
  border-radius: 14px;
  background: #fbfcfe;
}
.set-threshold-panel[hidden] { display: none !important; }
.set-threshold-panel label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}
.set-threshold-panel label svg { width: 14px; height: 14px; color: #6366f1; }
.set-route-row[hidden] { display: none !important; }
.set-howto {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 16px;
}
.set-howto article {
  border: 1px solid #e8eef5;
  background: #f8fafc;
  border-radius: 14px;
  padding: 12px 14px;
}
.set-howto strong {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  font-size: 13px;
  color: #0f2744;
}
.set-howto strong svg { width: 16px; height: 16px; color: #6366f1; }
.set-howto p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
}
.set-upload {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px dashed #dbe3f0;
  border-radius: 14px;
  background: #fbfcfe;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.set-upload:hover {
  border-color: #818cf8;
  background: #f8fafc;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, .08);
}
.set-upload:hover .set-upload-preview svg { transform: translateY(-2px); color: #6366f1; }
.set-upload-preview {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid #e8eef5;
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #94a3b8;
  flex-shrink: 0;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.set-upload-preview svg { width: 18px; height: 18px; transition: transform .2s ease, color .2s ease; }
.set-upload-preview.is-loading svg { animation: setSpin .7s linear infinite; }
.set-upload-preview.is-ok {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, .16);
}
.set-upload-ok {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #059669;
  color: #fff;
  display: grid;
  place-items: center;
  animation: setPop .28s ease;
}
.set-upload-ok svg { width: 10px; height: 10px; }
.set-upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: setPop .28s ease;
}
.set-file {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.set-filename {
  margin: 6px 0 0;
  font-size: 12px;
  color: #4f46e5;
  font-weight: 600;
  animation: setIn .25s ease;
}
.set-filename[hidden] { display: none !important; }
.set-toggles { display: grid; gap: 6px; }
.set-toggle {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr 46px;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid #eef2f7;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.set-toggle:hover { background: #f8fafc; }
.set-grid .set-toggle { align-items: start; }
.set-toggle:focus-within { box-shadow: 0 0 0 3px rgba(99, 102, 241, .12); }
.set-toggle-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #eef2ff, #ecfeff);
  color: #4f46e5;
}
.set-toggle-icon.cyan { color: #0891b2; }
.set-toggle-icon.green { color: #059669; }
.set-toggle-icon.warn { color: #c2410c; background: #fff7ed; }
.set-toggle-icon svg { width: 16px; height: 16px; }
.set-toggle strong { display: block; font-size: 13px; color: #0f2744; line-height: 1.3; }
.set-toggle em { display: block; font-style: normal; color: #64748b; font-size: 12px; line-height: 1.35; margin-top: 1px; overflow-wrap: anywhere; }
.set-toggle > span:nth-of-type(2) { min-width: 0; }
.set-switch-wrap {
  position: relative;
  width: 46px;
  height: 26px;
  justify-self: end;
  align-self: center;
  flex-shrink: 0;
  cursor: pointer;
}
.set-grid .set-switch-wrap {
  align-self: center;
  margin-top: 0;
}
.set-toggle input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}
.set-switch {
  display: block;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: #64748b;
  border: 1.5px solid #475569;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(15, 23, 42, .28);
  transition: background .22s ease, border-color .22s ease, box-shadow .22s ease, transform .18s ease;
}
.set-switch::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 50%;
  width: 5px;
  height: 8px;
  border: 1.5px solid transparent;
  border-top: 0;
  border-left: 0;
  transform: translateY(-58%) rotate(45deg);
  opacity: 0;
  transition: opacity .22s ease;
}
.set-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .12), 0 3px 8px rgba(15, 23, 42, .22);
  transition: transform .22s ease, box-shadow .22s ease;
}
.set-toggle input:checked + .set-switch {
  background: #4f46e5;
  border-color: #4338ca;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 4px 12px rgba(79, 70, 229, .28);
}
.set-toggle input:checked + .set-switch::before {
  border-color: rgba(255, 255, 255, .92);
  opacity: 1;
}
.set-toggle input:checked + .set-switch::after {
  transform: translateX(20px);
  box-shadow: 0 1px 2px rgba(49, 46, 129, .18), 0 3px 8px rgba(49, 46, 129, .28);
}
.set-switch-wrap:active .set-switch { transform: scale(.96); }
.set-toggle input:focus-visible + .set-switch {
  outline: 2px solid #818cf8;
  outline-offset: 3px;
}
.set-advanced {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
}
.set-advanced h3 {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #92400e;
  display: flex;
  align-items: center;
  gap: 6px;
}
.set-advanced h3 svg { width: 13px; height: 13px; }
.set-advanced > p { margin: 0 0 8px; font-size: 12px; line-height: 1.4; color: #a16207; }
.set-toggle.is-warn { background: #fff; border-color: #fde68a; }
.set-live-brand { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.set-live-list { margin: 0; display: grid; }
.set-live-list div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid #f1f5f9;
  font-size: 13px;
}
.set-live-list div:first-child {
  border-top: 0;
  padding-top: 2px;
}
.set-live-list dt {
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.set-live-list dt svg { width: 14px; height: 14px; }
.set-live-list dd { margin: 0; font-weight: 600; text-align: right; color: #0f2744; word-break: break-all; transition: opacity .2s ease; }
.set-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  transition: background .2s ease, color .2s ease;
}
.set-pill svg { width: 12px; height: 12px; }
.set-pill.is-on { background: #ecfdf5; color: #047857; }
.set-pill.is-on svg { animation: setPulse 2.4s ease-out infinite; }
.set-pill.is-off { background: #f1f5f9; color: #475569; }
.set-savebar {
  position: fixed;
  left: calc(var(--admin-sidebar) + var(--admin-pad-x));
  right: var(--admin-pad-x);
  bottom: max(10px, env(safe-area-inset-bottom, 0px));
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line-dark);
  border-top: 1px solid #dbe3f0;
  border-radius: 16px;
  padding: 8px 14px;
  box-shadow: 0 -8px 28px rgba(15, 39, 68, 0.08), 0 10px 24px rgba(15, 39, 68, 0.05);
}
.set-save-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
}
.set-save-icon svg { width: 18px; height: 18px; }
.set-save-btn {
  min-width: 148px;
  padding: 8px 16px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(99, 102, 241, .28);
  position: relative;
  overflow: hidden;
  background-image: linear-gradient(135deg, var(--brand), #8b5cf6 40%, var(--brand-2), var(--brand));
  background-size: 180% 100%;
  transition: transform .2s ease, filter .2s ease, box-shadow .2s ease, background-position .45s ease, opacity .2s ease;
}
.set-save-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 12px 28px rgba(99, 102, 241, .35);
  background-position: 100% 0;
}
.set-save-btn.is-loading, .set-save-btn.is-success { pointer-events: none; transform: none; }
.set-save-btn.is-loading [data-save-icon] { animation: setSpin .7s linear infinite; }
.set-save-btn.is-error { background-image: linear-gradient(135deg, #e11d48, #f43f5e); }
.set-save-btn.is-success,
.set-save-btn.is-success[disabled],
.set-save-btn.is-loading[disabled] {
  opacity: 1;
  background-image: linear-gradient(135deg, #059669, #10b981);
}
.set-save-btn.is-loading[disabled] {
  background-image: linear-gradient(135deg, var(--brand), #8b5cf6 40%, var(--brand-2), var(--brand));
}
.set-page [data-tip] { position: relative; }
.set-page [data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(4px);
  background: #0f172a;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  padding: 5px 8px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
  transition-delay: 0s;
  z-index: 4;
}
.set-page [data-tip]:hover::after,
.set-page [data-tip]:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%);
  transition-delay: .12s;
}
@keyframes setIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes setSpin { to { transform: rotate(360deg); } }
@keyframes setPop {
  from { opacity: 0; transform: scale(.92); }
  to { opacity: 1; transform: none; }
}
@keyframes setPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}
@media (max-width: 980px) {
  .set-layout { grid-template-columns: 1fr; }
  .prof-layout { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .set-hero { flex-direction: column; align-items: stretch; gap: 10px; margin-bottom: 16px; }
  .set-hero-status { align-self: flex-start; }
  .set-grid { grid-template-columns: 1fr; }
  .set-grid .span-2 { grid-column: auto; }
  .set-page { padding-bottom: calc(128px + env(safe-area-inset-bottom, 0px)); }
  .set-savebar { flex-direction: column; align-items: stretch; padding: 10px 12px; }
  .set-save-btn { width: 100%; min-width: 0; }
  .set-route-row { grid-template-columns: 1fr; gap: 4px; }
  .set-howto { grid-template-columns: 1fr; }
  .set-card:hover { transform: none; }
  .set-card:hover .set-route-arrow { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .set-hero, .set-hero::before, .set-card, .set-mark img, .set-upload-preview img, .set-filename, .set-pill.is-on svg, .set-save-btn.is-loading [data-save-icon] { animation: none; }
  .set-card:hover, .set-save-btn:hover, .set-card:hover .set-route-arrow { transform: none; }
  .set-switch, .set-switch::before, .set-switch::after, .set-field > svg, .set-page [data-tip]::after { transition: none; }
  .set-switch-wrap:active .set-switch { transform: none; }
}

.admin-shell[data-nav="profile"] .topbar-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.admin-shell[data-nav="profile"] .admin-content {
  padding-bottom: 12px;
  background-image:
    radial-gradient(ellipse 70% 40% at 90% -6%, rgba(99, 102, 241, .07), transparent 58%),
    radial-gradient(ellipse 46% 32% at 0% 16%, rgba(34, 211, 238, .05), transparent 55%),
    linear-gradient(rgba(15, 39, 68, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 39, 68, .028) 1px, transparent 1px);
  background-size: auto, auto, 32px 32px, 32px 32px;
}
.prof-page {
  width: 100%;
  max-width: none;
  padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
}
.prof-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 0 0 18px;
  padding: 4px 0 0;
  animation: profIn .42s ease both;
}
.prof-hero::before {
  content: "";
  position: absolute;
  top: -28px;
  right: 10%;
  width: 260px;
  height: 88px;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, .14), rgba(34, 211, 238, .07) 46%, transparent 72%);
  filter: blur(6px);
}
.prof-hero-copy,
.prof-hero-status {
  position: relative;
  z-index: 1;
  min-width: 0;
}
.prof-hero-status { flex-shrink: 0; }
.prof-hero p {
  margin: 0 0 2px;
  font-size: 11px;
  letter-spacing: .12em;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  line-height: 1.2;
}
.prof-hero h1 {
  margin: 0 0 2px;
  font-family: var(--display);
  font-size: clamp(22px, 2.2vw, 28px);
  letter-spacing: -0.04em;
  line-height: 1.15;
  color: #0f2744;
}
.prof-hero-copy > span {
  display: block;
  max-width: 58ch;
  color: #64748b;
  font-size: 13px;
  line-height: 1.4;
}
.prof-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #ecfdf5;
  color: #047857;
  transition: background .2s ease, color .2s ease;
}
.prof-status svg { width: 14px; height: 14px; }
.prof-status em { font-style: normal; }
.prof-status.is-dirty { background: #fff7ed; color: #c2410c; }
.prof-status.is-error { background: #fff1f2; color: #be123c; }
.prof-status.is-saving { background: #eef2ff; color: #4338ca; }
.prof-status.is-saving svg { animation: profSpin .7s linear infinite; }
.prof-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  width: 100%;
}
.prof-card {
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line-dark);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 10px 28px rgba(15, 39, 68, 0.04);
  animation: profIn .45s ease both;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.prof-identity {
  width: 100%;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  animation-delay: 0ms;
}
.prof-layout .prof-card:nth-child(1) { animation-delay: 70ms; }
.prof-layout .prof-card:nth-child(2) { animation-delay: 140ms; }
@media (hover: hover) {
  .prof-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(15, 39, 68, 0.07);
    border-color: #c7d2fe;
  }
}
.prof-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #6366f1, #8b5cf6 55%, #22d3ee);
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -.04em;
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: 0 8px 20px rgba(99, 102, 241, .24);
  flex-shrink: 0;
  transition: transform .2s ease, box-shadow .2s ease;
}
@media (hover: hover) {
  .prof-avatar:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(99, 102, 241, .3); }
}
.prof-identity-copy { flex: 1; min-width: 0; }
.prof-identity-copy strong {
  display: block;
  font-size: 16px;
  font-family: var(--display);
  letter-spacing: -.03em;
  color: #0f2744;
  line-height: 1.25;
}
.prof-identity-copy a,
.prof-identity-copy span {
  display: inline-block;
  color: #4f46e5;
  font-size: 13px;
  margin-top: 2px;
  word-break: break-all;
  line-height: 1.35;
}
.prof-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #ecfdf5;
  color: #047857;
  flex-shrink: 0;
}
.prof-pill svg { width: 13px; height: 13px; }
.prof-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.prof-card-head > div { min-width: 0; }
.prof-head-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, #eef2ff, #ecfeff);
  color: #4f46e5;
}
.prof-head-icon.lock { color: #0891b2; }
.prof-head-icon svg { width: 16px; height: 16px; }
.prof-card-head h2 {
  margin: 0 0 2px;
  font-size: 16px;
  font-family: var(--display);
  letter-spacing: -0.03em;
  color: #0f2744;
}
.prof-card-head p { margin: 0; color: #64748b; font-size: 13px; line-height: 1.4; }
.prof-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 14px; width: 100%; }
.prof-grid .span-2 { grid-column: 1 / -1; }
.prof-page .help { margin-top: 4px; }
.prof-grid > div > label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #0f2744;
  margin-bottom: 6px;
}
.prof-grid > div > label svg { width: 14px; height: 14px; color: #64748b; }
.prof-field { position: relative; }
.prof-field > svg, .prof-field > i[data-lucide] {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #94a3b8;
  pointer-events: none;
  transition: color .2s ease;
}
.prof-field .input {
  padding-left: 38px;
  border-radius: 12px;
  background: #fbfcfe;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.prof-pass .input { padding-right: 44px; }
.prof-field:focus-within > svg, .prof-field:focus-within > i[data-lucide] { color: #6366f1; }
.prof-page .input:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, .12);
  background: #fff;
}
.prof-page .input.is-invalid {
  border-color: #e11d48;
  box-shadow: 0 0 0 4px rgba(225, 29, 72, .12);
}
.prof-eye {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #64748b;
  border-radius: 10px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: color .15s ease, background .15s ease;
}
.prof-eye svg { width: 16px; height: 16px; }
.prof-eye:hover, .prof-eye:focus-visible { color: #4f46e5; background: #eef2ff; }
.prof-eye:focus-visible { outline: 2px solid #818cf8; outline-offset: 1px; }
.prof-strength { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.prof-strength-bar {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
.prof-strength-bar i {
  display: block;
  height: 100%;
  width: 33%;
  border-radius: inherit;
  background: #e11d48;
  transition: width .2s ease, background .2s ease;
}
.prof-strength.is-fair .prof-strength-bar i { width: 66%; background: #d97706; }
.prof-strength.is-strong .prof-strength-bar i { width: 100%; background: #059669; }
.prof-strength em { font-style: normal; font-size: 12px; font-weight: 700; color: #e11d48; }
.prof-strength.is-fair em { color: #d97706; }
.prof-strength.is-strong em { color: #059669; }
.prof-secure-note {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e8eef5;
  color: #64748b;
}
.prof-secure-note svg { width: 16px; height: 16px; color: #4f46e5; flex-shrink: 0; margin-top: 2px; }
.prof-secure-note strong { display: block; color: #0f2744; font-size: 13px; margin-bottom: 2px; }
.prof-secure-note p { margin: 0; font-size: 12px; line-height: 1.45; }
.prof-savebar {
  position: fixed;
  left: calc(var(--admin-sidebar) + var(--admin-pad-x));
  right: var(--admin-pad-x);
  bottom: max(10px, env(safe-area-inset-bottom, 0px));
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 0;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line-dark);
  border-top: 1px solid #dbe3f0;
  border-radius: 16px;
  padding: 8px 14px;
  box-shadow: 0 -8px 28px rgba(15, 39, 68, 0.08), 0 10px 24px rgba(15, 39, 68, 0.05);
}
.prof-save-icon { display: inline-flex; width: 18px; height: 18px; }
.prof-save-icon svg { width: 18px; height: 18px; }
.prof-save-btn {
  min-width: 148px;
  padding: 8px 16px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(99, 102, 241, .28);
  background-image: linear-gradient(135deg, var(--brand), #8b5cf6 40%, var(--brand-2), var(--brand));
  background-size: 180% 100%;
  transition: transform .2s ease, filter .2s ease, box-shadow .2s ease, background-position .45s ease, opacity .2s ease;
}
.prof-save-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 12px 28px rgba(99, 102, 241, .35);
  background-position: 100% 0;
}
.prof-save-btn.is-loading, .prof-save-btn.is-success { pointer-events: none; transform: none; }
.prof-save-btn.is-loading [data-prof-save-icon] { animation: profSpin .7s linear infinite; }
.prof-save-btn.is-error { background-image: linear-gradient(135deg, #e11d48, #f43f5e); }
.prof-save-btn.is-success,
.prof-save-btn.is-success[disabled] {
  opacity: 1;
  background-image: linear-gradient(135deg, #059669, #10b981);
}
.prof-page [data-tip] { position: relative; }
.prof-page [data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(4px);
  background: #0f172a;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  padding: 5px 8px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
  z-index: 4;
}
.prof-page [data-tip]:hover::after,
.prof-page [data-tip]:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%);
  transition-delay: .12s;
}
.prof-logout-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}
.prof-logout-modal[hidden] { display: none; }
.prof-logout-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .48);
  animation: profFade .2s ease;
}
.prof-logout-dialog {
  position: relative;
  width: min(420px, 100%);
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, .22);
  animation: profPop .28s ease;
}
.prof-logout-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #fff1f2;
  color: #e11d48;
  margin-bottom: 14px;
}
.prof-logout-icon svg { width: 20px; height: 20px; }
.prof-logout-dialog h3 { margin: 0 0 8px; font-family: var(--display); color: #0f2744; letter-spacing: -.03em; }
.prof-logout-dialog p { margin: 0 0 18px; color: #64748b; }
.prof-logout-actions { display: flex; justify-content: flex-end; gap: 8px; }
.prof-logout-confirm {
  background: linear-gradient(135deg, #e11d48, #f43f5e);
  color: #fff;
  min-width: 112px;
}
.prof-logout-confirm.is-loading { pointer-events: none; opacity: .9; }
.prof-logout-confirm.is-loading [data-logout-confirm-icon] { animation: profSpin .7s linear infinite; }
body.prof-logout-open { overflow: hidden; }
@keyframes profIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes profSpin { to { transform: rotate(360deg); } }
@keyframes profFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes profPop {
  from { opacity: 0; transform: scale(.96); }
  to { opacity: 1; transform: none; }
}
@media (max-width: 720px) {
  .prof-hero { flex-direction: column; align-items: stretch; gap: 10px; margin-bottom: 16px; }
  .prof-hero-status { align-self: flex-start; }
  .prof-layout { grid-template-columns: 1fr; }
  .prof-grid { grid-template-columns: 1fr; }
  .prof-grid .span-2 { grid-column: auto; }
  .prof-page { padding-bottom: calc(128px + env(safe-area-inset-bottom, 0px)); }
  .prof-savebar { flex-direction: column; align-items: stretch; padding: 10px 12px; }
  .prof-save-btn { width: 100%; min-width: 0; }
  .prof-identity { flex-wrap: wrap; align-items: center; }
  .prof-pill { margin-left: 0; }
  .prof-card:hover { transform: none; }
  .prof-logout-actions { flex-direction: column-reverse; }
  .prof-logout-actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .prof-hero, .prof-hero::before, .prof-card, .prof-logout-backdrop, .prof-logout-dialog, .prof-save-btn.is-loading [data-prof-save-icon], .prof-status.is-saving svg, .prof-logout-confirm.is-loading [data-logout-confirm-icon] { animation: none; }
  .prof-card:hover, .prof-save-btn:hover, .prof-avatar:hover, .sidebar-logout-btn:hover svg { transform: none; }
  .prof-field > svg, .prof-page [data-tip]::after, .sidebar-logout-btn { transition: none; }
}

.auth-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
  background:
    radial-gradient(900px 480px at 12% -8%, rgba(99, 102, 241, .28), transparent 58%),
    radial-gradient(720px 420px at 96% 8%, rgba(34, 211, 238, .16), transparent 52%),
    #070b16;
  padding: 24px;
}
.auth-screen::before,
.auth-screen::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  filter: blur(48px);
}
.auth-screen::before {
  width: 340px;
  height: 340px;
  top: -80px;
  right: 12%;
  background: rgba(99, 102, 241, .22);
  animation: authBlob 18s ease-in-out infinite;
}
.auth-screen::after {
  width: 280px;
  height: 280px;
  bottom: -60px;
  left: 8%;
  background: rgba(34, 211, 238, .14);
  animation: authBlob 22s ease-in-out infinite reverse;
}
.auth-card {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  background: rgba(255,255,255,.96);
  border-radius: 20px;
  padding: 28px;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 24px 80px rgba(2, 6, 23, .35);
}
.auth-card h1 { margin-top: 8px; font-family: var(--display); }

.auth-login {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 20px;
  color: #e2e8f0;
  background:
    radial-gradient(1200px 640px at 50% -12%, rgba(99, 102, 241, .22), transparent 58%),
    #050814;
}
.auth-login::before,
.auth-login::after { content: none; display: none; }
.auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.auth-bg-aurora {
  position: absolute;
  inset: -22%;
  background:
    radial-gradient(ellipse 46% 36% at 16% 10%, rgba(99, 102, 241, .42), transparent 62%),
    radial-gradient(ellipse 40% 32% at 88% 16%, rgba(34, 211, 238, .22), transparent 60%),
    radial-gradient(ellipse 50% 40% at 58% 92%, rgba(167, 139, 250, .2), transparent 64%),
    conic-gradient(from 210deg at 50% 40%, rgba(99, 102, 241, .08), transparent 28%, rgba(34, 211, 238, .07), transparent 62%);
  animation: authAurora 26s ease-in-out infinite;
}
.auth-bg-beam {
  position: absolute;
  top: -18%;
  left: 50%;
  width: 42vw;
  max-width: 520px;
  height: 70vh;
  transform: translateX(-50%) rotate(18deg);
  background: linear-gradient(180deg, rgba(165, 180, 252, .16), rgba(34, 211, 238, .04) 42%, transparent 78%);
  filter: blur(28px);
  opacity: .55;
  animation: authBeam 12s ease-in-out infinite;
}
.auth-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .08) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 68% 58% at 50% 42%, #000 16%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 68% 58% at 50% 42%, #000 16%, transparent 78%);
  animation: authGrid 48s linear infinite;
  opacity: .55;
}
.auth-bg-noise {
  position: absolute;
  inset: 0;
  opacity: .045;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}
.auth-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  opacity: .55;
}
.auth-bg-orb-a {
  width: 18px;
  height: 18px;
  top: 18%;
  left: 16%;
  background: #6366f1;
  animation: authFloat 14s ease-in-out infinite;
}
.auth-bg-orb-b {
  width: 10px;
  height: 10px;
  top: 28%;
  right: 18%;
  background: #22d3ee;
  animation: authFloat 11s ease-in-out infinite reverse;
}
.auth-bg-orb-c {
  width: 8px;
  height: 8px;
  bottom: 22%;
  left: 28%;
  background: #a78bfa;
  animation: authFloat 16s ease-in-out infinite;
}
.auth-bg-orb-d {
  width: 14px;
  height: 14px;
  bottom: 16%;
  right: 22%;
  background: #818cf8;
  animation: authFloat 13s ease-in-out infinite reverse;
}
.auth-spark {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 12px 3px rgba(165, 180, 252, .7);
  opacity: .35;
}
.auth-spark-a { top: 22%; left: 46%; animation: authTwinkle 3.6s ease-in-out infinite; }
.auth-spark-b { top: 64%; right: 28%; animation: authTwinkle 4.4s ease-in-out infinite .6s; }
.auth-spark-c { bottom: 18%; left: 18%; animation: authTwinkle 5s ease-in-out infinite 1.1s; }
.auth-login .auth-card {
  --mx: 50%;
  --my: 0%;
  width: min(420px, 100%);
  padding: 32px 32px 22px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(22, 32, 58, .78), rgba(9, 13, 28, .82));
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .1) inset,
    0 0 0 1px rgba(99, 102, 241, .08),
    0 28px 80px rgba(2, 6, 23, .55),
    0 0 80px rgba(99, 102, 241, .12);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  animation: authCardIn .7s cubic-bezier(.22, 1, .36, 1) both;
  overflow: hidden;
}
.auth-card-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(129, 140, 248, .18), transparent 42%);
  opacity: .9;
  z-index: 0;
}
.auth-card-edge {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.16), transparent 28%);
  mask: linear-gradient(#000, transparent 42%);
  -webkit-mask: linear-gradient(#000, transparent 42%);
  z-index: 0;
}
.auth-login .auth-card > *:not(.auth-card-glow):not(.auth-card-edge):not(.auth-card-accent) { position: relative; z-index: 1; }
.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
  animation: authRise .7s ease both .08s;
}
.auth-mark {
  position: relative;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}
.auth-orbit {
  position: absolute;
  inset: -12px;
  width: 80px;
  height: 80px;
  pointer-events: none;
  animation: authSpin 16s linear infinite;
}
.auth-orbit-arc { filter: drop-shadow(0 0 8px rgba(34, 211, 238, .45)); }
.auth-mark img {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  position: relative;
  z-index: 1;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .12),
    0 10px 24px rgba(99, 102, 241, .4);
  animation: authPulse 4.5s ease-in-out infinite;
}
.auth-brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.auth-brand-copy strong {
  font-family: var(--display);
  font-size: 17px;
  letter-spacing: -.04em;
  color: #f8fafc;
  line-height: 1.2;
}
.auth-brand-copy span {
  font-size: 11px;
  color: #94a3b8;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 700;
}
.auth-login .auth-card h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 5vw, 32px);
  letter-spacing: -.05em;
  line-height: 1.1;
  color: #fff;
  background: linear-gradient(180deg, #fff 20%, #c7d2fe 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: authRise .7s ease both .16s;
}
.auth-lede {
  margin: 0 0 22px;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.55;
  animation: authRise .7s ease both .22s;
}
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 500;
}
.auth-alert svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.auth-alert.is-success {
  background: rgba(16, 185, 129, .12);
  border: 1px solid rgba(52, 211, 153, .22);
  color: #6ee7b7;
}
.auth-alert.is-error {
  background: rgba(244, 63, 94, .12);
  border: 1px solid rgba(251, 113, 133, .22);
  color: #fda4af;
}
.auth-field { margin-bottom: 14px; animation: authRise .7s ease both .28s; }
.auth-login .auth-field > label {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #94a3b8;
}
.auth-control { position: relative; }
.auth-control-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #64748b;
  pointer-events: none;
  z-index: 1;
  transition: color .18s ease, transform .18s ease;
}
.auth-control-icon svg { width: 18px; height: 18px; display: block; }
.auth-login .auth-control .input {
  height: 50px;
  padding: 0 46px 0 44px;
  border-radius: 16px;
  background: rgba(5, 8, 20, .62);
  border: 1px solid rgba(255, 255, 255, .1);
  color: #f8fafc;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.auth-login .auth-control .input::placeholder { color: #64748b; }
.auth-login .auth-control .input:hover { border-color: rgba(255, 255, 255, .18); }
.auth-login .auth-control:focus-within .auth-control-icon { color: #a5b4fc; transform: translateY(-50%) scale(1.06); }
.auth-login .auth-control .input:focus {
  outline: none;
  background: rgba(7, 11, 24, .82);
  border-color: rgba(165, 180, 252, .7);
  box-shadow:
    0 0 0 4px rgba(99, 102, 241, .18),
    0 0 24px rgba(99, 102, 241, .12);
}
.auth-eye {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: color .15s ease, background .15s ease;
}
.auth-eye svg { width: 16px; height: 16px; display: block; }
.auth-eye svg[hidden] { display: none !important; }
.auth-eye:hover,
.auth-eye:focus-visible { color: #e2e8f0; background: rgba(255, 255, 255, .06); }
.auth-eye:focus-visible { outline: 2px solid #818cf8; outline-offset: 1px; }
.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 0 20px;
  animation: authRise .7s ease both .34s;
}
.auth-check {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding-left: 0;
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
  cursor: pointer;
  user-select: none;
}
.auth-check input {
  position: absolute;
  left: 0;
  top: 50%;
  width: 16px;
  height: 16px;
  margin: 0;
  transform: translateY(-50%);
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}
.auth-check-ui {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .04);
  color: transparent;
  display: grid;
  place-items: center;
  pointer-events: none;
  transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}
.auth-check-ui svg { width: 10px; height: 10px; }
.auth-check input:checked + .auth-check-ui {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #6366f1, #22d3ee);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .16);
}
.auth-check input:focus-visible + .auth-check-ui {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
}
.auth-forgot {
  font-size: 13px;
  font-weight: 600;
  color: #a5b4fc;
  position: relative;
  transition: color .16s ease;
}
.auth-forgot::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.auth-forgot:hover { color: #e0e7ff; }
.auth-forgot:hover::after { transform: scaleX(1); }
.auth-login .auth-submit {
  width: 100%;
  height: 50px;
  border-radius: 16px;
  gap: 10px;
  position: relative;
  overflow: hidden;
  font-weight: 700;
  letter-spacing: -.01em;
  background-image: linear-gradient(120deg, #4f46e5, #7c3aed 38%, #22d3ee 120%);
  background-size: 180% 100%;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .22) inset,
    0 14px 32px rgba(79, 70, 229, .38);
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease, background-position .45s ease;
  animation: authRise .7s ease both .4s;
}
.auth-login .auth-submit::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.2) 50%, transparent 62%);
  transform: translateX(-130%);
  pointer-events: none;
}
.auth-login .auth-submit:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .28) inset,
    0 18px 36px rgba(79, 70, 229, .48);
  background-position: 100% 0;
}
.auth-login .auth-submit:hover::after { animation: authShine .7s ease; }
.auth-login .auth-submit:active { transform: translateY(0); }
.auth-login .auth-submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(165, 180, 252, .45), 0 10px 24px rgba(99, 102, 241, .32);
}
.auth-submit-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.auth-submit-icon svg { width: 16px; height: 16px; display: block; }
.auth-submit-loader { display: none; }
.auth-login .auth-submit.is-loading {
  pointer-events: none;
  transform: none;
  filter: none;
}
.auth-login .auth-submit.is-loading .auth-submit-spark { display: none; }
.auth-login .auth-submit.is-loading .auth-submit-loader {
  display: block;
  animation: authSpin .7s linear infinite;
}
.auth-otp-input {
  letter-spacing: 0.42em;
  text-align: center;
  font-family: Sora, sans-serif;
  font-size: 22px;
  font-weight: 800;
}
.auth-otp { position: relative; }
.auth-otp-boxes {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}
.auth-otp-box {
  width: 100%;
  height: 54px;
  padding: 0;
  text-align: center;
  font-family: Sora, sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0;
  color: rgba(235, 228, 255, .38);
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 14px;
  caret-color: #c4b5fd;
  appearance: none;
  -webkit-appearance: none;
  transition: color .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.auth-otp-box:focus {
  outline: none;
  color: #fff;
  border-color: rgba(168, 85, 247, .75);
  background: rgba(168, 85, 247, .14);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, .18);
  transform: translateY(-1px);
}
.auth-otp-box.is-filled { box-shadow: 0 0 16px rgba(168, 85, 247, .22); }
.auth-otp-box.is-filled:nth-child(1) { color: #f0abfc; border-color: rgba(240, 171, 252, .45); background: rgba(240, 171, 252, .1); }
.auth-otp-box.is-filled:nth-child(2) { color: #c4b5fd; border-color: rgba(196, 181, 253, .45); background: rgba(167, 139, 250, .12); }
.auth-otp-box.is-filled:nth-child(3) { color: #93c5fd; border-color: rgba(147, 197, 253, .5); background: rgba(79, 127, 255, .12); }
.auth-otp-box.is-filled:nth-child(4) { color: #67e8f9; border-color: rgba(103, 232, 249, .45); background: rgba(34, 211, 238, .1); }
.auth-otp-box.is-filled:nth-child(5) { color: #a5b4fc; border-color: rgba(165, 180, 252, .5); background: rgba(99, 102, 241, .12); }
.auth-otp-box.is-filled:nth-child(6) { color: #f0abfc; border-color: rgba(240, 171, 252, .45); background: rgba(168, 85, 247, .12); }
.auth-otp.is-complete .auth-otp-box.is-filled {
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, .5);
  background: rgba(16, 185, 129, .12);
  box-shadow: 0 0 16px rgba(52, 211, 153, .18);
}
.auth-otp.is-error .auth-otp-box {
  border-color: rgba(255, 107, 129, .55);
  box-shadow: 0 0 0 3px rgba(255, 107, 129, .12);
}
.auth-strength {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}
.auth-strength[hidden] { display: none; }
.auth-strength-bar {
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .08);
  overflow: hidden;
}
.auth-strength-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #fb7185;
  transition: width .22s ease, background .22s ease;
}
.auth-strength[data-level="medium"] .auth-strength-bar i { background: #fbbf24; }
.auth-strength[data-level="strong"] .auth-strength-bar i { background: #34d399; }
.auth-strength-copy {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: rgba(235, 228, 255, .62);
}
.auth-strength-copy b { text-transform: capitalize; }
.auth-strength[data-level="weak"] .auth-strength-copy b { color: #fda4af; }
.auth-strength[data-level="medium"] .auth-strength-copy b { color: #fcd34d; }
.auth-strength[data-level="strong"] .auth-strength-copy b { color: #6ee7b7; }
.auth-strength-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.auth-strength-rules li {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  padding: 4px 8px;
  border-radius: 99px;
  color: rgba(235, 228, 255, .45);
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
}
.auth-strength-rules li.is-ok {
  color: #bbf7d0;
  background: rgba(16, 185, 129, .12);
  border-color: rgba(52, 211, 153, .28);
}
@media (max-width: 600px) {
  .auth-otp-boxes { gap: 6px; }
  .auth-otp-box { height: 48px; font-size: 18px; border-radius: 12px; }
}
.auth-resend {
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}
.auth-secure {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin: 16px 0 0;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  animation: authRise .7s ease both .48s;
}
.auth-secure svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: #818cf8;
}
.auth-submit-spark { display: block; }
@keyframes authCardIn {
  from { opacity: 0; transform: translateY(18px) scale(.97); }
  to { opacity: 1; transform: none; }
}
@keyframes authRise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes authSpin { to { transform: rotate(360deg); } }
@keyframes authPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
@keyframes authAurora {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(2%, -2%, 0) scale(1.05); }
}
@keyframes authGrid { to { background-position: 56px 56px; } }
@keyframes authBlob {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(24px, -18px, 0); }
}
@keyframes authFloat {
  0%, 100% { transform: translate3d(0, 0, 0); opacity: .4; }
  50% { transform: translate3d(10px, -16px, 0); opacity: .75; }
}
@keyframes authShine {
  from { transform: translateX(-130%); }
  to { transform: translateX(130%); }
}
@keyframes authBeam {
  0%, 100% { opacity: .4; transform: translateX(-50%) rotate(18deg) translateY(0); }
  50% { opacity: .7; transform: translateX(-50%) rotate(16deg) translateY(18px); }
}
@keyframes authTwinkle {
  0%, 100% { opacity: .15; transform: scale(.7); }
  50% { opacity: .8; transform: scale(1); }
}
@media (max-width: 520px) {
  .auth-login { padding: 24px 16px; }
  .auth-login .auth-card { padding: 24px 18px 18px; border-radius: 24px; }
  .auth-brand { margin-bottom: 20px; }
  .auth-row { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-screen::before, .auth-screen::after,
  .auth-bg-aurora, .auth-bg-beam, .auth-bg-grid, .auth-bg-orb, .auth-spark,
  .auth-orbit, .auth-orbit-dots, .auth-mark img,
  .auth-login .auth-card, .auth-brand, .auth-login .auth-card h1, .auth-lede,
  .auth-field, .auth-row, .auth-login .auth-submit, .auth-secure,
  .auth-login .auth-submit.is-loading .auth-submit-loader,
  .auth-glow-1, .auth-glow-2, .auth-card-accent {
    animation: none !important;
  }
  .auth-login .auth-submit:hover,
  .auth-login .auth-submit:hover::after { transform: none; animation: none; }
}

.auth-photo {
  --auth-overlay: rgba(10, 4, 28, .38);
  --auth-glass: rgba(12, 8, 35, .28);
  --auth-shift-x: 0px;
  --auth-shift-y: 0px;
  background: #08041a;
  display: grid;
  place-items: center;
  overflow-x: hidden;
  overflow-y: auto;
}
.auth-photo .auth-bg { display: none; }
.auth-wallpaper {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  background: url("../images/auth-login-bg.jpg") center / cover no-repeat;
  pointer-events: none;
}
.auth-ambient {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.auth-glow-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .35;
  will-change: transform, opacity;
}
.auth-glow-1 {
  width: 520px;
  height: 520px;
  left: 8%;
  top: 10%;
  background: radial-gradient(circle, rgba(168, 85, 247, .55), transparent 70%);
  animation: authGlowDrift1 16s ease-in-out infinite;
}
.auth-glow-2 {
  width: 460px;
  height: 460px;
  right: 6%;
  bottom: 8%;
  background: radial-gradient(circle, rgba(79, 127, 255, .45), transparent 70%);
  animation: authGlowDrift2 20s ease-in-out infinite;
}
@keyframes authGlowDrift1 {
  0%, 100% { transform: translate(0, 0); opacity: .3; }
  50% { transform: translate(30px, 20px); opacity: .45; }
}
@keyframes authGlowDrift2 {
  0%, 100% { transform: translate(0, 0); opacity: .28; }
  50% { transform: translate(-25px, -15px); opacity: .4; }
}
#auth-particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 2;
  background: var(--auth-overlay);
  pointer-events: none;
}
.auth-home-btn {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 15px;
  border-radius: 100px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #f5f1ff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.auth-home-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.auth-home-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .28);
  box-shadow: 0 8px 24px -10px rgba(139, 63, 216, .6);
  color: #fff;
}
.auth-card-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(90deg, #4a1f8f, #a855f7, #4f7fff, #a855f7, #4a1f8f);
  background-size: 220% 100%;
  animation: authAccentFlow 6s linear infinite;
}
@keyframes authAccentFlow {
  from { background-position: 0% 0; }
  to { background-position: -220% 0; }
}
.auth-photo.auth-login .auth-card {
  z-index: 5;
  background: var(--auth-glass);
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow:
    0 25px 80px rgba(0, 0, 0, .45),
    0 0 60px -22px rgba(139, 63, 216, .4),
    inset 0 1px 0 rgba(255, 255, 255, .14);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  transform: translate(var(--auth-shift-x), var(--auth-shift-y));
  animation: authPhotoCardIn .6s cubic-bezier(.22, .9, .32, 1) .05s both;
}
@keyframes authPhotoCardIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.auth-photo .auth-brand-copy span { color: rgba(235, 228, 255, .42); }
.auth-photo .auth-lede { color: rgba(235, 228, 255, .68); }
.auth-photo.auth-login .auth-field > label { color: rgba(235, 228, 255, .42); }
.auth-photo.auth-login .auth-control .input {
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .15);
  box-shadow: none;
  padding-left: 52px;
  padding-right: 16px;
}
.auth-photo.auth-login .auth-control:has(.auth-eye) .input { padding-right: 50px; }
.auth-photo.auth-login .auth-control .input::placeholder { color: rgba(255, 255, 255, .45); }
.auth-photo.auth-login .auth-control .input:hover { border-color: rgba(255, 255, 255, .26); }
.auth-photo.auth-login .auth-control .input:focus {
  background: rgba(255, 255, 255, .09);
  border-color: rgba(168, 85, 247, .7);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, .18);
}
.auth-photo .auth-control-icon {
  width: 34px;
  height: 34px;
  left: 8px;
  border-radius: 11px;
  background: rgba(168, 85, 247, .14);
  color: #c4b5fd;
  display: grid;
  place-items: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}
.auth-photo .auth-control-icon svg { width: 16px; height: 16px; }
.auth-photo .auth-control:focus-within .auth-control-icon {
  color: #fff;
  background: linear-gradient(135deg, rgba(139, 63, 216, .85), rgba(79, 127, 255, .72));
  box-shadow: 0 0 16px rgba(168, 85, 247, .4);
  transform: translateY(-50%);
}
.auth-photo .auth-eye {
  width: 36px;
  height: 36px;
  right: 7px;
  border-radius: 11px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  color: #c4b5fd;
}
.auth-photo .auth-eye:hover,
.auth-photo .auth-eye[aria-pressed="true"] {
  color: #fff;
  background: linear-gradient(135deg, rgba(139, 63, 216, .85), rgba(79, 127, 255, .72));
  border-color: transparent;
  box-shadow: 0 0 16px rgba(168, 85, 247, .38);
}
.auth-photo .auth-eye svg { width: 17px; height: 17px; }
.auth-photo.auth-login .auth-submit {
  background-image: linear-gradient(120deg, #4a1f8f 0%, #8b3fd8 50%, #4f7fff 100%);
  background-size: 170% 170%;
  background-position: 0% 50%;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .25),
    0 16px 34px -10px rgba(139, 63, 216, .6);
}
.auth-photo.auth-login .auth-submit:hover {
  background-position: 100% 50%;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .3),
    0 22px 42px -8px rgba(168, 85, 247, .7);
}
.auth-photo .auth-secure,
.auth-photo .auth-check,
.auth-photo .auth-forgot { color: rgba(235, 228, 255, .68); }
.auth-photo .auth-forgot { color: #a855f7; }
.auth-photo .auth-forgot:hover { color: #d8b4fe; }
.auth-photo .auth-secure a { color: #b18cff; font-weight: 700; }
@media (max-width: 600px) {
  .auth-home-btn { top: 16px; left: 16px; }
  .auth-home-btn span { display: none; }
  .auth-home-btn { width: 40px; padding: 0; justify-content: center; }
}

.landing {
  min-height: 100vh;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  color: #fff;
  padding: 24px;
}
.landing-bg, .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(20px);
}
.orb-a { width: 420px; height: 420px; background: #6366f1; top: -80px; left: -80px; animation: float 10s ease-in-out infinite; }
.orb-b { width: 360px; height: 360px; background: #22d3ee; right: -60px; bottom: -80px; animation: float 12s ease-in-out infinite reverse; }
.orb-c { width: 220px; height: 220px; background: #a78bfa; right: 20%; top: 18%; opacity: .7; animation: float 9s ease-in-out infinite; }
@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-24px) scale(1.05); }
}
.glass-panel {
  position: relative;
  width: min(520px, 100%);
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 32px;
  padding: 36px 28px;
  text-align: center;
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
}
.glass-panel h1 { font-size: 34px; margin: 12px 0; }
.landing-icon {
  width: 72px; height: 72px; margin: 0 auto 8px;
  display: grid; place-items: center;
  border-radius: 24px;
  background: rgba(255,255,255,.12);
}
.host-chip { display: inline-block; margin: 8px 0 18px; color: #dbeafe; font-size: 14px; }
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  display: inline-block;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.error-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px 16px;
  background: #f4f6fb;
  color: #0f172a;
}
.error-screen svg { width: 160px; margin: 0 auto 20px; }
.error-screen h1 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: -0.03em;
}
.error-screen p { margin: 0 0 8px; }
.error-card {
  width: min(440px, 100%);
  padding: 36px 28px;
  background: #fff;
  border: 1px solid #e6ebf4;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 32px rgba(15, 23, 42, 0.05);
}

.wizard {
  min-height: 100vh;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(99,102,241,.28), transparent 50%),
    radial-gradient(700px 400px at 100% 0%, rgba(34,211,238,.18), transparent 46%),
    #070b16;
  color: #fff;
  padding: 32px 16px;
}
.wizard-card {
  width: min(860px, 100%);
  margin: 0 auto;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 28px;
  padding: 28px;
  backdrop-filter: blur(18px);
}
.steps-bar { display: flex; gap: 8px; margin: 18px 0 24px; }
.steps-bar span {
  flex: 1; height: 6px; border-radius: 99px; background: rgba(255,255,255,.12);
}
.steps-bar span.on { background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.req { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.ok { color: #34d399; } .fail { color: #fb7185; }
.wizard .input, .wizard select { background: rgba(7,11,22,.55); color: #fff; border-color: rgba(255,255,255,.12); }
.hidden { display: none !important; }
.skeleton { background: linear-gradient(90deg, #eef2f7, #fff, #eef2f7); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; height: 14px; }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (max-width: 1100px) {
  .cards-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .nav-links { display: none; }
  .grid-3, .steps, .stats-row, .footer-grid, .cards-4, .grid-2 { grid-template-columns: 1fr; }
  .shorten-form { flex-direction: column; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    transform: translateX(-110%);
    z-index: 50;
    transition: .2s ease;
    flex: none;
  }
  .sidebar.open { transform: none; }
  .admin-shell.is-nav-open .sidebar-backdrop { display: block; }
  .admin-main {
    width: 100%;
    max-width: 100%;
  }
  .set-savebar,
  .prof-savebar {
    left: var(--admin-pad-x);
    right: var(--admin-pad-x);
  }
  .menu-toggle { display: inline-flex; }
  .device-split { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cards-6 { grid-template-columns: 1fr; }
  .header-inner { min-height: 64px; }
  .hero { padding: 48px 0 64px; }
  .admin-chip-meta { display: none; }
}

.dash-page { width: 100%; max-width: none; }
.dash-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 0 0 22px;
  padding: 4px 0 0;
}
.dash-hero::before {
  content: "";
  position: absolute;
  top: -28px;
  right: 8%;
  width: 280px;
  height: 90px;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, .14), rgba(34, 211, 238, .07) 46%, transparent 72%);
  filter: blur(6px);
  animation: dashHeroGlow 8s ease-in-out infinite;
}
.dash-hero-copy,
.dash-hero-meta { position: relative; z-index: 1; min-width: 0; }
.dash-hero-copy { animation: dashHeroIn .5s ease both; }
.dash-hero p {
  margin: 0 0 2px;
  font-size: 11px;
  letter-spacing: .12em;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  line-height: 1.2;
}
.dash-hero h1 {
  margin: 0 0 2px;
  font-family: var(--display);
  font-size: clamp(22px, 2.2vw, 28px);
  letter-spacing: -0.04em;
  line-height: 1.15;
  color: #0f2744;
}
.dash-hero span {
  display: block;
  max-width: 62ch;
  color: #64748b;
  font-size: 13px;
  line-height: 1.4;
}
.dash-hero span svg {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: -2px;
  margin-right: 4px;
  color: #6366f1;
}
.dash-hero-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  animation: dashHeroIn .55s ease both;
  animation-delay: 70ms;
}
.dash-hero-meta form { display: inline-flex; margin: 0; }
.dash-hero-meta time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.dash-hero-meta time svg { width: 14px; height: 14px; color: #6366f1; }
.dash-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 12px;
  border: 1px solid #d1fae5;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
@media (hover: hover) {
  .dash-live:hover {
    transform: translateY(-1px);
    background: #d1fae5;
    box-shadow: 0 8px 18px rgba(16, 185, 129, .16);
  }
}
.dash-refresh {
  width: 36px;
  height: 36px;
  padding: 0;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, color .2s ease;
}
.dash-refresh svg { width: 16px; height: 16px; transition: transform .35s ease; }
@media (hover: hover) {
  .dash-refresh:hover {
    transform: translateY(-1px);
    border-color: #c7d2fe;
    color: #4f46e5;
    box-shadow: 0 8px 18px rgba(99, 102, 241, .12);
  }
  .dash-refresh:hover svg { transform: rotate(90deg); }
}
.g-workspace-dash { max-width: none; width: 100%; margin: 0 0 var(--admin-gap); }
#create-link { scroll-margin-top: 16px; }
.g-workspace-dash .dash-create {
  position: relative;
  isolation: isolate;
  overflow: visible;
  background: #fff;
  border: 1px solid #e8eef5;
  border-radius: 16px;
  padding: 20px 20px 16px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .8) inset,
    0 10px 28px rgba(15, 39, 68, .05);
}
.g-workspace-dash .dash-create::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, #4f46e5, #22d3ee);
}
.g-workspace-dash .g-composer {
  display: grid;
  gap: 12px;
}
.g-workspace-dash .g-composer,
.g-workspace-dash .dash-create-head { position: relative; z-index: 1; }
.dash-create-head { margin: 0 0 16px; }
.dash-create-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  padding: 3px 8px;
  border-radius: 8px;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.dash-create-kicker svg { width: 12px; height: 12px; }
.dash-create-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.2;
  color: #0f2744;
}
.dash-create-head p {
  margin: 6px 0 0;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}
.g-workspace-dash .g-bar {
  min-height: 0;
  padding: 6px 6px 6px 12px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e8eef5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
  gap: 8px;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.dash-field-icon {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: #64748b;
  flex-shrink: 0;
}
.dash-field-icon svg { width: 16px; height: 16px; }
.g-workspace-dash .g-input {
  font-size: 14px;
  padding: 10px 4px;
  line-height: 1.4;
}
.g-workspace-dash .g-bar:focus-within,
.g-workspace-dash .dash-field:focus-within {
  background: #fff;
  border-color: #a5b4fc;
  box-shadow: inset 0 1px 0 #fff, 0 0 0 3px rgba(99, 102, 241, .12);
}
@media (hover: hover) {
  .g-workspace-dash .g-bar:hover:not(:focus-within) { border-color: #d4dcf0; }
  .dash-select:not(.is-open) .dash-field:hover:not(:focus-within) {
    border-color: #c7d2fe;
    box-shadow: 0 1px 2px rgba(15, 39, 68, .06), 0 8px 16px rgba(99, 102, 241, .08);
  }
}
.g-input.is-invalid { color: #9f1239; }
.dash-shorten {
  min-width: 112px;
  height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  background-image: linear-gradient(120deg, #4f46e5, #7c3aed 42%, #22d3ee);
  background-size: 160% 100%;
  box-shadow: 0 6px 14px rgba(79, 70, 229, .22);
  transition: transform .16s ease, filter .16s ease, box-shadow .16s ease, background-position .3s ease;
}
.dash-shorten svg { width: 14px; height: 14px; }
@media (hover: hover) {
  .dash-shorten:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
    background-position: 100% 0;
    box-shadow: 0 8px 18px rgba(79, 70, 229, .28);
  }
}
.dash-shorten:disabled { opacity: .45; transform: none; filter: none; box-shadow: none; }
.dash-shorten.is-loading { pointer-events: none; opacity: .88; transform: none; }
.dash-shorten.is-loading span::after {
  content: "";
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-left: 8px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: dashSpin .7s linear infinite;
  vertical-align: -1px;
}
.g-workspace-dash .g-sub {
  display: grid;
  gap: 8px;
  margin: 0;
  width: 100%;
}
.g-workspace-dash .dash-sub {
  position: relative;
  z-index: 3;
}
.g-workspace-dash .dash-sub > label {
  display: block;
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #64748b;
}
.dash-select {
  display: grid;
  gap: 0;
  width: 100%;
  min-width: 0;
}
.dash-field {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 10px 0 12px;
  border-radius: 13px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 39, 68, .06), 0 4px 12px rgba(15, 39, 68, .04);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.dash-select-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}
.dash-select-trigger {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  height: 40px;
  margin: 0;
  padding: 0 28px 0 0;
  border: 0;
  border-radius: 8px;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
  background-size: 16px;
  color: #0f2744;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  transition: background-image .18s ease;
}
.dash-select-trigger:focus {
  outline: none;
}
.dash-select-value {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.g-workspace-dash .dash-select.is-open .dash-field {
  border-color: #a5b4fc;
  background: #fff;
  box-shadow: inset 0 1px 0 #fff, 0 0 0 3px rgba(99, 102, 241, .12);
}
.dash-select.is-open .dash-field-icon,
.g-workspace-dash .dash-select:focus-within .dash-field-icon { color: #4f46e5; }
.dash-select.is-open .dash-select-trigger {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234f46e5' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m18 15-6-6-6 6'/%3E%3C/svg%3E");
}
.dash-select-panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  pointer-events: none;
  transition: grid-template-rows .18s ease, opacity .16s ease;
}
.dash-select-panel-clip {
  min-height: 0;
  overflow: hidden;
}
.dash-select.is-open .dash-select-panel {
  grid-template-rows: 1fr;
  opacity: 1;
  pointer-events: auto;
}
.dash-select-list {
  display: grid;
  gap: 2px;
  margin-top: 6px;
  padding: 4px;
  max-height: 188px;
  overflow: hidden auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15, 39, 68, .08), 0 1px 2px rgba(15, 39, 68, .05);
}
.dash-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  margin: 0;
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #334155;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  transition: background .14s ease, color .14s ease;
}
.dash-select-option-host {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-select-option.is-selected {
  background: #eef2ff;
  color: #3730a3;
  font-weight: 600;
}
.dash-select-option.is-selected::after {
  content: "";
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%234f46e5' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 14px no-repeat;
}
@media (hover: hover) {
  .dash-select-option:hover {
    background: #f8fafc;
    color: #0f2744;
  }
  .dash-select-option.is-selected:hover {
    background: #e0e7ff;
    color: #3730a3;
  }
}
.dash-select-option:focus-visible {
  outline: none;
  background: #eef2ff;
  box-shadow: inset 0 0 0 1px #c7d2fe;
}
@media (max-width: 700px) {
  .dash-field { height: 44px; }
  .dash-select-trigger { height: 42px; }
  .dash-select-option { min-height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .dash-field,
  .dash-select-trigger,
  .dash-select-panel,
  .dash-select-option {
    transition: none;
  }
}
.g-workspace-dash .g-empty-sub { padding: 10px 12px; border-radius: 12px; }
.dash-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0 2px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-preview svg { width: 13px; height: 13px; flex-shrink: 0; color: #818cf8; }
.dash-preview span { flex-shrink: 0; }
.dash-preview strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #0f2744;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.dash-advanced-toggle {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 8px 2px;
  border: 0;
  border-top: 1px solid #eef2f7;
  border-radius: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: color .16s ease;
}
.dash-advanced-toggle:hover { color: #334155; }
.dash-advanced-toggle > input {
  position: absolute;
  left: 2px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  transform: translateY(-50%);
}
.dash-advanced-mark {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid #cbd5e1;
  background: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.dash-advanced-toggle:focus-within .dash-advanced-mark {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .16);
}
.dash-advanced-mark::after {
  content: "";
  width: 8px;
  height: 5px;
  border: 1.5px solid transparent;
  border-top: 0;
  border-right: 0;
  transform: rotate(-45deg) translate(0, -1px);
}
.dash-advanced-toggle:has(input:checked) .dash-advanced-mark {
  background: #4f46e5;
  border-color: #4f46e5;
}
.dash-advanced-toggle:has(input:checked) .dash-advanced-mark::after { border-color: #fff; }
.dash-advanced-toggle > svg {
  width: 14px;
  height: 14px;
  margin-left: auto;
  color: #94a3b8;
  transition: transform .16s ease;
}
.dash-advanced-toggle:has(input:checked) > svg { transform: rotate(180deg); }
.g-workspace-dash .g-advanced {
  margin: 0;
  padding: 12px;
  gap: 12px 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e8eef5;
  grid-template-columns: minmax(0, 1.4fr) minmax(148px, 0.72fr);
}
.host-custom {
  display: flex;
  align-items: center;
  gap: 8px;
}
.host-custom .input {
  min-width: 0;
  flex: 1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .04em;
  text-transform: lowercase;
}
.host-custom span {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.g-workspace-dash .g-advanced label {
  display: block;
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}
.g-workspace-dash .g-advanced .help { margin-top: 6px; }
.g-yt-switch {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 !important;
  padding: 10px 12px;
  border: 1px solid #e8eef5;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}
.g-yt-switch > span:first-child { min-width: 0; }
.g-yt-switch strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #0f2744;
}
.g-yt-switch em {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  line-height: 1.4;
}
.g-yt-switch-control {
  position: relative;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}
.g-yt-switch-control input[type="hidden"] { display: none; }
.g-yt-switch-control input[type="checkbox"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}
.g-yt-knob {
  display: block;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: #64748b;
  border: 1.5px solid #475569;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(15, 23, 42, .28);
  transition: background .2s ease, border-color .2s ease;
}
.g-yt-knob::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .12), 0 3px 8px rgba(15, 23, 42, .22);
  transition: transform .2s ease;
}
.g-yt-switch-control input[type="checkbox"]:checked + .g-yt-knob {
  background: #4f46e5;
  border-color: #4338ca;
}
.g-yt-switch-control input[type="checkbox"]:checked + .g-yt-knob::after {
  transform: translateX(20px);
}
.g-yt-switch.is-locked { cursor: not-allowed; }
.g-yt-switch-control input[type="checkbox"]:disabled { cursor: not-allowed; }
.g-yt-switch-control input[type="checkbox"]:disabled + .g-yt-knob { opacity: 0.42; }
.g-yt-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
  align-items: stretch;
}
.g-yt-field {
  position: relative;
}
.g-yt-field-ico {
  position: absolute;
  left: 12px;
  top: 50%;
  z-index: 1;
  width: 22px;
  height: 22px;
  transform: translateY(-50%);
  pointer-events: none;
  display: grid;
  place-items: center;
}
.g-yt-field-ico svg {
  display: block;
  width: 22px;
  height: 16px;
}
.g-yt-field .input {
  padding-left: 42px;
}
.g-yt-status,
.g-yt-link-col,
.g-yt-side {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.g-yt-save-spacer {
  display: block;
  height: calc(1.2em + 6px);
  font-size: 12px;
  font-weight: 700;
  margin: 0;
  visibility: hidden;
  pointer-events: none;
}
.g-yt-save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  align-self: flex-start;
  margin-top: 0;
  min-height: 42px;
  min-width: 118px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  background: #4f46e5;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.28);
}
.g-yt-save:hover { filter: brightness(1.06); }
.g-yt-save i { width: 16px; height: 16px; }
.g-yt-save-msg { margin-top: 8px; }
.g-yt-save-msg.is-error { color: #ef4444; }
.g-yt-save-msg.is-ok { color: #16a34a; }
.dash-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--admin-gap);
  margin-bottom: var(--admin-gap);
}
.dash-kpis-admin { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.dash-users-panel { margin-bottom: var(--admin-gap); }
.dash-users-panel .dash-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.dash-kpi {
  background: #fff;
  border: 1px solid var(--line-dark);
  border-radius: var(--admin-card-radius);
  padding: 18px;
  box-shadow: 0 12px 36px rgba(15, 39, 68, 0.04);
  animation: dashIn .45s ease;
  min-width: 0;
}
.dash-kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #eef2ff, #ecfeff);
  color: #4f46e5;
  margin-bottom: 12px;
}
.dash-kpi-icon.cyan { color: #0891b2; }
.dash-kpi-icon.green { color: #059669; }
.dash-kpi-icon svg { width: 18px; height: 18px; }
.dash-kpi span { display: block; color: #64748b; font-size: 13px; font-weight: 600; }
.dash-kpi b {
  display: block;
  font-family: var(--display);
  font-size: 30px;
  letter-spacing: -0.04em;
  color: #0f2744;
  margin: 4px 0 2px;
}
.dash-kpi em { font-style: normal; color: #94a3b8; font-size: 12px; }
.dash-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, .9fr) minmax(0, .9fr);
  gap: var(--admin-gap);
  margin-bottom: var(--admin-gap);
}
.dash-overview-2 { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.dash-panel {
  background: #fff;
  border: 1px solid var(--line-dark);
  border-radius: var(--admin-card-radius);
  padding: 18px;
  box-shadow: 0 12px 36px rgba(15, 39, 68, 0.04);
  min-width: 0;
}
.dash-panel-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; margin-bottom: 12px; }
.dash-panel-head h2 { margin: 0; font-size: 15px; font-family: var(--display); color: #0f2744; }
.dash-panel-head p { margin: 0; font-size: 12px; color: #64748b; }
.dash-chart { height: 160px; }
.dash-panel-empty { margin: 24px 0; color: #64748b; font-size: 14px; }
.dash-device { display: grid; gap: 0; }
.dash-device-row {
  display: grid;
  gap: 8px;
  padding: 12px 0;
}
.dash-device-row + .dash-device-row {
  border-top: 1px solid #eef2f7;
}
.dash-device-row:first-child { padding-top: 4px; }
.dash-device-row:last-child { padding-bottom: 4px; }
.dash-device-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}
.dash-device-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}
.dash-device-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, #eef2ff, #ecfeff);
  color: var(--brand, #6366f1);
}
.dash-device-icon svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.85;
}
.dash-device-row b {
  color: #0f2744;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1;
  flex-shrink: 0;
}
.dash-device-track {
  height: 6px;
  border-radius: 99px;
  background: #eef2f7;
  overflow: hidden;
}
.dash-device-bar {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  min-width: 0;
}
.dash-top {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #e8eef5;
}
.dash-top strong { color: #4f46e5; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.dash-top span { color: #64748b; font-size: 13px; }
.dash-top b { color: #0f2744; margin-top: 6px; }
.dash-top:hover { border-color: #c7d2fe; }
.dash-page .dash-links > .widget-head p { margin: 0; color: #64748b; font-size: 14px; }
.dash-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-transform: none;
  letter-spacing: 0;
}
.dash-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  background: currentColor;
}
.dash-status.is-on i { background: #10b981; }
.dash-status.is-off i { background: #94a3b8; }
.dash-link-cards { display: none; }
.dash-link-card {
  border: 1px solid var(--line-dark);
  border-radius: 16px;
  padding: 14px;
  display: grid;
  gap: 10px;
  background: #fff;
}
.dash-link-card + .dash-link-card { margin-top: 10px; }
.dash-link-card-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.dash-link-card-lead { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.dash-link-card-meta { display: flex; flex-wrap: wrap; gap: 10px; color: #64748b; font-size: 13px; }
.dash-empty { padding: 56px 16px; }
@keyframes dashIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes dashHeroIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes dashHeroGlow {
  0%, 100% { opacity: .55; transform: translateY(0) scale(1); }
  50% { opacity: 1; transform: translateY(-6px) scale(1.06); }
}
@keyframes dashSpin { to { transform: rotate(360deg); } }
@media (max-width: 1280px) {
  .dash-kpis-admin { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .dash-overview { grid-template-columns: 1fr 1fr; }
  .dash-overview .dash-panel:first-child { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .dash-kpis { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 800px) {
  .links-table table { display: none; }
  .dash-link-cards { display: block; }
}
@media (max-width: 720px) {
  .dash-hero { flex-direction: column; align-items: stretch; gap: 10px; margin-bottom: 20px; }
  .dash-hero-meta { justify-content: flex-start; flex-wrap: wrap; }
  .dash-hero span { max-width: none; }
}
@media (max-width: 640px) {
  .dash-kpis, .dash-overview { grid-template-columns: 1fr; }
  .g-workspace-dash .dash-create { padding: 16px 14px 14px; }
  .g-workspace-dash .g-bar {
    flex-wrap: wrap;
    padding: 8px;
  }
  .g-workspace-dash .g-input { width: 100%; }
  .dash-shorten { width: 100%; min-width: 0; }
  .g-workspace-dash .g-advanced,
  .g-yt-row { grid-template-columns: 1fr; }
  .g-yt-save-spacer { display: none; }
  .g-yt-save { margin-top: 4px; }
  .dash-preview { flex-wrap: wrap; white-space: normal; }
}

.admin-shell[data-nav="analytics"] .topbar-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.an-page { width: 100%; max-width: none; }
.an-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 0 0 18px;
  padding: 4px 0 0;
}
.an-hero::before {
  content: "";
  position: absolute;
  top: -28px;
  right: 10%;
  width: 260px;
  height: 88px;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, .14), rgba(34, 211, 238, .07) 46%, transparent 72%);
  filter: blur(6px);
  animation: anGlow 8s ease-in-out infinite;
}
.an-hero-copy, .an-hero-meta { position: relative; z-index: 1; min-width: 0; }
.an-hero-copy { animation: anIn .5s ease both; }
.an-hero h1 {
  margin: 0 0 4px;
  font-family: var(--display);
  font-size: clamp(22px, 2.2vw, 28px);
  letter-spacing: -0.04em;
  line-height: 1.15;
  color: #0f2744;
}
.an-hero-copy > span {
  display: block;
  max-width: 58ch;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}
.an-hero-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
  animation: anIn .55s ease both;
  animation-delay: 70ms;
}
.an-hero-meta time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.an-hero-meta time svg { width: 14px; height: 14px; color: #6366f1; }
.an-refresh {
  width: 36px;
  height: 36px;
  padding: 0;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, color .2s ease;
}
.an-refresh svg { width: 16px; height: 16px; transition: transform .35s ease; }
.an-refresh:focus-visible { outline: 2px solid #818cf8; outline-offset: 2px; }
@media (hover: hover) {
  .an-refresh:hover {
    transform: translateY(-1px);
    border-color: #c7d2fe;
    color: #4f46e5;
    box-shadow: 0 8px 18px rgba(99, 102, 241, .12);
  }
  .an-refresh:hover svg { transform: rotate(90deg); }
}
.an-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
  align-items: stretch;
}
.an-kpi {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line-dark);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 10px 28px rgba(15, 39, 68, 0.04);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  animation: anIn .45s ease both;
  min-width: 0;
  height: 100%;
}
.an-kpi:nth-child(1) { animation-delay: 40ms; }
.an-kpi:nth-child(2) { animation-delay: 80ms; }
.an-kpi:nth-child(3) { animation-delay: 120ms; }
.an-kpi:nth-child(4) { animation-delay: 160ms; }
@media (hover: hover) {
  .an-kpi:hover {
    transform: translateY(-2px);
    border-color: #c7d2fe;
    box-shadow: 0 14px 32px rgba(15, 39, 68, 0.08);
  }
}
.an-kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #eef2ff, #ecfeff);
  color: #4f46e5;
  margin-bottom: 10px;
}
.an-kpi-icon.cyan { color: #0891b2; }
.an-kpi-icon.green { color: #059669; }
.an-kpi-icon svg { width: 16px; height: 16px; }
.an-kpi span { display: block; color: #64748b; font-size: 12px; font-weight: 600; }
.an-kpi b {
  display: block;
  font-family: var(--display);
  font-size: 26px;
  letter-spacing: -0.04em;
  line-height: 1.15;
  color: #0f2744;
  margin: 4px 0 auto;
}
.an-kpi em { font-style: normal; color: #94a3b8; font-size: 12px; margin-top: 6px; }
.an-grid-main, .an-grid-bottom {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}
.an-grid-main { grid-template-columns: minmax(0, 1.45fr) minmax(0, .85fr); }
.an-grid-bottom { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.an-card {
  background: #fff;
  border: 1px solid var(--line-dark);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 10px 28px rgba(15, 39, 68, 0.04);
  animation: anIn .5s ease both;
  min-width: 0;
}
.an-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.an-card-head h2 {
  margin: 0 0 2px;
  font-size: 16px;
  font-family: var(--display);
  color: #0f2744;
  letter-spacing: -0.03em;
}
.an-card-head p { margin: 0; color: #64748b; font-size: 13px; line-height: 1.4; }
.an-chart { position: relative; }
.an-chart-lg { height: 220px; }
.an-chart-donut { width: 160px; height: 160px; margin: 0 auto; }
.an-skel {
  position: absolute;
  inset: 12px;
  border-radius: 14px;
  background: linear-gradient(90deg, #eef2f7, #fff, #eef2f7);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}
.an-skel-circle { border-radius: 50%; }
.an-chart.is-ready .an-skel { display: none; }
.an-empty { text-align: center; padding: 24px 12px; color: #64748b; }
.an-empty h3 { margin: 0 0 6px; color: #0f2744; font-family: var(--display); }
.an-empty p { margin: 0; font-size: 13px; line-height: 1.5; }
.an-device { display: grid; justify-items: center; gap: 12px; }
.an-legend { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; gap: 8px; }
.an-legend li {
  display: grid;
  grid-template-columns: 10px 1fr auto auto;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}
.an-legend i { width: 10px; height: 10px; border-radius: 50%; }
.an-legend i[data-swatch="0"] { background: #6366f1; }
.an-legend i[data-swatch="1"] { background: #22d3ee; }
.an-legend i[data-swatch="2"] { background: #a78bfa; }
.an-legend i[data-swatch="3"] { background: #34d399; }
.an-legend i[data-swatch="4"] { background: #f59e0b; }
.an-legend span { color: #334155; }
.an-legend b { color: #0f2744; }
.an-legend em { color: #94a3b8; font-style: normal; }
.an-table-wrap { overflow: auto; }
.an-table { width: 100%; border-collapse: collapse; min-width: 0; }
.an-table th, .an-table td { padding: 10px 8px; text-align: left; border-bottom: 1px solid #eef2f7; font-size: 14px; }
.an-table th { color: #64748b; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.an-table tbody tr { transition: background .2s ease; }
.an-table tbody tr:hover { background: #f8fafc; }
.an-table a { display: grid; gap: 2px; color: inherit; }
.an-table a strong { color: #4f46e5; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.an-table a span { font-size: 12px; color: #64748b; }
.an-share { display: flex; align-items: center; gap: 8px; min-width: 90px; }
.an-share span {
  flex: 1;
  height: 6px;
  border-radius: 99px;
  background: #e8edf6;
  overflow: hidden;
  display: block;
}
.an-share b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transform-origin: left;
  animation: anBar .55s ease both;
}
.an-share em { font-style: normal; font-size: 12px; color: #64748b; min-width: 2.5ch; }
.an-track {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.an-track svg { width: 13px; height: 13px; }
.an-track.is-on { background: #ecfdf5; color: #047857; }
.an-track.is-off { background: #f1f5f9; color: #475569; }
.an-countries { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.an-country {
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
  animation: anIn .45s ease both;
  animation-delay: var(--d, 0ms);
}
.an-country:last-child { border-bottom: 0; padding-bottom: 0; }
.an-country:first-child { padding-top: 0; }
@media (hover: hover) {
  .an-country:hover { background: #f8fafc; border-radius: 12px; }
}
.an-country-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.an-country-id {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.an-flag {
  width: 22px;
  height: 16px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(15, 39, 68, .08);
  flex-shrink: 0;
  display: block;
  background: #e8eef8;
}
.an-flag-fallback {
  width: 22px;
  height: 16px;
  border-radius: 3px;
  display: grid;
  place-items: center;
  background: #eef2ff;
  color: #4f46e5;
  flex-shrink: 0;
}
.an-flag-fallback[hidden] { display: none !important; }
.an-flag-fallback svg { width: 12px; height: 12px; }
.an-country-id strong {
  color: #0f2744;
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.an-country-meta {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.an-country-meta b { color: #0f2744; font-size: 12px; }
.an-country-meta em { font-style: normal; color: #64748b; font-size: 12px; font-weight: 700; min-width: 4.5ch; text-align: right; }
.an-country-bar {
  height: 6px;
  border-radius: 99px;
  background: #eef2f7;
  overflow: hidden;
}
.an-country-bar b {
  display: block;
  height: 100%;
  width: var(--an-bar, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transform-origin: left center;
  animation: anBar .6s ease both;
}
.an-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}
.an-summary article {
  background: #fff;
  border: 1px solid var(--line-dark);
  border-radius: 16px;
  padding: 14px;
}
.an-summary span { display: block; font-size: 12px; color: #64748b; font-weight: 600; }
.an-summary b { display: block; margin: 4px 0 2px; color: #0f2744; font-family: var(--display); }
.an-summary em { font-style: normal; font-size: 12px; color: #94a3b8; }
.an-error {
  margin-top: 16px;
  text-align: center;
  padding: 28px 16px;
  background: #fff;
  border: 1px solid #fecdd3;
  border-radius: 16px;
  color: #9f1239;
}
.an-error h3 { margin: 0 0 6px; font-family: var(--display); }
.an-error p { margin: 0 0 14px; color: #64748b; }
.an-page.has-error .an-chart { opacity: .4; }
@keyframes anIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes anGlow {
  0%, 100% { opacity: .55; transform: translateY(0) scale(1); }
  50% { opacity: 1; transform: translateY(-6px) scale(1.06); }
}
@keyframes anBar {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
@media (max-width: 1100px) {
  .an-summary { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .an-kpis, .an-grid-main, .an-grid-bottom { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 800px) {
  .an-hero { flex-direction: column; align-items: stretch; gap: 10px; }
  .an-hero-meta { justify-content: flex-start; flex-wrap: wrap; }
  .an-grid-main, .an-grid-bottom { grid-template-columns: 1fr; }
  .an-card-head { flex-direction: column; align-items: flex-start; }
  .an-country-top { flex-wrap: wrap; }
  .an-table { min-width: 0; }
}
@media (max-width: 640px) {
  .an-kpis { grid-template-columns: 1fr; }
  .an-summary { grid-template-columns: 1fr; }
}

.subs-page { width: 100%; max-width: none; }
.subs-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 0 0 20px;
  padding: 4px 0 0;
}
.subs-hero-copy { min-width: 0; }
.subs-hero h1 {
  margin: 0 0 4px;
  font-family: var(--display);
  font-size: clamp(22px, 2.2vw, 28px);
  letter-spacing: -0.04em;
  line-height: 1.15;
  color: #0f2744;
}
.subs-hero span {
  display: block;
  max-width: 58ch;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}
.subs-notice {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  margin-bottom: 14px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(239, 246, 255, .95), #eff6ff);
  border: 1px solid #dbeafe;
  color: #1e3a8a;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .04);
  animation: subsIn .35s ease;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
@media (hover: hover) {
  .subs-notice:hover {
    transform: translateY(-1px);
    border-color: #bfdbfe;
    box-shadow: 0 10px 24px rgba(37, 99, 235, .08);
  }
}
.subs-notice-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: #fff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}
.subs-notice-icon svg { width: 16px; height: 16px; }
.subs-notice strong { display: block; margin-bottom: 2px; color: #1e40af; font-size: 13px; }
.subs-notice p { margin: 0; font-size: 13px; line-height: 1.5; color: #1e3a8a; }
.subs-notice code { font-size: 12px; font-weight: 700; }
.subs-card {
  background: #fff;
  border: 1px solid var(--line-dark);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: 0 10px 28px rgba(15, 39, 68, 0.04);
  animation: subsIn .4s ease;
}
#create-subdomain { scroll-margin-top: 16px; }
.subs-card-head { margin-bottom: 12px; }
.subs-card-head h2 {
  margin: 0 0 2px;
  font-size: 16px;
  font-family: var(--display);
  letter-spacing: -0.03em;
  color: #0f2744;
}
.subs-card-head p { margin: 0; color: var(--muted-dark); font-size: 13px; line-height: 1.45; }
.subs-list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.subs-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #0f2744;
}
.subs-input-row {
  display: flex;
  align-items: stretch;
  gap: 12px;
  width: 100%;
}
.subs-host-field {
  display: flex;
  align-items: stretch;
  flex: 1;
  min-width: 0;
  border: 1px solid #dbe3f0;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.subs-host-field:focus-within {
  border-color: #818cf8;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, .12);
}
.subs-slug {
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  border-radius: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  min-width: 0;
}
.subs-slug::placeholder {
  font-weight: 500;
  color: #94a3b8;
}
.subs-suffix {
  display: flex;
  align-items: center;
  font-weight: 700;
  color: #64748b;
  background: #f8fafc;
  border-left: 1px solid #e8eef5;
  padding: 0 14px;
  white-space: nowrap;
}
.subs-submit {
  min-width: 188px;
  flex-shrink: 0;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
@media (hover: hover) {
  .subs-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(99, 102, 241, .28);
  }
}
.subs-submit.is-loading { pointer-events: none; opacity: .88; transform: none; }
.subs-submit.is-loading span::after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 8px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: subsSpin .7s linear infinite;
  vertical-align: -1px;
}
.subs-submit.is-error {
  background: linear-gradient(135deg, #e11d48, #f43f5e);
  box-shadow: 0 10px 30px rgba(225, 29, 72, .28);
}
.subs-preview {
  margin: 8px 0 0;
  font-size: 13px;
  color: #64748b;
}
.subs-preview strong {
  color: #4f46e5;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.subs-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  flex: 1;
  justify-content: flex-end;
  min-width: min(100%, 560px);
}
.subs-toolbar .links-search { flex: 1; min-width: min(180px, 100%); }
.subs-toolbar .input, .subs-toolbar select { width: auto; min-width: 128px; }
.subs-table {
  margin-top: 4px;
  border: 1px solid #e8eef5;
  border-radius: 12px;
  box-shadow: none;
  background: #fff;
  width: 100%;
  overflow: auto;
}
.subs-table table {
  table-layout: fixed;
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}
.subs-col-slug { width: 15%; }
.subs-col-host { width: 27%; }
.subs-col-links { width: 10%; }
.subs-col-status { width: 13%; }
.subs-col-created { width: 14%; }
.subs-col-actions { width: 21%; }
.subs-table th,
.subs-table td {
  text-align: center;
  vertical-align: middle;
  padding: 15px 12px;
  border-bottom: 1px solid #eef2f7;
  box-sizing: border-box;
}
.subs-table thead th {
  background: #f8fafc;
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
  color: #64748b;
  height: 46px;
  border-bottom: 1px solid #e8eef5;
}
.subs-table tbody td {
  height: 58px;
}
.subs-table .subs-slug-cell {
  display: inline;
}
.subs-table tbody tr { transition: background .2s ease; }
.subs-table tbody tr:hover { background: #f8fafc; }
.subs-table tbody tr:last-child td { border-bottom: 0; }
.subs-slug-cell {
  font-weight: 700;
  color: #0f2744;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-wrap: anywhere;
}
.subs-host {
  color: #4f46e5;
  font-weight: 600;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.subs-host:hover { text-decoration: underline; }
.subs-created {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}
.subs-table .num-cell {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #0f2744;
  white-space: nowrap;
}
.subs-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 5px 10px 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}
.subs-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.subs-status.is-on { background: #ecfdf5; color: #047857; }
.subs-status.is-on i { background: #10b981; }
.subs-status.is-off { background: #f1f5f9; color: #475569; }
.subs-status.is-off i { background: #94a3b8; }
.subs-table .subs-actions {
  text-align: center;
}
.subs-table .action-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.subs-page .icon-btn {
  position: relative;
  min-width: 36px;
  min-height: 36px;
  width: 36px;
  height: 36px;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
@media (hover: hover) {
  .subs-page .icon-btn:hover { transform: translateY(-1px); }
}
.subs-page .icon-btn:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
}
.subs-page .icon-btn[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(4px);
  background: #0f172a;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
  padding: 5px 8px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: .12s ease;
  z-index: 3;
}
.subs-page .icon-btn[data-tip]:hover::after,
.subs-page .icon-btn[data-tip]:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%);
}
.subs-empty { text-align: center; padding: 32px 16px; color: var(--muted-dark); }
.subs-empty h3 { margin: 0 0 6px; color: #0f2744; font-family: var(--display); }
.subs-empty p { margin: 0 0 16px; }
.subs-mobile { display: none; }
.subs-mcard {
  border: 1px solid var(--line-dark);
  border-radius: 16px;
  padding: 16px;
  background: #fff;
  display: grid;
  gap: 10px;
}
.subs-mcard + .subs-mcard { margin-top: 10px; }
.subs-mcard-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.subs-mcard-meta { display: flex; justify-content: space-between; color: #64748b; font-size: 13px; }
.subs-mcard .action-bar { justify-content: flex-end; }
.subs-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 16px;
}
.subs-modal[hidden] { display: none !important; }
.subs-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .45);
}
.subs-modal-card {
  position: relative;
  width: min(420px, 100%);
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 24px 80px rgba(2, 6, 23, .28);
  animation: subsModal .18s ease;
  outline: none;
}
.subs-modal-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #fff1f2;
  color: #be123c;
  margin-bottom: 12px;
}
.subs-modal-card h3 { margin: 0 0 8px; font-family: var(--display); color: #0f2744; }
.subs-modal-card p { margin: 0 0 18px; color: #64748b; }
.subs-modal-card p strong { color: #0f2744; word-break: break-all; }
.subs-modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.subs-modal-actions .btn-danger:hover { filter: brightness(.97); }
body.subs-modal-open { overflow: hidden; }
@keyframes subsIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes subsSpin { to { transform: rotate(360deg); } }
@keyframes subsModal {
  from { opacity: 0; transform: scale(.96); }
  to { opacity: 1; transform: none; }
}
@media (max-width: 800px) {
  .subs-hero { flex-direction: column; align-items: stretch; gap: 12px; }
  .subs-notice { align-items: flex-start; }
  .subs-input-row { flex-direction: column; }
  .subs-submit { width: 100%; min-width: 0; }
  .subs-toolbar { justify-content: stretch; min-width: 0; }
  .subs-toolbar .input, .subs-toolbar select { width: 100%; min-width: 0; }
  .subs-table { display: none; }
  .subs-mobile { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .online-dot { animation: none; }
  .side-nav a:hover { transform: none; }
  .dash-hero, .dash-hero-copy, .dash-hero-meta, .dash-hero::before, .g-workspace-dash .dash-create, .dash-kpi, .dash-shorten.is-loading span::after { animation: none; transition: none; }
  .dash-live:hover, .dash-refresh:hover, .dash-refresh:hover svg, .short-code:hover, .icon-btn:hover { transform: none; }
  .an-hero, .an-hero-copy, .an-hero-meta, .an-hero::before, .an-kpi, .an-card, .an-skel, .an-country, .an-country-bar b, .an-share b { animation: none; }
  .an-kpi:hover, .an-refresh:hover, .an-refresh:hover svg { transform: none; }
  .set-hero, .set-hero::before, .set-card, .set-mark img, .set-upload-preview img, .set-filename, .set-pill.is-on svg, .set-save-btn.is-loading [data-save-icon], .set-status.is-saving svg, .set-upload-preview.is-loading svg, .set-upload-ok { animation: none; }
  .set-card:hover, .set-save-btn:hover, .set-card:hover .set-route-arrow { transform: none; }
  .set-switch, .set-switch::before, .set-switch::after, .set-field > svg, .set-page [data-tip]::after { transition: none; }
  .set-switch-wrap:active .set-switch { transform: none; }
  .subs-card, .subs-notice, .subs-modal-card, .subs-table tbody tr, .subs-submit.is-loading span::after { animation: none; transition: none; }
  .subs-notice:hover, .subs-submit:hover, .subs-page .icon-btn:hover { transform: none; }
  .subs-page .icon-btn[data-tip]::after { transition: none; }
  .prof-hero, .prof-hero::before, .prof-card, .prof-logout-dialog, .prof-logout-backdrop { animation: none; }
  .prof-card:hover, .sidebar-logout-btn:hover svg { transform: none; }
  .pub-orb, .pub-hero-glow, .pub-cta-glow, .pub-flow-arrow, .pub-flow-glow, .pub-flow-redact, .pub-bubble, .pub-icon, .pub-reveal, .pub-legal-mark, .pub-legal-mark-glow, .pub-legal-mark-core, .pub-legal-hero-inner, .pub-plan.is-featured { animation: none; }
  .pub-card:hover, .pub-shorten-btn:hover, .pub-nav a:hover, .pub-plan:hover, .pub-plan.is-featured, .pub-plan-wrap.is-featured { transform: none; }
}

.pub-site {
  --pub-bg: #06070f;
  --pub-panel: rgba(14, 18, 36, .72);
  --pub-line: rgba(255,255,255,.1);
  --pub-purple: #8b5cf6;
  --pub-blue: #1d4ed8;
  --pub-sky: #38bdf8;
  --pub-pink: #f472b6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 520px at 8% -8%, rgba(139, 92, 246, .22), transparent 58%),
    radial-gradient(900px 480px at 96% 6%, rgba(56, 189, 248, .14), transparent 52%),
    radial-gradient(800px 420px at 70% 100%, rgba(244, 114, 182, .1), transparent 55%),
    #06070f;
  color: #e8eefc;
}
.pub-site > main {
  flex: 1 0 auto;
  background: transparent;
}
.pub-site .btn-primary {
  background: linear-gradient(135deg, #7c3aed 0%, #1d4ed8 48%, #38bdf8 100%);
  box-shadow: 0 12px 34px rgba(124, 58, 237, .38);
}
.pub-site .btn-ghost {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  color: #fff;
}
.pub-site .btn-light {
  background: rgba(255,255,255,.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,.14);
}
.pub-site.pub-nav-open { overflow: hidden; }
.pub-site .page-hero { padding: 48px 0 72px; }
.pub-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(7, 11, 22, 0.78);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.pub-header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}
.pub-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.pub-brand img { width: 32px; height: 32px; border-radius: 10px; }
.pub-menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: #fff;
  border-radius: 12px;
  place-items: center;
  cursor: pointer;
}
.pub-menu-btn svg { width: 18px; height: 18px; }
.pub-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pub-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 600;
  transition: color .15s ease, background .15s ease, transform .15s ease;
}
.pub-nav a svg { width: 15px; height: 15px; }
.pub-nav a:hover { color: #fff; background: rgba(255,255,255,.06); }
.pub-nav a.is-active {
  color: #fff;
  background: rgba(139, 92, 246, .22);
  box-shadow: inset 0 -2px 0 #f472b6;
}
.pub-nav-cta { margin-left: 8px; color: #fff !important; }
.pub-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(920px 460px at 10% -18%, rgba(139,92,246,.48), transparent 58%),
    radial-gradient(720px 400px at 94% 0%, rgba(56,189,248,.22), transparent 52%),
    radial-gradient(640px 340px at 62% 108%, rgba(244,114,182,.2), transparent 50%),
    radial-gradient(520px 280px at 18% 100%, rgba(29,78,216,.32), transparent 52%),
    linear-gradient(180deg, #05060d 0%, #0a1022 62%, #06070f 100%);
  color: #fff;
  padding: 72px 0 88px;
}
.pub-hero-page { padding-bottom: 72px; }
.pub-hero-glow, .pub-orb {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(30px);
}
.pub-hero-glow {
  width: 420px;
  height: 220px;
  left: 18%;
  bottom: -80px;
  background: rgba(139,92,246,.32);
  animation: pubPulse 8s ease-in-out infinite;
}
.pub-orb-a { width: 280px; height: 280px; background: #8b5cf6; top: -90px; right: 8%; opacity: .38; animation: pubFloat 10s ease-in-out infinite; }
.pub-orb-b { width: 180px; height: 180px; background: #38bdf8; left: -40px; bottom: 20px; opacity: .28; animation: pubFloat 12s ease-in-out infinite reverse; }
.pub-orb-c { width: 220px; height: 220px; background: #f472b6; right: 22%; bottom: -40px; opacity: .2; animation: pubFloat 14s ease-in-out infinite; }
.pub-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 36px;
  align-items: center;
}
.pub-badge {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(139,92,246,.18), rgba(56,189,248,.12), rgba(244,114,182,.14));
  border: 1px solid rgba(167,139,250,.28);
  color: #e9d5ff;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
}
.pub-grad {
  background: linear-gradient(110deg, #c4b5fd 0%, #38bdf8 48%, #f9a8d4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.pub-badge svg { width: 14px; height: 14px; }
.pub-hero h1 {
  font-family: var(--display);
  letter-spacing: -0.05em;
  line-height: 1.05;
  font-size: clamp(40px, 6vw, 68px);
  margin: 18px 0 12px;
  max-width: 12ch;
}
.pub-lede { max-width: 54ch; color: #cbd5e1; font-size: 18px; margin: 0 0 28px; }
.pub-shorten {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 24px;
  padding: 10px;
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 80px rgba(2, 6, 23, .35);
  scroll-margin-top: 96px;
}
.pub-shorten-row {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}
.pub-shorten-icon {
  position: absolute;
  left: 16px;
  color: #94a3b8;
  pointer-events: none;
}
.pub-shorten-icon svg { width: 18px; height: 18px; }
.pub-shorten-row input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: rgba(7,11,22,.55);
  color: #fff;
  border-radius: 16px;
  padding: 16px 18px 16px 46px;
  outline: none;
  transition: box-shadow .2s ease, background .2s ease;
}
.pub-shorten-row input:focus { box-shadow: 0 0 0 4px rgba(139,92,246,.32); background: rgba(7,11,22,.72); }
.pub-shorten-row input::placeholder { color: #94a3b8; }
.pub-shorten-btn {
  flex-shrink: 0;
  background-size: 160% 100%;
  transition: transform .2s ease, filter .2s ease, box-shadow .2s ease, background-position .4s ease;
}
.pub-shorten-btn:hover { background-position: 100% 0; }
.pub-shorten-btn.is-loading { pointer-events: none; opacity: .9; transform: none; }
.pub-shorten-btn.is-loading svg { animation: pubSpin .7s linear infinite; }
.pub-result {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  background: rgba(8, 12, 28, .82);
  color: #fff;
  border: 1px solid rgba(139,92,246,.35);
  border-radius: 16px;
  padding: 14px 16px;
  animation: pubIn .35s ease;
}
.pub-result p { margin: 0 0 4px; font-size: 12px; color: #94a3b8; font-weight: 700; }
.pub-result code { color: #f9a8d4; font-weight: 700; word-break: break-all; }
.pub-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 22px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
}
.pub-trust li { display: inline-flex; align-items: center; gap: 6px; }
.pub-trust svg { width: 15px; height: 15px; color: #38bdf8; }
.pub-flow {
  position: relative;
  display: grid;
  gap: 0;
  padding: 22px 20px 20px;
  border-radius: 28px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(420px 180px at 100% 0%, rgba(244,114,182,.18), transparent 62%),
    radial-gradient(380px 160px at 0% 100%, rgba(56,189,248,.14), transparent 60%),
    linear-gradient(180deg, rgba(18, 16, 42, .82), rgba(8, 10, 24, .94));
  border: 1px solid rgba(167,139,250,.32);
  box-shadow:
    0 28px 70px rgba(76, 29, 149, .32),
    inset 0 1px 0 rgba(255,255,255,.1);
}
.pub-flow-glow {
  position: absolute;
  width: 240px;
  height: 240px;
  right: -60px;
  top: 18%;
  border-radius: 50%;
  background: rgba(139,92,246,.28);
  filter: blur(36px);
  pointer-events: none;
  animation: pubPulse 8s ease-in-out infinite;
}
.pub-flow-stage {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
}
.pub-flow-card, .pub-purpose-card div {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  padding: 16px 18px;
  backdrop-filter: blur(12px);
}
.pub-flow .pub-flow-card {
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  box-shadow: 0 10px 28px rgba(2, 6, 23, .22);
}
.pub-flow-card span, .pub-purpose-card div {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #c7d2fe;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 700;
}
.pub-flow-card strong, .pub-flow-url {
  display: block;
  margin-top: 8px;
  font-size: 16px;
  letter-spacing: -.02em;
}
.pub-flow-card.accent {
  border-color: rgba(244,114,182,.48);
  background:
    radial-gradient(280px 120px at 100% 0%, rgba(244,114,182,.2), transparent 64%),
    linear-gradient(180deg, rgba(88, 28, 135, .42), rgba(14, 16, 36, .92));
  box-shadow: 0 0 0 1px rgba(139,92,246,.38), 0 18px 40px rgba(124,58,237,.32);
}
.pub-flow-short {
  display: flex;
  align-items: center;
  gap: 2px;
  font-family: var(--display);
  color: #f5d0fe;
}
.pub-flow-code { letter-spacing: .12em; }
.pub-flow-sep { color: rgba(255,255,255,.28); padding: 0 2px; }
.pub-flow-redact {
  display: inline-block;
  width: 7.4em;
  height: 14px;
  border-radius: 999px;
  background:
    linear-gradient(90deg,
      rgba(148,163,184,.2) 0%,
      rgba(196,181,253,.55) 25%,
      rgba(56,189,248,.45) 50%,
      rgba(244,114,182,.5) 75%,
      rgba(148,163,184,.2) 100%);
  background-size: 180% 100%;
  filter: blur(4.5px);
  transform: translateY(1px);
  user-select: none;
  animation: pubShimmer 2.8s ease-in-out infinite;
}
.pub-flow-arrow {
  display: grid;
  place-items: center;
  color: #c4b5fd;
  height: 22px;
  animation: pubNudgeY 1.8s ease-in-out infinite;
}
.pub-flow-arrow svg { width: 18px; height: 18px; }
.pub-flow-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.pub-flow-stats em {
  font-style: normal;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.08);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
}
.pub-section { padding: 84px 0; position: relative; }
.pub-alt {
  background:
    radial-gradient(720px 340px at 90% 0%, rgba(29,78,216,.22), transparent 60%),
    radial-gradient(640px 300px at 8% 100%, rgba(236,72,153,.12), transparent 58%),
    rgba(8, 10, 20, .72);
}
.pub-kicker {
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 700;
  color: #c4b5fd;
  margin-bottom: 8px;
}
.pub-section-title { max-width: 640px; margin-bottom: 36px; }
.pub-section-title h2, .pub-split h2, .pub-analytics h2, .pub-cta h2 {
  font-family: var(--display);
  letter-spacing: -0.04em;
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 10px;
  color: #f8fafc;
}
.pub-section-title p, .pub-split p, .pub-analytics > .pub-reveal p { color: #94a3b8; margin: 0; }
.pub-features, .pub-principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pub-principles { grid-template-columns: repeat(4, 1fr); }
.pub-card {
  background: linear-gradient(180deg, rgba(18, 22, 42, .9), rgba(10, 13, 28, .92));
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 18px 44px rgba(2, 6, 23, .35);
  color: #e8eefc;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.pub-card p { color: #94a3b8; margin: 0; }
.pub-card h3 { margin: 0 0 8px; font-family: var(--display); letter-spacing: -.03em; color: #fff; }
@media (hover: hover) {
  .pub-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 50px rgba(124, 58, 237, .18);
    border-color: rgba(167,139,250,.45);
  }
  .pub-card:hover .pub-icon { transform: translateY(-2px); color: #f9a8d4; }
}
.pub-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(139,92,246,.22), rgba(56,189,248,.16));
  color: #c4b5fd;
  margin-bottom: 14px;
  transition: transform .2s ease, color .2s ease;
}
.pub-features .pub-card:nth-child(6n+2) .pub-icon,
.pub-principles .pub-card:nth-child(4n+2) .pub-icon {
  background: linear-gradient(135deg, rgba(29,78,216,.28), rgba(56,189,248,.2));
  color: #7dd3fc;
}
.pub-features .pub-card:nth-child(6n+3) .pub-icon,
.pub-principles .pub-card:nth-child(4n+3) .pub-icon {
  background: linear-gradient(135deg, rgba(244,114,182,.22), rgba(139,92,246,.18));
  color: #f9a8d4;
}
.pub-features .pub-card:nth-child(6n+4) .pub-icon,
.pub-principles .pub-card:nth-child(4n+4) .pub-icon {
  background: linear-gradient(135deg, rgba(29,78,216,.32), rgba(139,92,246,.18));
  color: #93c5fd;
}
.pub-icon svg { width: 20px; height: 20px; }
.pub-steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 12px;
  align-items: stretch;
}
.pub-step-num {
  font-family: var(--display);
  font-size: 22px;
  color: #f9a8d4;
  margin-bottom: 8px;
  letter-spacing: -.04em;
}
.pub-step-line { display: grid; place-items: center; color: #7c3aed; }
.pub-step-line svg { width: 22px; height: 22px; }
.pub-analytics {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 28px;
  align-items: center;
}
.pub-dash {
  background: linear-gradient(180deg, rgba(16, 20, 40, .94), rgba(8, 11, 24, .96));
  border: 1px solid rgba(139,92,246,.28);
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 22px 60px rgba(76, 29, 149, .22);
}
.pub-dash-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.pub-dash-kpis span { display: block; font-size: 12px; color: #94a3b8; font-weight: 700; }
.pub-dash-kpis strong {
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: -.04em;
  background: linear-gradient(135deg, #c4b5fd, #38bdf8, #f472b6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.pub-dash-row { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; }
.pub-mini-chart { background: rgba(255,255,255,.04); border-radius: 16px; padding: 12px; border: 1px solid rgba(255,255,255,.06); }
.pub-mini-chart svg { width: 100%; height: 88px; }
.pub-mini-chart p { margin: 4px 0 0; font-size: 12px; color: #94a3b8; font-weight: 700; }
.pub-devices { display: grid; gap: 10px; }
.pub-devices > div { position: relative; padding-bottom: 10px; }
.pub-devices span { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #e2e8f0; }
.pub-devices span svg { width: 14px; height: 14px; color: #38bdf8; }
.pub-devices b { float: right; font-size: 12px; color: #94a3b8; }
.pub-bar {
  display: block;
  height: 6px;
  margin-top: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #8b5cf6, #38bdf8, #f472b6);
  max-width: 100%;
}
.pub-cta {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(680px 260px at 20% 0%, rgba(139,92,246,.35), transparent 60%),
    radial-gradient(640px 240px at 86% 100%, rgba(244,114,182,.22), transparent 58%),
    linear-gradient(135deg, #070814, #12103a 48%, #0b1d3a);
  color: #fff;
  padding: 72px 0;
  text-align: center;
}
.pub-cta-glow {
  position: absolute;
  width: 480px;
  height: 220px;
  left: 50%;
  top: 20px;
  transform: translateX(-50%);
  background: rgba(56,189,248,.28);
  filter: blur(40px);
  border-radius: 50%;
  animation: pubPulse 7s ease-in-out infinite;
}
.pub-cta-inner { position: relative; }
.pub-cta h2 { color: #fff; }
.pub-cta p { color: #cbd5e1; margin: 0 0 22px; }
.pub-footer {
  background: #070b16;
  color: #cbd5e1;
  padding: 48px 0 24px;
}
.pub-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; }
.pub-footer a { transition: color .15s ease; }
.pub-footer a:hover { color: #fff; }
.pub-footer a.is-active { color: #fff; }
.pub-footer strong { display: block; color: #fff; margin-bottom: 10px; }
.pub-footer p { margin: 0 0 8px; }
.pub-footer-brand p { margin-top: 12px; max-width: 36ch; }
.pub-copy { margin-top: 32px; border-top: 1px solid rgba(255,255,255,.08); padding-top: 16px; font-size: 13px; }
.pub-split, .pub-contact { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.pub-purpose-card {
  display: grid;
  gap: 10px;
  background: linear-gradient(180deg, #0b1220, #10182d);
  color: #fff;
  border-radius: 24px;
  padding: 22px;
}
.pub-purpose-card div {
  background: rgba(255,255,255,.06);
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  color: #e2e8f0;
}
.pub-purpose-card svg { width: 16px; height: 16px; color: #38bdf8; }
.pub-metrics-wrap {
  padding: 28px 0 8px;
  background:
    radial-gradient(720px 220px at 12% 0%, rgba(139,92,246,.14), transparent 62%),
    radial-gradient(640px 200px at 88% 100%, rgba(56,189,248,.1), transparent 60%);
}
.pub-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.pub-metric {
  background: linear-gradient(180deg, rgba(16, 20, 42, .92), rgba(8, 10, 24, .96));
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 22px;
  padding: 22px 22px 20px;
  box-shadow: 0 16px 40px rgba(2, 6, 23, .28);
}
.pub-metric span {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #94a3b8;
}
.pub-metric strong {
  display: block;
  margin: 10px 0 6px;
  font-family: var(--display);
  font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -.05em;
  line-height: 1;
  color: #fff;
}
.pub-metric em {
  font-style: normal;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
}
.pub-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.pub-stats .pub-card { text-align: left; }
.pub-stats .pub-card i, .pub-stats .pub-card svg { color: #c4b5fd; width: 20px; height: 20px; margin-bottom: 12px; display: block; }
.pub-stats strong { display: block; margin-bottom: 6px; font-family: var(--display); color: #fff; }
.pub-stats span { color: #94a3b8; font-size: 14px; }
.pub-contact-wrap { padding-top: 24px; }
.pub-contact-side { display: grid; gap: 14px; }
.pub-contact-form { display: grid; gap: 16px; }
.pub-contact-form label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
}
.pub-contact-form label svg { width: 14px; height: 14px; color: #64748b; }
.pub-field { position: relative; }
.pub-field > svg, .pub-field > i[data-lucide] {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #94a3b8;
  pointer-events: none;
  transition: color .2s ease;
}
.pub-field-area > svg, .pub-field-area > i[data-lucide] { top: 16px; transform: none; }
.pub-field .input { padding-left: 38px; }
.pub-field:focus-within > svg { color: #c4b5fd; }
.pub-field-error { color: #be123c; font-size: 12px; font-weight: 600; margin: 6px 0 0; }
.pub-contact-form .input.is-invalid { border-color: #e11d48; box-shadow: 0 0 0 4px rgba(225,29,72,.12); }
.pub-contact-form .btn.is-loading { pointer-events: none; }
.pub-contact-form .btn.is-loading svg { animation: pubSpin .7s linear infinite; }
.pub-contact-art { display: grid; gap: 10px; }
.pub-bubble {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(14, 18, 36, .9);
  border: 1px solid rgba(139,92,246,.28);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  width: fit-content;
  color: #e2e8f0;
  box-shadow: 0 10px 24px rgba(2,6,23,.28);
  animation: pubFloat 5s ease-in-out infinite;
}
.pub-bubble.delay { animation-delay: 1.2s; margin-left: 28px; }
.pub-bubble svg { width: 15px; height: 15px; color: #f9a8d4; }
.pub-about-visual { display: grid; gap: 12px; }

.pub-legal-hero {
  text-align: center;
  padding-top: 64px;
  padding-bottom: 64px;
}
.pub-legal-hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 720px;
  margin: 0 auto;
  animation: pubIn .55s ease both;
}
.pub-legal-hero h1 {
  max-width: none;
  margin: 16px 0 10px;
  font-size: clamp(36px, 6vw, 58px);
}
.pub-legal-hero .pub-lede {
  margin: 0 0 18px;
  max-width: 42ch;
}
.pub-legal-mark {
  position: relative;
  width: 76px;
  height: 76px;
  margin-bottom: 22px;
  display: grid;
  place-items: center;
}
.pub-legal-mark-glow {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139,92,246,.5), rgba(244,114,182,.16) 55%, transparent 70%);
  filter: blur(8px);
  animation: pubPulse 7s ease-in-out infinite;
}
.pub-legal-mark-core {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, rgba(124,58,237,.95), rgba(29,78,216,.85), rgba(56,189,248,.75));
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 18px 40px rgba(124,58,237,.32);
  animation: pubFloat 8s ease-in-out infinite;
}
.pub-legal-mark-core svg { width: 32px; height: 32px; }
.pub-legal-updated {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 600;
}
.pub-legal-updated svg { width: 14px; height: 14px; color: #38bdf8; }
.pub-legal-updated time { color: #c7d2fe; }
.pub-legal {
  padding-top: 48px;
  padding-bottom: 40px;
}
.pub-legal-wrap {
  width: min(760px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 16px;
}
.pub-legal-card {
  padding: 26px 28px;
}
.pub-legal-card h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  font-size: 18px;
  color: #f8fafc;
}
.pub-legal-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(139,92,246,.22), rgba(56,189,248,.16));
  color: #c4b5fd;
  transition: transform .2s ease, color .2s ease;
}
.pub-legal-icon svg { width: 18px; height: 18px; }
.pub-legal-card p {
  margin: 0 0 12px;
  color: #94a3b8;
  line-height: 1.75;
  font-size: 15px;
}
.pub-legal-card p:last-child { margin-bottom: 0; }
.pub-legal-card a {
  color: #7dd3fc;
  font-weight: 600;
}
.pub-legal-card a:hover { text-decoration: underline; }
@media (hover: hover) {
  .pub-legal-card:hover {
    transform: translateY(-3px);
    border-color: rgba(244,114,182,.4);
  }
  .pub-legal-card:hover .pub-legal-icon {
    color: #f9a8d4;
    transform: translateY(-1px);
  }
}
.pub-legal-cta { padding: 64px 0; }
.pub-legal-cta-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, rgba(124,58,237,.95), rgba(56,189,248,.75));
  box-shadow: 0 12px 30px rgba(124,58,237,.32);
}
.pub-legal-cta-icon svg { width: 26px; height: 26px; }
.pub-legal-cta .pub-cta-inner { max-width: 560px; margin: 0 auto; }

.pub-plans .pub-section-title { max-width: 720px; }
.pub-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
  padding-top: 12px;
}
.pub-plan-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  height: auto;
  padding-top: 14px;
}
.pub-plan-wrap > .pub-plan {
  flex: 0 0 auto;
  width: 100%;
}
.pub-plan-grid[data-plan-count="1"] { grid-template-columns: minmax(0, 400px); justify-content: center; }
.pub-plan-grid[data-plan-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pub-plan {
  --plan-ring: rgba(255,255,255,.12);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 26px 24px 22px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.045), transparent 28%),
    linear-gradient(180deg, rgba(18, 22, 48, .92), rgba(8, 10, 22, .96));
  border: 1px solid var(--plan-ring);
  box-shadow:
    0 1px 0 rgba(255,255,255,.06) inset,
    0 22px 50px rgba(2, 6, 23, .38);
  opacity: 1;
  height: auto;
  min-height: 0;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.pub-plan-glow {
  pointer-events: none;
  position: absolute;
  inset: auto -20% -40% auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56,189,248,.22), transparent 68%);
  z-index: 0;
}
.pub-plan > *:not(.pub-plan-glow) { position: relative; z-index: 1; }
.pub-plan:hover {
  transform: translateY(-6px);
  border-color: rgba(167, 139, 250, .38);
  box-shadow:
    0 1px 0 rgba(255,255,255,.08) inset,
    0 28px 64px rgba(76, 29, 149, .28);
}
.pub-plan-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pub-plan h3 {
  margin: 0;
  font-family: var(--display);
  letter-spacing: -.04em;
  font-size: 24px;
  line-height: 1.15;
  min-height: calc(1.15em * 2);
  color: #fff;
}
.pub-plan-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(139,92,246,.28), rgba(56,189,248,.14));
  color: #ddd6fe;
  box-shadow: 0 0 0 1px rgba(255,255,255,.06) inset;
}
.pub-plan-icon svg { width: 21px; height: 21px; }
.pub-plan-cycle {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #c4b5fd;
  background: rgba(139,92,246,.14);
  border: 1px solid rgba(167,139,250,.22);
}
.pub-plan-price {
  font-family: var(--display);
  font-size: 40px;
  letter-spacing: -.06em;
  background: linear-gradient(110deg, #fff 8%, #c4b5fd 42%, #38bdf8 78%, #f9a8d4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: .95;
}
.pub-plan-price small {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  color: #94a3b8;
  background: none;
  -webkit-text-fill-color: #94a3b8;
}
.pub-plan-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 2px;
}
.pub-plan-metrics div {
  padding: 12px 8px 11px;
  border-radius: 16px;
  text-align: center;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.07);
}
.pub-plan-metrics b {
  display: block;
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: -.03em;
  color: #fff;
  line-height: 1.1;
}
.pub-plan-metrics span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #94a3b8;
}
.pub-plan ul { display: none; }
.pub-plan .btn {
  width: 100%;
  margin-top: 2px;
  min-height: 46px;
  border-radius: 14px;
  font-weight: 800;
}
.pub-plan-wrap.is-featured {
  z-index: 2;
  transform: translateY(-8px);
}
.pub-plan.is-featured {
  --plan-ring: rgba(244,114,182,.42);
  box-shadow:
    0 1px 0 rgba(255,255,255,.1) inset,
    0 0 0 1px rgba(139,92,246,.28),
    0 30px 70px rgba(124,58,237,.32);
  background:
    radial-gradient(420px 180px at 100% 0%, rgba(244,114,182,.2), transparent 58%),
    radial-gradient(360px 160px at 0% 100%, rgba(56,189,248,.16), transparent 56%),
    linear-gradient(180deg, rgba(28, 20, 56, .98), rgba(10, 12, 28, .98));
}
.pub-plan.is-featured .pub-plan-glow {
  inset: -18% auto auto -10%;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(167,139,250,.28), transparent 68%);
}
.pub-plan-badge {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
  pointer-events: none;
  background: linear-gradient(90deg, #7c3aed, #db2777);
  box-shadow: 0 8px 20px rgba(219,39,119,.28);
}
.pub-plan.is-featured h3 { padding-right: 0; }
.pub-plans { scroll-margin-top: 92px; }
.pub-plans-empty { max-width: 420px; }
.pub-site .pub-contact-form .input,
.pub-site .pub-contact-form textarea {
  background: rgba(7,11,22,.62);
  color: #fff;
  border-color: rgba(255,255,255,.12);
}
.pub-site .pub-contact-form .input:focus,
.pub-site .pub-contact-form textarea:focus {
  border-color: #a78bfa;
  box-shadow: 0 0 0 4px rgba(139,92,246,.22);
}

.pub-reveal { opacity: 0; transform: translateY(14px); animation: none; }
.pub-reveal.is-in { animation: pubIn .5s ease both; animation-delay: var(--d, 0ms); }
.pub-site.is-reduced .pub-reveal { opacity: 1; transform: none; }
@keyframes pubIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes pubPulse {
  0%, 100% { opacity: .65; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-14px); }
}
@keyframes pubFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes pubNudge {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}
@keyframes pubNudgeY {
  0%, 100% { transform: translateY(0); opacity: .5; }
  50% { transform: translateY(5px); opacity: 1; }
}
@keyframes pubShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@keyframes pubSpin { to { transform: rotate(360deg); } }
@media (max-width: 1024px) {
  .pub-hero-grid, .pub-analytics, .pub-split, .pub-contact, .pub-principles { grid-template-columns: 1fr; }
  .pub-features { grid-template-columns: 1fr 1fr; }
  .pub-stats { grid-template-columns: 1fr 1fr; }
  .pub-metrics { grid-template-columns: 1fr 1fr; }
  .pub-hero h1 { max-width: none; }
  .pub-plan-grid, .pub-plan-grid[data-plan-count="2"] { grid-template-columns: 1fr 1fr; }
  .pub-plan-wrap.is-featured, .pub-plan.is-featured { transform: none; }
}
@media (max-width: 900px) {
  .pub-menu-btn { display: grid; }
  .pub-nav {
    display: none;
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    flex-direction: column;
    align-items: stretch;
    background: rgba(7, 11, 22, .96);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 18px;
    padding: 12px;
    box-shadow: 0 24px 60px rgba(2,6,23,.4);
  }
  .pub-nav.is-open { display: flex; }
  .pub-nav-cta { margin-left: 0; justify-content: center; }
  .pub-header { position: sticky; }
  .pub-steps { grid-template-columns: 1fr; }
  .pub-step-line { transform: rotate(90deg); }
  .pub-footer-grid { grid-template-columns: 1fr 1fr; }
  .pub-dash-row, .pub-dash-kpis { grid-template-columns: 1fr; }
  .pub-shorten-row { flex-direction: column; align-items: stretch; }
  .pub-shorten-btn { width: 100%; }
}
@media (max-width: 640px) {
  .pub-legal { padding-top: 32px; padding-bottom: 24px; }
  .pub-legal-card { padding: 20px; }
  .pub-legal-hero { padding-top: 48px; padding-bottom: 48px; }
  .pub-legal-cta { padding: 48px 0; }
  .pub-plan-grid, .pub-plan-grid[data-plan-count="2"] { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .pub-features, .pub-stats, .pub-footer-grid, .pub-metrics { grid-template-columns: 1fr; }
  .pub-trust { flex-direction: column; gap: 10px; }
  .pub-result { flex-direction: column; align-items: stretch; }
  .pub-legal-card h2 { align-items: flex-start; }
}
