:root, html[data-theme="dark"] {
  --bg0: #050412;
  --text: #f4f1ff;
  --muted: #a599d4;
  --violet: #a78bfa;
  --violet-2: #818cf8;
  --cyan: #22d3ee;
  --glass: rgba(22, 16, 48, 0.72);
  --glass-2: rgba(255, 255, 255, 0.055);
  --line: rgba(186, 156, 255, 0.26);
  --danger: #fb7185;
  --ok: #34d399;
  --topbar: rgba(8, 6, 24, 0.78);
  --card: linear-gradient(155deg, rgba(42, 30, 82, 0.78) 0%, rgba(18, 14, 42, 0.62) 55%, rgba(10, 18, 36, 0.58) 100%);
  --menu: rgba(14, 10, 32, 0.96);
  --input: rgba(8, 6, 24, 0.78);
  --radius: 16px;
  --shadow: 0 22px 56px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(167, 139, 250, 0.06);
  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg0: #f4f1fb;
  --text: #1a1433;
  --muted: #6b628a;
  --violet: #7c3aed;
  --violet-2: #4f46e5;
  --cyan: #0891b2;
  --glass: rgba(255, 255, 255, 0.78);
  --glass-2: rgba(255, 255, 255, 0.55);
  --line: rgba(109, 40, 217, 0.18);
  --danger: #e11d48;
  --ok: #059669;
  --topbar: rgba(255, 255, 255, 0.82);
  --card: linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(243, 238, 255, 0.88));
  --menu: rgba(255, 255, 255, 0.98);
  --input: rgba(255, 255, 255, 0.9);
  --shadow: 0 18px 50px rgba(76, 29, 149, 0.12);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  font-family: var(--font-body);
  background: var(--bg0);
  -webkit-font-smoothing: antialiased;
}

body { min-height: 100dvh; overflow-x: hidden; }

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 10% -10%, rgba(124, 58, 237, 0.38), transparent 55%),
    radial-gradient(900px 600px at 95% 5%, rgba(34, 211, 238, 0.18), transparent 50%),
    radial-gradient(800px 500px at 50% 110%, rgba(232, 121, 249, 0.16), transparent 55%),
    linear-gradient(165deg, #050510, #0a071c 45%, #07101c);
}

body:has(#landing-view:not(.hidden)) .bg {
  background:
    radial-gradient(900px 520px at 50% -8%, rgba(99, 102, 241, 0.42), transparent 58%),
    radial-gradient(700px 480px at 8% 30%, rgba(168, 85, 247, 0.28), transparent 55%),
    radial-gradient(760px 520px at 92% 22%, rgba(34, 211, 238, 0.22), transparent 52%),
    radial-gradient(900px 420px at 50% 108%, rgba(14, 165, 233, 0.18), transparent 55%),
    linear-gradient(180deg, #02010a 0%, #07051a 42%, #041018 100%);
}

body:has(#landing-view:not(.hidden)) .orb {
  opacity: 0;
  visibility: hidden;
}

html[data-theme="light"] .bg {
  background:
    radial-gradient(1200px 700px at 10% -10%, rgba(167, 139, 250, 0.35), transparent 55%),
    radial-gradient(900px 600px at 95% 5%, rgba(34, 211, 238, 0.18), transparent 50%),
    radial-gradient(800px 500px at 50% 110%, rgba(244, 114, 182, 0.14), transparent 55%),
    linear-gradient(165deg, #f7f4ff, #ebe4ff 45%, #e8f7fb);
}

html[data-theme="light"] .orb-a { background: #a78bfa; opacity: 0.28; }
html[data-theme="light"] .orb-b { background: #67e8f9; opacity: 0.22; }

.orb {
  position: fixed;
  z-index: 0;
  width: 42vw;
  height: 42vw;
  max-width: 520px;
  max-height: 520px;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.35;
  pointer-events: none;
  animation: float 14s ease-in-out infinite alternate;
}

.orb-a {
  top: 8%;
  left: -8%;
  background: #7c3aed;
}

.orb-b {
  right: -10%;
  bottom: 10%;
  background: #0891b2;
  animation-delay: -4s;
}

@keyframes float {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(4%, 6%, 0) scale(1.08); }
}

.hidden { display: none !important; }

#app {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.auth-shell {
  position: relative;
  isolation: isolate;
  flex: 1;
  display: grid;
  place-items: center;
  padding: clamp(1.25rem, 4vw, 2.5rem) 1.1rem 2.5rem;
  overflow: hidden;
}

/* —— Auth FX 2026: mesh + aurora + URL nodes —— */
.auth-fx {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.auth-mesh {
  position: absolute;
  inset: -25%;
  background:
    radial-gradient(38% 36% at 18% 28%, rgba(139, 92, 246, 0.55), transparent 70%),
    radial-gradient(42% 40% at 82% 18%, rgba(34, 211, 238, 0.42), transparent 68%),
    radial-gradient(44% 42% at 72% 82%, rgba(232, 121, 249, 0.32), transparent 70%),
    radial-gradient(36% 34% at 22% 88%, rgba(99, 102, 241, 0.38), transparent 68%),
    radial-gradient(30% 28% at 50% 50%, rgba(14, 165, 233, 0.18), transparent 72%);
  filter: saturate(145%) blur(2px);
  /* static — no drift */
}

.auth-aurora {
  position: absolute;
  inset: -10%;
  background:
    conic-gradient(from 120deg at 50% 45%,
      transparent 0deg,
      rgba(34, 211, 238, 0.12) 60deg,
      transparent 120deg,
      rgba(167, 139, 250, 0.16) 200deg,
      transparent 280deg,
      rgba(244, 114, 182, 0.1) 320deg,
      transparent 360deg);
  opacity: 0.85;
  mix-blend-mode: screen;
}

.auth-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(167, 139, 250, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%);
  opacity: 0.55;
}

.auth-beam {
  position: absolute;
  width: 55vmax;
  height: 55vmax;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.45;
}

.auth-beam-a {
  top: -18%;
  left: -12%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.55), transparent 62%);
}

.auth-beam-b {
  right: -16%;
  bottom: -20%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.48), transparent 62%);
}

.auth-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(167, 139, 250, 0.18);
  box-shadow: 0 0 40px rgba(34, 211, 238, 0.08) inset;
}

.auth-ring-a {
  width: min(520px, 78vw);
  height: min(520px, 78vw);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -52%);
  opacity: 0.5;
}

.auth-ring-b {
  width: min(340px, 58vw);
  height: min(340px, 58vw);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -52%);
  border-color: rgba(34, 211, 238, 0.14);
  opacity: 0.45;
}

.auth-nodes {
  position: absolute;
  inset: 0;
}

.auth-node {
  position: absolute;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font: 700 0.68rem/1 var(--font-display);
  letter-spacing: 0.04em;
  color: rgba(226, 232, 255, 0.72);
  background: rgba(20, 16, 42, 0.42);
  border: 1px solid rgba(167, 139, 250, 0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.auth-node.n1 { top: 12%; left: 8%; }
.auth-node.n2 { top: 18%; right: 10%; color: #a5f3fc; border-color: rgba(34, 211, 238, 0.3); }
.auth-node.n4 { top: 42%; right: 6%; font-size: 0.9rem; padding: 0.4rem 0.55rem; }
.auth-node.n5 { bottom: 14%; right: 16%; }

html[data-theme="light"] .auth-mesh {
  filter: saturate(120%) blur(2px) brightness(1.15);
  opacity: 0.85;
}
html[data-theme="light"] .auth-aurora { opacity: 0.45; mix-blend-mode: multiply; }
html[data-theme="light"] .auth-node {
  color: #4c1d95;
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(109, 40, 217, 0.18);
}

.auth-wrap {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  animation: auth-rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes auth-rise {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .auth-wrap { animation: none; }
}

.brand-lockup {
  text-align: center;
  margin-bottom: 1.4rem;
}

.auth-brand-inline {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.15rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(167, 139, 250, 0.16);
}

.auth-brand-text {
  min-width: 0;
  text-align: left;
}

.auth-title {
  font-size: clamp(1.85rem, 6vw, 2.35rem) !important;
  line-height: 1;
}

.auth-sheep {
  width: 52px;
  flex: 0 0 auto;
  pointer-events: none;
}

.sheep-static,
.sheep-static .sheep-mascot,
.auth-sheep .sheep-mascot {
  pointer-events: none !important;
  touch-action: none;
  transform: none !important;
  transition: none !important;
  will-change: auto;
}

.brand-tagline {
  margin: 0.45rem auto 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  max-width: 22rem;
}

.brand-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.brand-row.hero {
  gap: 0.65rem;
  margin-bottom: 0.55rem;
}

.sheep-mascot-wrap {
  position: relative;
  flex: 0 0 auto;
  width: clamp(52px, 12vw, 72px);
  aspect-ratio: 520 / 486;
  display: grid;
  place-items: center;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  isolation: isolate;
}

.sheep-mascot-wrap::before {
  content: "";
  position: absolute;
  inset: -4% -2%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 48% 42%, rgba(94, 234, 212, 0.38), transparent 58%),
    radial-gradient(circle at 55% 72%, rgba(167, 139, 250, 0.22), transparent 65%);
  filter: blur(14px);
  z-index: 0;
  transform: scale(1.05);
  pointer-events: none;
}

.sheep-mascot {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  pointer-events: auto;
  touch-action: pan-y;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  filter:
    drop-shadow(0 10px 22px rgba(0, 0, 0, 0.5))
    drop-shadow(0 0 18px rgba(94, 234, 212, 0.22));
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), filter 0.35s ease;
  will-change: transform;
}

@media (pointer: coarse) {
  .sheep-mascot {
    transition: none;
    transform: translate3d(0, 0, 0);
  }
}

@media (hover: hover) and (pointer: fine) {
  .brand-row:hover .sheep-mascot:not(.sheep-static) {
    transform: translateY(-5px) rotate(-2deg) scale(1.05);
    filter:
      drop-shadow(0 14px 28px rgba(0, 0, 0, 0.55))
      drop-shadow(0 0 26px rgba(94, 234, 212, 0.32));
  }
}

@media (max-width: 480px) {
  .sheep-mascot-wrap {
    width: clamp(46px, 14vw, 60px);
  }
}

.brand-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  background: linear-gradient(110deg, #fff 8%, #c4b5fd 48%, #67e8f9 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Light: same violet→cyan glow as before, but U starts violet (not white) for contrast */
html[data-theme="light"] .brand-title {
  background: linear-gradient(110deg, #7c3aed 6%, #c4b5fd 48%, #67e8f9 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html[data-theme="light"] .hero-center .brand-title {
  background: linear-gradient(110deg, #8b5cf6 4%, #c4b5fd 46%, #67e8f9 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-sub {
  margin: 0.35rem auto 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1.35;
  max-width: 26rem;
}

.auth-brand-text .brand-sub {
  margin: 0.2rem 0 0;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 650;
  color: #c4b5fd;
  letter-spacing: 0.01em;
}

html[data-theme="light"] .auth-brand-text .brand-sub {
  color: #6d28d9;
}

.auth-card,
.auth-liquid {
  position: relative;
  padding: 1.45rem 1.35rem 1.2rem;
  border-radius: 28px;
  background: color-mix(in srgb, rgba(18, 14, 40, 0.72) 70%, transparent);
  background: rgba(18, 14, 40, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  box-shadow:
    0 40px 80px -28px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 0 0 1px rgba(167, 139, 250, 0.08);
  overflow: hidden;
}

.auth-liquid::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 42%),
    radial-gradient(420px 220px at 90% -10%, rgba(34, 211, 238, 0.18), transparent 60%);
  pointer-events: none;
}

.auth-border-glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(167, 139, 250, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

html[data-theme="light"] .auth-liquid {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow:
    0 28px 60px -20px rgba(76, 29, 149, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.auth-card-head {
  position: relative;
  text-align: left;
  margin-bottom: 1rem;
}

.auth-eyebrow {
  margin: 0 0 0.3rem;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
}

.auth-heading {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 4vw, 1.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}

.auth-lead {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

body:has(#auth-view:not(.hidden)) .orb {
  opacity: 0.22;
  animation: none;
}

@media (max-width: 420px) {
  .auth-node.n4 { display: none; }
}

.auth-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.45rem;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 550;
  text-align: center;
}

.auth-switch-btn {
  border: 0;
  background: none;
  padding: 0;
  color: var(--cyan);
  font: 750 0.86rem var(--font-body);
  cursor: pointer;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.auth-switch-btn:hover {
  color: #a5f3fc;
  border-bottom-color: rgba(34, 211, 238, 0.45);
}

html[data-theme="light"] .auth-switch-btn {
  color: #6d28d9;
}

html[data-theme="light"] .auth-switch-btn:hover {
  color: #5b21b6;
  border-bottom-color: rgba(109, 40, 217, 0.35);
}

.auth-form { position: relative; }

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.95rem;
}

.field label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.field input,
.add-bar input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.92rem 1.05rem;
  background: var(--input);
  color: var(--text);
  font: 500 1rem / 1.3 var(--font-body);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.auth-form .field input {
  background: rgba(7, 6, 22, 0.55);
  border-color: rgba(167, 139, 250, 0.22);
}

html[data-theme="light"] .auth-form .field input {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(109, 40, 217, 0.16);
}

.remember-device {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.15rem 0 0.2rem;
  color: var(--text);
  font: 650 0.86rem var(--font-body);
  cursor: pointer;
  user-select: none;
}

.remember-device input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: #8b5cf6;
  cursor: pointer;
  flex: 0 0 auto;
}

.remember-hint {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

html[data-theme="light"] .remember-hint {
  color: #5b21b6;
}

.otp-input {
  text-align: center;
  letter-spacing: 0.42em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem !important;
  padding-left: 1.2rem !important;
}

.btn-block { width: 100%; margin-top: 0.55rem; }

.btn-danger-solid {
  color: #fff;
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  box-shadow: 0 10px 24px rgba(225, 29, 72, 0.28);
}

.twofa-hint,
.modal-copy {
  margin: 0 0 0.9rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.twofa-panel {
  text-align: center;
}

.twofa-badge {
  width: 52px;
  height: 52px;
  margin: 0.15rem auto 0.85rem;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #a5f3fc;
  background: linear-gradient(145deg, rgba(34, 211, 238, 0.18), rgba(139, 92, 246, 0.16));
  border: 1px solid rgba(34, 211, 238, 0.3);
  box-shadow: 0 10px 24px rgba(8, 145, 178, 0.18);
}

.twofa-badge svg {
  width: 24px;
  height: 24px;
}

.twofa-panel .twofa-hint {
  text-align: center;
  margin-bottom: 1rem;
}

.twofa-panel .field {
  text-align: left;
}

.field input:focus,
.add-bar input:focus {
  border-color: rgba(167, 139, 250, 0.65);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.22);
}

.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 4.4rem; }

.pw-toggle {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  padding: 0.35rem 0.55rem;
  background: rgba(139, 92, 246, 0.22);
  color: #c4b5fd;
  font: 700 0.68rem/1 var(--font-display);
  letter-spacing: 0.04em;
  cursor: pointer;
}

.pw-toggle-url {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.32rem 0.5rem 0.32rem 0.38rem;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.28), rgba(34, 211, 238, 0.18));
  border: 1px solid rgba(167, 139, 250, 0.35);
  color: #e9e4ff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.pw-toggle-url:hover {
  transform: translateY(-50%) scale(1.03);
  box-shadow: 0 6px 18px rgba(34, 211, 238, 0.22);
}

.pw-toggle-url .pw-link-icon {
  width: 14px;
  height: 14px;
  display: block;
}

.pw-toggle-url .pw-link-cut {
  opacity: 1;
  transition: opacity 0.15s ease;
}

.pw-toggle-url.is-shown {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.28), rgba(139, 92, 246, 0.22));
  border-color: rgba(34, 211, 238, 0.45);
  color: #a5f3fc;
}

.pw-toggle-url.is-shown .pw-link-cut {
  opacity: 0;
}

.pw-toggle-label {
  font: 800 0.62rem/1 var(--font-display);
  letter-spacing: 0.06em;
}

html[data-theme="light"] .pw-toggle-url {
  color: #5b21b6;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(8, 145, 178, 0.1));
  border-color: rgba(109, 40, 217, 0.22);
}

html[data-theme="light"] .pw-toggle-url.is-shown {
  color: #0f766e;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 0.82rem 1.2rem;
  font: 700 0.92rem var(--font-body);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.18s ease, opacity 0.15s, background 0.15s;
}

.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: translateY(1px) scale(0.99); }

.btn-primary {
  width: 100%;
  margin-top: 0.2rem;
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #4f46e5 50%, #06b6d4);
  box-shadow: 0 12px 28px rgba(99, 102, 241, 0.38);
}

.auth-cta {
  margin-top: 0.35rem;
  padding: 0.95rem 1.2rem;
  border-radius: 16px;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  box-shadow:
    0 14px 32px rgba(99, 102, 241, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 16px 34px rgba(99, 102, 241, 0.5);
}

.auth-cta:hover:not(:disabled) {
  box-shadow:
    0 18px 40px rgba(99, 102, 241, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.btn-compact {
  width: auto;
  margin: 0;
  padding: 0.72rem 1.15rem;
  font-size: 0.88rem;
  white-space: nowrap;
}

.btn-soft {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.55rem 0.95rem;
  font-size: 0.8rem;
  font-weight: 650;
}

.btn-soft:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-text {
  border: 0;
  background: none;
  color: #c4b5fd;
  font: 650 0.78rem var(--font-body);
  cursor: pointer;
  padding: 0;
}

.form-msg {
  min-height: 1.15rem;
  margin: 0.65rem 0 0;
  font-size: 0.84rem;
  color: var(--danger);
  text-align: center;
}

.form-msg.is-ok {
  color: var(--ok);
}

.form-msg.is-error {
  color: var(--danger);
}

/* /verificar: mensaje arriba del botón, sin sombra encima del texto en móvil */
.verify-shell {
  overflow: auto;
  padding-bottom: max(2.5rem, env(safe-area-inset-bottom, 0px));
}

.verify-card {
  overflow: visible;
  padding-bottom: 1.45rem;
}

.verify-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.85rem;
  margin-top: 0.35rem;
  position: relative;
  z-index: 1;
}

.verify-msg {
  margin: 0;
  min-height: 0;
  line-height: 1.4;
  word-break: break-word;
}

.verify-go {
  display: block;
  width: 100%;
  margin-top: 0;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.28);
}

@media (max-width: 480px) {
  .verify-actions {
    gap: 1rem;
  }

  .verify-go {
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.24);
  }
}

.auth-note {
  margin: 0.55rem 0 0;
  text-align: center;
  font-size: 0.72rem;
  color: rgba(155, 143, 196, 0.75);
}

.auth-card .legal-accept {
  margin-top: 0.35rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(167, 139, 250, 0.14);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  background: var(--topbar);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.topbar-spacer { flex: 1; min-width: 0; }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
}

.user-wrap { position: relative; }

.user-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.16);
  border: 1px solid rgba(167, 139, 250, 0.28);
  font-size: 0.78rem;
  font-weight: 700;
  color: #c4b5fd;
  cursor: pointer;
  font-family: var(--font-body);
}

html[data-theme="light"] .user-pill {
  color: #5b21b6;
  background: rgba(124, 58, 237, 0.1);
}

.user-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(260px, calc(100vw - 1.4rem));
  padding: 0.7rem;
  border-radius: 16px;
  background: var(--menu);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  z-index: 55;
}

.user-menu-label {
  margin: 0 0 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.user-menu-label + .user-menu-item {
  margin-top: 0;
}

.theme-seg + .user-menu-label {
  margin-top: 0.55rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--line);
}

.theme-seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.25rem;
  padding: 0.22rem;
  margin-bottom: 0.55rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
}

html[data-theme="light"] .theme-seg {
  background: rgba(109, 40, 217, 0.08);
}

.theme-opt {
  border: 0;
  border-radius: 999px;
  padding: 0.42rem 0.2rem;
  background: transparent;
  color: var(--muted);
  font: 700 0.72rem var(--font-body);
  cursor: pointer;
}

.theme-opt.active {
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #4f46e5);
}

.user-menu-item {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 0.62rem 0.55rem;
  font: 650 0.84rem var(--font-body);
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
}

.user-menu-item:hover {
  background: rgba(139, 92, 246, 0.12);
}

.user-menu-item.danger { color: var(--danger); }

.user-menu-item.admin-only {
  color: #67e8f9;
  font-weight: 700;
}

html[data-theme="light"] .user-menu-item.admin-only {
  color: #0e7490;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(4, 4, 16, 0.55);
  backdrop-filter: blur(8px);
}

.modal-card {
  width: min(100%, 400px);
  padding: 1.2rem;
  border-radius: 20px;
  background: var(--menu);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.modal-card-wide {
  width: min(100%, 480px);
}

.sessions-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.75rem;
}

.sessions-live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ok);
}

.sessions-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55);
  animation: sessions-pulse 1.4s ease-out infinite;
}

@keyframes sessions-pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.sessions-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: min(50vh, 360px);
  overflow: auto;
  margin-bottom: 0.5rem;
}

.session-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.75rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.session-row.is-current {
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.08);
}

.session-meta {
  min-width: 0;
  flex: 1;
}

.session-label {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}

.session-sub {
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  color: var(--muted);
  word-break: break-all;
}

.session-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #052e1a;
  background: #34d399;
  vertical-align: middle;
}

.session-row .btn-compact {
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
  .sessions-dot {
    animation: none;
  }
}

.modal-card h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.modal-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.modal-card-head h3 {
  margin: 0;
  flex: 1;
}

.modal-x {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.14);
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.modal-x:hover {
  background: rgba(251, 113, 133, 0.22);
  color: #fb7185;
}

.hidden-disable-panel .modal-actions {
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.hidden-disable-panel .modal-actions .btn-danger-solid {
  flex: 1 1 auto;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.twofa-qr {
  display: block;
  width: 220px;
  max-width: 100%;
  height: auto;
  margin: 0 auto 0.75rem;
  border-radius: 14px;
  background: #fff;
  padding: 8px;
}

.twofa-secret {
  text-align: center;
  font-size: 0.72rem;
  word-break: break-all;
  color: var(--muted);
  margin: 0 0 0.85rem;
  font-family: ui-monospace, monospace;
}

.bell-wrap { position: relative; z-index: 30; }

.notif-bell {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.1), transparent 50%),
    rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.notif-bell:hover {
  border-color: rgba(94, 234, 212, 0.45);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.12);
  transform: translateY(-1px);
}

.notif-bell:focus-visible {
  outline: none;
  border-color: rgba(94, 234, 212, 0.55);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.2);
}

.notif-bell svg {
  width: 20px;
  height: 20px;
  display: block;
}

.notif-bell .bell-body { fill: currentColor; opacity: 0.92; }
.notif-bell .bell-clapper {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 1.8;
  stroke-linecap: round;
}
.notif-bell .bell-shine { stroke: rgba(255, 255, 255, 0.45); }

html[data-theme="light"] .notif-bell {
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.9), transparent 55%),
    rgba(255, 255, 255, 0.75);
  border-color: rgba(109, 40, 217, 0.18);
}

html[data-theme="light"] .notif-bell .bell-clapper { stroke: #0f766e; }

.bell-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font: 800 0.62rem/1 var(--font-body);
  color: #042f2e;
  background: linear-gradient(135deg, #5eead4, #67e8f9);
  box-shadow: 0 4px 12px rgba(45, 212, 191, 0.35);
}

.notif-bell.is-nudge {
  animation: notifBellNudge 0.9s cubic-bezier(0.22, 1, 0.36, 1) 2;
  border-color: rgba(94, 234, 212, 0.65);
}

@keyframes notifBellNudge {
  0%, 100% { transform: rotate(0) scale(1); }
  20% { transform: rotate(-14deg) scale(1.06); }
  40% { transform: rotate(12deg) scale(1.04); }
  60% { transform: rotate(-8deg) scale(1.05); }
  80% { transform: rotate(6deg) scale(1.02); }
}

@media (prefers-reduced-motion: reduce) {
  .notif-bell.is-nudge { animation: none; }
}

.notif-panel {
  position: fixed;
  z-index: 70;
  top: calc(env(safe-area-inset-top, 0px) + 4.35rem);
  right: max(0.75rem, env(safe-area-inset-right));
  left: auto;
  width: min(340px, calc(100vw - 1.5rem));
  max-height: min(70dvh, 440px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 18px;
  background: var(--menu);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

@media (max-width: 640px) {
  .notif-panel {
    left: max(0.75rem, env(safe-area-inset-left));
    right: max(0.75rem, env(safe-area-inset-right));
    width: auto;
    max-height: min(72dvh, 520px);
  }
}

.notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--menu);
}

.notif-list { padding: 0.4rem; }

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 0.55rem 0.5rem;
  border-radius: 12px;
  margin-bottom: 0.15rem;
}

.notif-item.unread { background: rgba(139, 92, 246, 0.14); }

.notif-body { flex: 1; min-width: 0; }

.notif-body p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.35;
}

.notif-body time {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.64rem;
  color: var(--muted);
}

.notif-del {
  border: 0;
  background: transparent;
  color: var(--danger);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0.15rem;
  opacity: 0.75;
}

.notif-empty {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 1.15rem 0.75rem;
  margin: 0;
}

.main {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 1.25rem 1rem 3.2rem;
  flex: 1;
}

.hero-center {
  text-align: center;
  margin: 0.55rem 0 1.35rem;
}

.hero-center .brand-title {
  font-size: clamp(2.2rem, 7vw, 3.2rem);
}

.tile-deal {
  cursor: pointer;
}

.tile-deal .tile-menu {
  display: none !important;
}

.deal-pin {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 4;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
}

.deal-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font: 800 1rem var(--font-display);
  line-height: 1;
}

.tile-deal-surfshark {
  border-color: rgba(30, 191, 191, 0.45);
  background: linear-gradient(160deg, rgba(30, 191, 191, 0.16), var(--card));
}

.tile-deal-surfshark .deal-icon {
  background: linear-gradient(180deg, #28d0d0, #1EBFBF);
  color: #0a1a1a;
}

.tile-deal-proton {
  border-color: rgba(109, 74, 255, 0.45);
  background: linear-gradient(160deg, rgba(109, 74, 255, 0.18), var(--card));
}

.tile-deal-proton .deal-icon {
  background: linear-gradient(180deg, #7d5fff, #6D4AFF);
  color: #fff;
}

.tile-deal-starlink {
  border-color: rgba(255, 255, 255, 0.18);
  background: linear-gradient(160deg, rgba(0, 0, 0, 0.35), var(--card));
}

.tile-deal-starlink .deal-icon {
  background: linear-gradient(180deg, #1a1a1a, #000);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

html[data-theme="light"] .tile-deal-starlink {
  border-color: rgba(0, 0, 0, 0.2);
  background: linear-gradient(160deg, rgba(15, 15, 15, 0.08), var(--card));
}

.tile-deal-default {
  border-color: rgba(167, 139, 250, 0.4);
  background: linear-gradient(160deg, rgba(139, 92, 246, 0.16), var(--card));
}

.tile-deal-default .deal-icon {
  background: linear-gradient(135deg, #8b5cf6, #4f46e5);
  color: #fff;
}

/* Oferta sin color: misma tarjeta neutra del escritorio */
.tile-deal-plain {
  background: var(--card);
  border-color: var(--line);
}

.tile-deal-plain .deal-icon {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

/* Ofertas con color: sólido en oscuro, tinte suave en claro */
.tile-deal-custom {
  border-color: rgba(0, 0, 0, 0.35) !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.tile-deal-custom .tile-label,
.tile-deal-custom .tile-host {
  color: #fff !important;
}

.tile-deal-custom .tile-host {
  opacity: 0.82;
}

.tile-deal-custom .deal-icon {
  background: rgba(0, 0, 0, 0.28) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.tile-deal-custom .deal-pin {
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
}

.offer-color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

/* span (no button): evita el gris del UA en Windows/Chrome oscuro */
.offer-swatch {
  display: inline-block;
  box-sizing: border-box;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 0;
  margin: 0;
  flex: 0 0 auto;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.28),
    0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Colores fijos (CSP bloquea style="" y CSSOM) — shorthand background */
.offer-c-none {
  background:
    linear-gradient(45deg, #94a3b8 25%, transparent 25%) 0 0 / 8px 8px,
    linear-gradient(-45deg, #94a3b8 25%, transparent 25%) 0 4px / 8px 8px,
    linear-gradient(45deg, transparent 75%, #94a3b8 75%) 4px -4px / 8px 8px,
    linear-gradient(-45deg, transparent 75%, #94a3b8 75%) -4px 0 / 8px 8px,
    #e2e8f0 !important;
}
html[data-theme="dark"] .offer-c-none {
  background:
    linear-gradient(45deg, #475569 25%, transparent 25%) 0 0 / 8px 8px,
    linear-gradient(-45deg, #475569 25%, transparent 25%) 0 4px / 8px 8px,
    linear-gradient(45deg, transparent 75%, #475569 75%) 4px -4px / 8px 8px,
    linear-gradient(-45deg, transparent 75%, #475569 75%) -4px 0 / 8px 8px,
    #1e293b !important;
}
.offer-c-334155 { background: #334155 !important; }
.offer-c-1d4ed8 { background: #1d4ed8 !important; }
.offer-c-0e7490 { background: #0e7490 !important; }
.offer-c-0f766e { background: #0f766e !important; }
.offer-c-15803d { background: #15803d !important; }
.offer-c-ca8a04 { background: #ca8a04 !important; }
.offer-c-b45309 { background: #b45309 !important; }
.offer-c-c2410c { background: #c2410c !important; }
.offer-c-b91c1c { background: #b91c1c !important; }
.offer-c-be123c { background: #be123c !important; }
.offer-c-6d28d9 { background: #6d28d9 !important; }
.offer-c-4338ca { background: #4338ca !important; }
.offer-c-171717 { background: #171717 !important; }

/* Ofertas en claro: tinte suave por color (sin variables CSSOM) */
html[data-theme="light"] .tile-deal-custom.offer-c-334155 { background: color-mix(in srgb, #334155 34%, #fff) !important; border-color: color-mix(in srgb, #334155 55%, #cbd5e1) !important; }
html[data-theme="light"] .tile-deal-custom.offer-c-1d4ed8 { background: color-mix(in srgb, #1d4ed8 34%, #fff) !important; border-color: color-mix(in srgb, #1d4ed8 55%, #cbd5e1) !important; }
html[data-theme="light"] .tile-deal-custom.offer-c-0e7490 { background: color-mix(in srgb, #0e7490 34%, #fff) !important; border-color: color-mix(in srgb, #0e7490 55%, #cbd5e1) !important; }
html[data-theme="light"] .tile-deal-custom.offer-c-0f766e { background: color-mix(in srgb, #0f766e 34%, #fff) !important; border-color: color-mix(in srgb, #0f766e 55%, #cbd5e1) !important; }
html[data-theme="light"] .tile-deal-custom.offer-c-15803d { background: color-mix(in srgb, #15803d 34%, #fff) !important; border-color: color-mix(in srgb, #15803d 55%, #cbd5e1) !important; }
html[data-theme="light"] .tile-deal-custom.offer-c-ca8a04 { background: color-mix(in srgb, #ca8a04 34%, #fff) !important; border-color: color-mix(in srgb, #ca8a04 55%, #cbd5e1) !important; }
html[data-theme="light"] .tile-deal-custom.offer-c-b45309 { background: color-mix(in srgb, #b45309 34%, #fff) !important; border-color: color-mix(in srgb, #b45309 55%, #cbd5e1) !important; }
html[data-theme="light"] .tile-deal-custom.offer-c-c2410c { background: color-mix(in srgb, #c2410c 34%, #fff) !important; border-color: color-mix(in srgb, #c2410c 55%, #cbd5e1) !important; }
html[data-theme="light"] .tile-deal-custom.offer-c-b91c1c { background: color-mix(in srgb, #b91c1c 34%, #fff) !important; border-color: color-mix(in srgb, #b91c1c 55%, #cbd5e1) !important; }
html[data-theme="light"] .tile-deal-custom.offer-c-be123c { background: color-mix(in srgb, #be123c 34%, #fff) !important; border-color: color-mix(in srgb, #be123c 55%, #cbd5e1) !important; }
html[data-theme="light"] .tile-deal-custom.offer-c-6d28d9 { background: color-mix(in srgb, #6d28d9 34%, #fff) !important; border-color: color-mix(in srgb, #6d28d9 55%, #cbd5e1) !important; }
html[data-theme="light"] .tile-deal-custom.offer-c-4338ca { background: color-mix(in srgb, #4338ca 34%, #fff) !important; border-color: color-mix(in srgb, #4338ca 55%, #cbd5e1) !important; }
html[data-theme="light"] .tile-deal-custom.offer-c-171717 { background: color-mix(in srgb, #171717 28%, #fff) !important; border-color: color-mix(in srgb, #171717 45%, #cbd5e1) !important; }

html[data-theme="light"] .tile-deal-custom .tile-label {
  color: #0f172a !important;
}

html[data-theme="light"] .tile-deal-custom .tile-host {
  color: #475569 !important;
  opacity: 1;
}

html[data-theme="light"] .tile-deal-custom .deal-icon {
  color: #fff !important;
  border-color: rgba(15, 23, 42, 0.2);
}

html[data-theme="light"] .tile-deal-custom.offer-c-334155 .deal-icon { background: #334155 !important; }
html[data-theme="light"] .tile-deal-custom.offer-c-1d4ed8 .deal-icon { background: #1d4ed8 !important; }
html[data-theme="light"] .tile-deal-custom.offer-c-0e7490 .deal-icon { background: #0e7490 !important; }
html[data-theme="light"] .tile-deal-custom.offer-c-0f766e .deal-icon { background: #0f766e !important; }
html[data-theme="light"] .tile-deal-custom.offer-c-15803d .deal-icon { background: #15803d !important; }
html[data-theme="light"] .tile-deal-custom.offer-c-ca8a04 .deal-icon { background: #ca8a04 !important; }
html[data-theme="light"] .tile-deal-custom.offer-c-b45309 .deal-icon { background: #b45309 !important; }
html[data-theme="light"] .tile-deal-custom.offer-c-c2410c .deal-icon { background: #c2410c !important; }
html[data-theme="light"] .tile-deal-custom.offer-c-b91c1c .deal-icon { background: #b91c1c !important; }
html[data-theme="light"] .tile-deal-custom.offer-c-be123c .deal-icon { background: #be123c !important; }
html[data-theme="light"] .tile-deal-custom.offer-c-6d28d9 .deal-icon { background: #6d28d9 !important; }
html[data-theme="light"] .tile-deal-custom.offer-c-4338ca .deal-icon { background: #4338ca !important; }
html[data-theme="light"] .tile-deal-custom.offer-c-171717 .deal-icon { background: #171717 !important; }

html[data-theme="light"] .tile-deal-custom .deal-pin {
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
}

html[data-theme="light"] .offer-swatch {
  border-color: rgba(15, 23, 42, 0.18);
}

.offer-swatch-sm {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 6px;
}

.offer-swatch.is-selected {
  outline: 2px solid #22d3ee;
  outline-offset: 2px;
  border-color: #22d3ee;
}

.offer-color-dot {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  margin-right: 0.4rem;
  vertical-align: middle;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.offer-row-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.45rem;
}

.field-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--muted);
}

.admin-offer-form {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.admin-offer-form .field {
  margin: 0;
}

.admin-offer-form .field label {
  display: block;
  margin-bottom: 0.28rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-offer-form input {
  width: 100%;
  box-sizing: border-box;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  padding: 0.65rem 0.8rem;
  font: 500 0.88rem var(--font-body);
}

html[data-theme="light"] .admin-offer-form input {
  background: rgba(255, 255, 255, 0.85);
}

.admin-offer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.offers-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.offer-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.7rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.14);
}

html[data-theme="light"] .offer-row {
  background: rgba(255, 255, 255, 0.7);
}

.offer-row-main {
  flex: 1;
  min-width: 0;
}

.offer-row-title {
  margin: 0;
  font: 700 0.86rem var(--font-body);
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.offer-row-url {
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.offer-row .btn-compact {
  flex-shrink: 0;
}

html[data-theme="light"] .deal-pin {
  background: rgba(15, 15, 25, 0.7);
}

.add-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 auto 1.2rem;
  width: min(560px, 100%);
  padding: 0.5rem;
  border-radius: 18px;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.add-bar input {
  flex: 1 1 180px;
  min-width: 0;
  border-radius: 14px;
  padding: 0.72rem 0.9rem;
}

.toast {
  text-align: center;
  min-height: 1rem;
  margin: -0.45rem 0 1rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.toast.error { color: var(--danger); }
.toast.ok { color: var(--ok); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 0.7rem;
  justify-content: center;
  max-width: 780px;
  margin: 0 auto;
}

.rearrange-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: min(560px, 100%);
  margin: 0 auto 1rem;
  padding: 0.65rem 0.75rem;
  border-radius: 14px;
  background: rgba(139, 92, 246, 0.16);
  border: 1px solid rgba(167, 139, 250, 0.32);
  backdrop-filter: blur(12px);
}

.hidden-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: min(560px, 100%);
  margin: 0 auto 1rem;
  padding: 0.65rem 0.75rem;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(251, 113, 133, 0.35);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.hidden-bar-text {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fecdd3;
}

body.hidden-vault-mode .brand-sub {
  color: #fb7185;
}

html[data-theme="light"] .hidden-bar {
  background: rgba(255, 241, 242, 0.95);
  border-color: rgba(225, 29, 72, 0.25);
}

html[data-theme="light"] .hidden-bar-text {
  color: #9f1239;
}

.hidden-demo {
  margin: 0 0 1rem;
  padding: 0.75rem 0.8rem 0.85rem;
  border-radius: 14px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px dashed rgba(167, 139, 250, 0.35);
}

.hidden-demo-label {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}

.hidden-demo-bar {
  width: 100%;
  max-width: none;
  margin: 0;
  pointer-events: none;
  box-shadow: none;
}

.hidden-demo-bar input {
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #f9a8d4;
}

html[data-theme="light"] .hidden-demo-bar input {
  color: #9d174d;
}

.hidden-demo-hint {
  margin: 0.55rem 0 0;
  font-size: 0.76rem;
  line-height: 1.4;
  color: var(--muted);
}

.hidden-disable-panel {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(251, 113, 133, 0.28);
}

.hidden-disable-panel .modal-copy {
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
}

.hidden-disable-panel .btn {
  width: 100%;
}

.rearrange-bar-text {
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--text);
}

.tile.is-dragging {
  opacity: 0.55;
  transform: scale(1.04);
  z-index: 45;
}

.tile.drag-over {
  border-color: rgba(34, 211, 238, 0.65);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.25);
}

body.rearrange-mode .tile:not(.tile-deal).is-jiggling {
  animation: tile-jiggle 0.28s ease-in-out infinite;
  animation-delay: calc(var(--j, 0) * 0.03s);
  touch-action: none;
  user-select: none;
}

body.rearrange-mode .tile:not(.tile-deal).is-dragging {
  animation: none;
}

body.rearrange-mode .add-bar,
body.rearrange-mode .hero-center {
  opacity: 0.55;
  pointer-events: none;
}

@keyframes tile-jiggle {
  0% { transform: rotate(-1.4deg) translateX(-0.5px); }
  50% { transform: rotate(1.4deg) translateX(0.5px); }
  100% { transform: rotate(-1.4deg) translateX(-0.5px); }
}

@media (prefers-reduced-motion: reduce) {
  body.rearrange-mode .tile:not(.tile-deal).is-jiggling {
    animation: none;
    outline: 1px dashed rgba(167, 139, 250, 0.45);
  }
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 0.85rem 0.5rem 0.65rem;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  min-height: 108px;
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
}

.tile:hover {
  border-color: rgba(167, 139, 250, 0.42);
  transform: translateY(-2px);
}

.tile.is-favorite {
  border-color: rgba(250, 204, 21, 0.45);
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.12), var(--shadow);
}

.fav-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 4;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: 0.78rem;
  line-height: 1;
  color: #fbbf24;
  background: rgba(12, 10, 28, 0.55);
  border: 1px solid rgba(250, 204, 21, 0.35);
  pointer-events: none;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.45);
}

html[data-theme="light"] .fav-badge {
  color: #b45309;
  background: rgba(255, 251, 235, 0.92);
  border-color: rgba(245, 158, 11, 0.45);
  text-shadow: none;
}

html[data-theme="light"] .tile.is-favorite {
  border-color: rgba(217, 119, 6, 0.4);
}

.tile-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px;
  flex-shrink: 0;
}

.tile-icon.fallback {
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  padding: 0;
}

.tile-label {
  margin: 0;
  width: 100%;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.25;
  color: var(--text);
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tile-host {
  margin: -0.15rem 0 0;
  width: 100%;
  text-align: center;
  font-size: 0.62rem;
  line-height: 1.2;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tile-menu {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 5;
}

/* El popover vive dentro de la tile; hay que subir toda la tile sobre las vecinas */
.tile:has(.tile-menu.open) {
  z-index: 40;
}

.tile-menu.open {
  z-index: 40;
}

.menu-btn {
  width: 28px;
  height: 28px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0.85;
  transition: background 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s, transform 0.15s;
}

.tile:hover .menu-btn,
.tile:focus-within .menu-btn,
.tile-menu.open .menu-btn {
  opacity: 1;
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.1);
}

.menu-btn:hover,
.tile-menu.open .menu-btn {
  background: rgba(139, 92, 246, 0.22);
  border-color: rgba(167, 139, 250, 0.4);
  color: #fff;
  transform: translateY(-1px);
}

html[data-theme="light"] .menu-btn {
  background: rgba(109, 40, 217, 0.06);
  color: #6b628a;
}

html[data-theme="light"] .menu-btn:hover,
html[data-theme="light"] .tile-menu.open .menu-btn {
  background: rgba(124, 58, 237, 0.12);
  color: #5b21b6;
}

@media (pointer: coarse) {
  .menu-btn {
    opacity: 1;
    width: 30px;
    height: 30px;
  }
}

.menu-dots {
  width: 16px;
  height: 16px;
  display: block;
}

.menu-pop {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 158px;
  padding: 0.35rem;
  border-radius: 14px;
  background: var(--menu);
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  z-index: 30;
  backdrop-filter: blur(12px);
}

.menu-pop.hidden { display: none !important; }

.menu-item {
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--danger);
  font: 700 0.78rem var(--font-body);
  text-align: left;
  padding: 0.62rem 0.7rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.menu-item svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.menu-item:hover {
  background: rgba(251, 113, 133, 0.14);
}

.menu-item.neutral {
  color: var(--text);
}

.menu-item.neutral:hover {
  background: rgba(139, 92, 246, 0.14);
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  margin-bottom: 0.55rem;
}

.footer-links a {
  color: var(--violet-bright, #c4b5fd);
  text-decoration: none;
  font-weight: 650;
}

.footer-links a:hover { text-decoration: underline; }

.legal-accept {
  margin: 0.85rem 0 0;
  font-size: 0.72rem;
  color: rgba(155, 143, 196, 0.85);
  text-align: center;
  line-height: 1.4;
}

.legal-accept a {
  color: #c4b5fd;
  text-decoration: none;
  font-weight: 650;
}

html[data-theme="light"] .legal-accept a { color: #5b21b6; }

.empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
  border: 1px dashed rgba(167, 139, 250, 0.22);
  border-radius: 16px;
  background: rgba(12, 8, 30, 0.28);
  font-size: 0.86rem;
}

/* Separar el empty de las ofertas/tiles cuando no hay páginas propias */
.empty:not(.hidden) {
  margin-bottom: 1.5rem;
}

.main:has(.empty:not(.hidden)) .grid {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(167, 139, 250, 0.12);
}

html[data-theme="light"] .main:has(.empty:not(.hidden)) .grid {
  border-top-color: rgba(109, 40, 217, 0.12);
}

.empty strong {
  display: block;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.footer {
  text-align: center;
  padding: 1.1rem 1rem 1.7rem;
  font-size: 0.7rem;
  color: rgba(155, 143, 196, 0.55);
}

.footer a {
  color: #c4b5fd;
  text-decoration: none;
}

/* —— Escritorio modo oscuro: aurora suave (bg/orbs visibles, baja intensidad) —— */
html[data-theme="dark"] body:has(#main-view:not(.hidden)) .bg {
  background:
    radial-gradient(1000px 580px at 10% -6%, rgba(139, 92, 246, 0.28), transparent 58%),
    radial-gradient(860px 540px at 96% 4%, rgba(34, 211, 238, 0.16), transparent 54%),
    radial-gradient(720px 480px at 80% 92%, rgba(232, 121, 249, 0.12), transparent 56%),
    radial-gradient(640px 420px at 12% 95%, rgba(99, 102, 241, 0.14), transparent 58%),
    linear-gradient(168deg, #03020c 0%, #0a061c 42%, #06101c 100%);
}

html[data-theme="dark"] body:has(#main-view:not(.hidden)) .orb-a {
  background: #8b5cf6;
  opacity: 0.28;
  filter: blur(80px);
}

html[data-theme="dark"] body:has(#main-view:not(.hidden)) .orb-b {
  background: #06b6d4;
  opacity: 0.2;
  filter: blur(80px);
}

html[data-theme="dark"] body:has(#main-view:not(.hidden)) .topbar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 70%),
    rgba(8, 6, 24, 0.72);
  border-bottom-color: rgba(186, 156, 255, 0.18);
  box-shadow:
    0 10px 36px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
}

html[data-theme="dark"] body:has(#main-view:not(.hidden)) .user-pill {
  background:
    linear-gradient(135deg, rgba(167, 139, 250, 0.22), rgba(34, 211, 238, 0.1));
  border-color: rgba(186, 156, 255, 0.36);
  color: #ddd6fe;
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.12), 0 8px 20px rgba(76, 29, 149, 0.25);
}

html[data-theme="dark"] body:has(#main-view:not(.hidden)) .notif-bell {
  border-color: rgba(167, 139, 250, 0.28);
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.14), transparent 52%),
    linear-gradient(160deg, rgba(139, 92, 246, 0.18), rgba(255, 255, 255, 0.04));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] body:has(#main-view:not(.hidden)) .notif-bell:hover {
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] body:has(#main-view:not(.hidden)) .user-menu,
html[data-theme="dark"] body:has(#main-view:not(.hidden)) .notif-panel,
html[data-theme="dark"] body:has(#main-view:not(.hidden)) .menu-pop {
  background: rgba(14, 10, 34, 0.92);
  border-color: rgba(186, 156, 255, 0.28);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(167, 139, 250, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
}

html[data-theme="dark"] body:has(#main-view:not(.hidden)) .hero-center .brand-title {
  background: linear-gradient(115deg, #f5f3ff 10%, #c4b5fd 42%, #67e8f9 88%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 8px 24px rgba(139, 92, 246, 0.35));
}

html[data-theme="dark"] body:has(#main-view:not(.hidden)) .hero-center .brand-sub {
  color: rgba(196, 181, 253, 0.78);
  letter-spacing: 0.02em;
}

html[data-theme="dark"] body:has(#main-view:not(.hidden)) .sheep-mascot-wrap::before {
  background: radial-gradient(circle, rgba(167, 139, 250, 0.45), rgba(34, 211, 238, 0.12) 48%, transparent 70%);
  opacity: 0.9;
}

html[data-theme="dark"] body:has(#main-view:not(.hidden)) .add-bar {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), transparent 42%),
    rgba(18, 12, 44, 0.68);
  border-color: rgba(186, 156, 255, 0.3);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(139, 92, 246, 0.08);
}

html[data-theme="dark"] body:has(#main-view:not(.hidden)) .add-bar input {
  background: rgba(6, 4, 18, 0.55);
  border: 1px solid rgba(167, 139, 250, 0.18);
  color: var(--text);
}

html[data-theme="dark"] body:has(#main-view:not(.hidden)) .add-bar input:focus {
  outline: none;
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.14);
}

html[data-theme="dark"] body:has(#main-view:not(.hidden)) .add-bar .btn-primary {
  box-shadow: 0 10px 28px rgba(99, 102, 241, 0.4);
}

html[data-theme="dark"] body:has(#main-view:not(.hidden)) .tile:not(.tile-deal) {
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.07), transparent 40%),
    linear-gradient(165deg, rgba(48, 34, 92, 0.72), rgba(14, 16, 40, 0.62));
  border-color: rgba(186, 156, 255, 0.22);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition:
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

html[data-theme="dark"] body:has(#main-view:not(.hidden)) .tile:not(.tile-deal):hover {
  border-color: rgba(167, 139, 250, 0.55);
  transform: translateY(-3px);
  box-shadow:
    0 18px 40px rgba(76, 29, 149, 0.35),
    0 0 0 1px rgba(167, 139, 250, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

html[data-theme="dark"] body:has(#main-view:not(.hidden)) .tile:not(.tile-deal).is-favorite {
  border-color: rgba(250, 204, 21, 0.5);
  box-shadow:
    0 0 0 1px rgba(250, 204, 21, 0.16),
    0 14px 32px rgba(0, 0, 0, 0.32),
    0 0 28px rgba(250, 204, 21, 0.08);
}

html[data-theme="dark"] body:has(#main-view:not(.hidden)) .tile:not(.tile-deal) .tile-icon {
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.14), transparent 55%),
    rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] body:has(#main-view:not(.hidden)) .tile:not(.tile-deal) .tile-label {
  color: #f3e8ff;
}

html[data-theme="dark"] body:has(#main-view:not(.hidden)) .tile:not(.tile-deal) .tile-host {
  color: rgba(167, 139, 250, 0.72);
}

/* Ofertas en oscuro: el color viene de .offer-c-* (sin --deal-bg / CSSOM) */
html[data-theme="dark"] body:has(#main-view:not(.hidden)) .tile-deal.tile-deal-custom .tile-label,
html[data-theme="dark"] body:has(#main-view:not(.hidden)) .tile-deal.tile-deal-custom .tile-host {
  color: #fff !important;
}

html[data-theme="dark"] body:has(#main-view:not(.hidden)) .tile-deal.tile-deal-custom .deal-icon {
  background: rgba(0, 0, 0, 0.32) !important;
  color: #fff !important;
}

html[data-theme="dark"] body:has(#main-view:not(.hidden)) .empty {
  background:
    linear-gradient(160deg, rgba(139, 92, 246, 0.1), rgba(12, 8, 30, 0.35));
  border-color: rgba(167, 139, 250, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] body:has(#main-view:not(.hidden)) .footer {
  color: rgba(167, 139, 250, 0.48);
}

html[data-theme="dark"] body:has(#main-view:not(.hidden)) .footer a,
html[data-theme="dark"] body:has(#main-view:not(.hidden)) .footer-links a {
  color: #c4b5fd;
}

@media (prefers-reduced-motion: reduce) {
  html[data-theme="dark"] body:has(#main-view:not(.hidden)) .tile,
  html[data-theme="dark"] body:has(#main-view:not(.hidden)) .tile:hover {
    transition: none;
    transform: none;
  }
}

* {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}
*:hover {
  scrollbar-color: rgba(167, 139, 250, 0.3) transparent;
}

.land {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* —— Landing portal FX: futuristic void + grid + aurora —— */
.land-fx {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.land-void {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 55% at 50% 18%, rgba(99, 102, 241, 0.22), transparent 60%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(6, 182, 212, 0.14), transparent 55%),
    linear-gradient(180deg, rgba(2, 1, 10, 0.2), rgba(2, 1, 10, 0.55));
}

.land-aurora {
  position: absolute;
  inset: -20%;
  background:
    conic-gradient(
      from 0deg at 50% 40%,
      transparent 0deg,
      rgba(56, 189, 248, 0.14) 40deg,
      transparent 90deg,
      rgba(168, 85, 247, 0.18) 150deg,
      transparent 210deg,
      rgba(236, 72, 153, 0.1) 270deg,
      transparent 320deg,
      rgba(34, 211, 238, 0.12) 350deg,
      transparent 360deg
    );
  mix-blend-mode: screen;
  opacity: 0.9;
  animation: land-spin 48s linear infinite;
}

.land-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 8% 12%, rgba(255, 255, 255, 0.85), transparent),
    radial-gradient(1.5px 1.5px at 22% 28%, rgba(199, 210, 254, 0.7), transparent),
    radial-gradient(1px 1px at 36% 8%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1.5px 1.5px at 48% 22%, rgba(165, 243, 252, 0.75), transparent),
    radial-gradient(1px 1px at 62% 14%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(2px 2px at 78% 18%, rgba(196, 181, 253, 0.8), transparent),
    radial-gradient(1px 1px at 88% 32%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1.5px 1.5px at 14% 48%, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(1px 1px at 30% 58%, rgba(165, 243, 252, 0.5), transparent),
    radial-gradient(1.5px 1.5px at 70% 46%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1px 1px at 92% 55%, rgba(196, 181, 253, 0.45), transparent),
    radial-gradient(1px 1px at 54% 38%, rgba(255, 255, 255, 0.4), transparent);
  opacity: 0.85;
  animation: land-twinkle 6s ease-in-out infinite alternate;
}

.land-nebula {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  mix-blend-mode: screen;
}

.land-nebula-a {
  width: min(58vw, 520px);
  height: min(58vw, 520px);
  top: -8%;
  left: -12%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.7), transparent 68%);
  animation: land-drift-a 18s ease-in-out infinite alternate;
}

.land-nebula-b {
  width: min(48vw, 440px);
  height: min(48vw, 440px);
  top: 6%;
  right: -10%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.55), transparent 68%);
  animation: land-drift-b 22s ease-in-out infinite alternate;
}

.land-nebula-c {
  width: min(70vw, 620px);
  height: min(42vw, 360px);
  left: 50%;
  bottom: 4%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(99, 102, 241, 0.45), transparent 70%);
  animation: land-pulse 10s ease-in-out infinite alternate;
}

.land-grid-floor {
  position: absolute;
  left: -20%;
  right: -20%;
  bottom: -18%;
  height: 58%;
  background-image:
    linear-gradient(rgba(103, 232, 249, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(167, 139, 250, 0.16) 1px, transparent 1px);
  background-size: 54px 54px;
  transform: perspective(520px) rotateX(62deg);
  transform-origin: center top;
  mask-image: linear-gradient(180deg, transparent 0%, #000 28%, #000 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 28%, #000 70%, transparent 100%);
  opacity: 0.55;
  animation: land-grid-scroll 28s linear infinite;
}

.land-horizon {
  position: absolute;
  left: 50%;
  bottom: 28%;
  width: min(920px, 120vw);
  height: 2px;
  transform: translateX(-50%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(34, 211, 238, 0.15) 15%,
    rgba(167, 139, 250, 0.85) 50%,
    rgba(34, 211, 238, 0.15) 85%,
    transparent
  );
  box-shadow:
    0 0 24px rgba(34, 211, 238, 0.55),
    0 0 60px rgba(139, 92, 246, 0.35),
    0 -40px 80px rgba(99, 102, 241, 0.18);
}

.land-ring {
  position: absolute;
  left: 50%;
  top: 42%;
  border-radius: 50%;
  border: 1px solid rgba(167, 139, 250, 0.2);
  transform: translate(-50%, -50%);
  box-shadow:
    0 0 40px rgba(34, 211, 238, 0.08) inset,
    0 0 50px rgba(139, 92, 246, 0.08);
}

.land-ring-a {
  width: min(640px, 88vw);
  height: min(640px, 88vw);
  opacity: 0.45;
  animation: land-ring-spin 60s linear infinite;
}

.land-ring-b {
  width: min(420px, 62vw);
  height: min(420px, 62vw);
  border-color: rgba(34, 211, 238, 0.16);
  opacity: 0.4;
  animation: land-ring-spin 40s linear infinite reverse;
}

.land-scan {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(103, 232, 249, 0.045) 48%,
    rgba(167, 139, 250, 0.07) 50%,
    transparent 52%,
    transparent 100%
  );
  background-size: 100% 220%;
  animation: land-scan 7.5s ease-in-out infinite;
  mix-blend-mode: screen;
  opacity: 0.7;
}

.land-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 75% 65% at 50% 40%, transparent 35%, rgba(2, 1, 10, 0.55) 100%);
}

@keyframes land-spin {
  from { transform: rotate(0deg) scale(1.05); }
  to { transform: rotate(360deg) scale(1.05); }
}

@keyframes land-twinkle {
  from { opacity: 0.55; }
  to { opacity: 0.95; }
}

@keyframes land-drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(6%, 8%, 0) scale(1.12); }
}

@keyframes land-drift-b {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-7%, 5%, 0) scale(1.1); }
}

@keyframes land-pulse {
  from { opacity: 0.35; transform: translateX(-50%) scale(0.96); }
  to { opacity: 0.65; transform: translateX(-50%) scale(1.06); }
}

@keyframes land-grid-scroll {
  from { background-position: 0 0, 0 0; }
  to { background-position: 0 54px, 54px 0; }
}

@keyframes land-ring-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes land-scan {
  0% { background-position: 0 -40%; }
  100% { background-position: 0 140%; }
}

@keyframes land-rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

.land > *:not(.land-fx) {
  position: relative;
  z-index: 1;
}

.land-main {
  animation: land-rise 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.land-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: calc(0.7rem + env(safe-area-inset-top, 0px)) 1rem 0.7rem;
  background: rgba(6, 6, 20, 0.55);
  border-bottom: 1px solid rgba(167, 139, 250, 0.18);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

html[data-theme="light"] body:has(#landing-view:not(.hidden)) .bg {
  background:
    radial-gradient(900px 520px at 50% -8%, rgba(124, 58, 237, 0.22), transparent 58%),
    radial-gradient(700px 480px at 8% 30%, rgba(167, 139, 250, 0.18), transparent 55%),
    radial-gradient(760px 520px at 92% 22%, rgba(8, 145, 178, 0.14), transparent 52%),
    radial-gradient(900px 420px at 50% 108%, rgba(99, 102, 241, 0.12), transparent 55%),
    linear-gradient(180deg, #ebe4ff 0%, #e2daf8 42%, #d9eef5 100%);
}

html[data-theme="light"] .land-nav {
  background: rgba(237, 232, 255, 0.88);
  border-bottom-color: rgba(91, 33, 182, 0.2);
}

html[data-theme="light"] .land-brand,
html[data-theme="light"] .land-brand strong {
  color: #1e1b4b;
}

html[data-theme="light"] .land-void {
  background:
    radial-gradient(ellipse 80% 55% at 50% 18%, rgba(124, 58, 237, 0.16), transparent 60%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(8, 145, 178, 0.12), transparent 55%),
    linear-gradient(180deg, rgba(237, 232, 255, 0.35), rgba(226, 232, 240, 0.55));
}

html[data-theme="light"] .land-aurora {
  opacity: 0.32;
  mix-blend-mode: multiply;
}

html[data-theme="light"] .land-stars { opacity: 0.22; }

html[data-theme="light"] .land-grid-floor {
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(91, 33, 182, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8, 145, 178, 0.14) 1px, transparent 1px);
}

html[data-theme="light"] .land-vignette {
  background: radial-gradient(ellipse 75% 65% at 50% 40%, transparent 42%, rgba(196, 181, 253, 0.28) 100%);
}

html[data-theme="light"] .land-kicker {
  color: #0e7490;
  border-color: rgba(91, 33, 182, 0.22);
  background: rgba(255, 255, 255, 0.7);
}

html[data-theme="light"] .land-lead {
  color: #4338ca;
}

html[data-theme="light"] .land-card h2 {
  color: #1e1b4b;
}

html[data-theme="light"] .land-card p {
  color: #4c1d95;
}

html[data-theme="light"] .land-foot {
  color: #3730a3;
}

html[data-theme="light"] .land-foot .footer-links a {
  color: #5b21b6;
}

@media (prefers-reduced-motion: reduce) {
  .land-aurora,
  .land-stars,
  .land-nebula,
  .land-grid-floor,
  .land-ring,
  .land-scan,
  .land-main {
    animation: none !important;
  }
}

.land-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.land-brand img {
  width: 40px;
  height: auto;
  flex: 0 0 auto;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35));
}

.land-brand strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.land-main {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 1.6rem 1.1rem 2.8rem;
  flex: 1;
  position: relative;
  z-index: 1;
}

.land-hero {
  text-align: center;
  padding: 1.6rem 0 0.4rem;
}

.land-kicker {
  display: inline-flex;
  margin: 0;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--glass-2);
  color: var(--cyan);
  font: 750 0.68rem var(--font-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.land-hero h1 {
  margin: 0.85rem 0 0.7rem;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 10vw, 4.7rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1.2;
  padding-bottom: 0.12em;
  overflow: visible;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  background: linear-gradient(110deg, #fff 8%, #c4b5fd 48%, #67e8f9 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html[data-theme="light"] .land-hero h1 {
  background: linear-gradient(110deg, #7c3aed 6%, #a78bfa 48%, #0891b2 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.land-lead {
  margin: 0 auto 1.35rem;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.land-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}

.land-cta {
  min-width: 11.5rem;
  padding: 0.95rem 1.4rem;
  font-size: 1rem;
}

.land-cta-secondary {
  min-width: 10rem;
  padding: 0.95rem 1.2rem;
  font-size: 0.95rem;
}

.land-pills {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  margin: 1.25rem 0 0;
  padding: 0;
}

.land-pills li {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(167, 139, 250, 0.35);
  background: rgba(139, 92, 246, 0.12);
  color: var(--text);
  font: 700 0.72rem var(--font-body);
  letter-spacing: 0.02em;
}

html[data-theme="light"] .land-pills li {
  background: rgba(124, 58, 237, 0.08);
  border-color: rgba(91, 33, 182, 0.2);
  color: #312e81;
}

.land-section {
  margin-top: 3.2rem;
}

.land-section-head {
  text-align: center;
  margin-bottom: 1.35rem;
}

.land-section-title {
  margin: 0.55rem 0 0.55rem;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 4.5vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.2;
  color: var(--text);
}

.land-section-lead {
  margin: 0 auto;
  max-width: 40rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

html[data-theme="light"] .land-section-lead {
  color: #4338ca;
}

.land-split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 0.85rem;
}

.land-panel {
  padding: 1.25rem 1.2rem 1.35rem;
  border-radius: 22px;
  background: rgba(14, 12, 36, 0.55);
  border: 1px solid rgba(167, 139, 250, 0.28);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: var(--shadow);
}

.land-panel-accent {
  background:
    linear-gradient(155deg, rgba(139, 92, 246, 0.22), rgba(14, 12, 36, 0.62) 55%, rgba(8, 145, 178, 0.12));
  border-color: rgba(103, 232, 249, 0.28);
}

html[data-theme="light"] .land-panel {
  background: rgba(255, 255, 255, 0.84);
  border-color: rgba(91, 33, 182, 0.2);
  box-shadow: 0 14px 36px rgba(76, 29, 149, 0.1);
}

html[data-theme="light"] .land-panel-accent {
  background: linear-gradient(155deg, rgba(237, 233, 254, 0.95), rgba(224, 242, 254, 0.9));
}

.land-panel h3 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.land-panel > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

html[data-theme="light"] .land-panel > p {
  color: #4c1d95;
}

.land-checklist {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.land-checklist li {
  position: relative;
  padding-left: 1.45rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.land-checklist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6, #22d3ee);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
}

html[data-theme="light"] .land-checklist li {
  color: #3730a3;
}

.land-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.land-feature {
  padding: 1.1rem 1rem 1.2rem;
  border-radius: 20px;
  background: rgba(14, 12, 36, 0.48);
  border: 1px solid rgba(167, 139, 250, 0.24);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color 0.2s, transform 0.2s;
}

.land-feature:hover {
  border-color: rgba(103, 232, 249, 0.35);
  transform: translateY(-2px);
}

html[data-theme="light"] .land-feature {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(91, 33, 182, 0.18);
}

.land-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.55rem;
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.18);
  color: #c4b5fd;
  font-size: 0.95rem;
}

html[data-theme="light"] .land-feature-icon {
  background: rgba(124, 58, 237, 0.12);
  color: #6d28d9;
}

.land-feature h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.land-feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

html[data-theme="light"] .land-feature p {
  color: #4c1d95;
}

.land-cta-band {
  margin-top: 3.4rem;
}

.land-cta-band-inner {
  padding: 1.6rem 1.25rem 1.75rem;
  border-radius: 26px;
  text-align: center;
  background:
    linear-gradient(145deg, rgba(139, 92, 246, 0.22), rgba(14, 12, 36, 0.7) 48%, rgba(8, 145, 178, 0.16));
  border: 1px solid rgba(167, 139, 250, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

html[data-theme="light"] .land-cta-band-inner {
  background: linear-gradient(145deg, rgba(237, 233, 254, 0.98), rgba(224, 242, 254, 0.95));
  border-color: rgba(91, 33, 182, 0.22);
  box-shadow: 0 18px 44px rgba(76, 29, 149, 0.12);
}

.land-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 0.4rem;
}

.land-card {
  padding: 1.15rem 1.1rem 1.25rem;
  border-radius: 22px;
  background: rgba(14, 12, 36, 0.55);
  border: 1px solid rgba(167, 139, 250, 0.28);
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(103, 232, 249, 0.05) inset,
    0 0 40px rgba(99, 102, 241, 0.08);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  text-align: left;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.land-card:hover {
  border-color: rgba(103, 232, 249, 0.35);
  transform: translateY(-2px);
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(103, 232, 249, 0.08) inset,
    0 0 50px rgba(34, 211, 238, 0.12);
}

html[data-theme="light"] .land-card {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(91, 33, 182, 0.22);
  box-shadow: 0 14px 36px rgba(76, 29, 149, 0.1);
}

.land-step {
  margin: 0;
  color: var(--cyan);
  font: 800 0.72rem var(--font-display);
  letter-spacing: 0.12em;
}

.land-card h2 {
  margin: 0.35rem 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}

.land-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.land-foot {
  text-align: center;
  padding: 0.4rem 1rem calc(1.3rem + env(safe-area-inset-bottom, 0px));
  color: rgba(155, 143, 196, 0.7);
  font-size: 0.75rem;
}

.land-foot a {
  color: #c4b5fd;
  text-decoration: none;
}

html[data-theme="light"] .land-foot a {
  color: #4c1d95;
  font-weight: 700;
}

.auth-back {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  border: 0;
  background: none;
  color: var(--muted);
  font: 650 0.78rem var(--font-body);
  cursor: pointer;
}

.auth-back:hover { color: var(--text); }

.auth-forgot {
  display: block;
  width: 100%;
  margin: 0.55rem 0 0;
  border: 0;
  background: none;
  color: #67e8f9;
  font: 650 0.8rem var(--font-body);
  cursor: pointer;
  text-align: center;
}

.auth-forgot:hover { text-decoration: underline; }

html[data-theme="light"] .auth-forgot { color: #0e7490; }

@media (max-width: 900px) {
  .land-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .land-split { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .land-grid,
  .land-features { grid-template-columns: 1fr; }
  .land-hero { padding-top: 1.1rem; }
  .land-lead { font-size: 1rem; }
  .land-section { margin-top: 2.4rem; }
  .land-actions { flex-direction: column; align-items: stretch; }
  .land-cta,
  .land-cta-secondary { width: 100%; min-width: 0; }
}

/* —— Admin stats page —— */
.admin-app .admin-back {
  color: var(--text);
  text-decoration: none;
  font: 700 0.86rem var(--font-body);
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--glass);
}

.admin-app .admin-back:hover {
  border-color: rgba(167, 139, 250, 0.45);
}

.admin-app .admin-nav-link {
  color: var(--text);
  text-decoration: none;
  font: 700 0.82rem var(--font-body);
  padding: 0.38rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(167, 139, 250, 0.35);
  background: rgba(139, 92, 246, 0.14);
}

.admin-app .admin-nav-link:hover {
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(34, 211, 238, 0.12);
}

.offer-list-hint {
  margin: 0;
  text-align: left;
}

.ext-steps {
  margin: 0 0 0.85rem;
  padding-left: 1.15rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.ext-steps code {
  font-size: 0.78rem;
  color: var(--text);
}

.modal-card-help {
  max-width: min(420px, 94vw);
  max-height: min(82vh, 640px);
  display: flex;
  flex-direction: column;
}

.help-body {
  overflow: auto;
  margin: 0 0 0.85rem;
  padding-right: 0.15rem;
  display: grid;
  gap: 0.7rem;
}

.help-block h4 {
  margin: 0 0 0.2rem;
  font-size: 0.86rem;
  font-weight: 750;
  color: var(--text);
}

.help-block p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
}

.bookmarklet-row {
  display: flex;
  justify-content: center;
  margin: 0.85rem 0 0.55rem;
}

.bookmarklet-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  border: 1px dashed rgba(167, 139, 250, 0.55);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.28), rgba(79, 70, 229, 0.22));
  color: var(--text);
  font: 750 0.92rem var(--font-body);
  text-decoration: none;
  cursor: grab;
  user-select: none;
  -webkit-user-drag: element;
}

.bookmarklet-btn:active {
  cursor: grabbing;
}

.bookmarklet-hint {
  margin: 0 0 0.5rem;
  text-align: center;
  font-size: 0.78rem;
}

.bookmarklet-hint .btn-text {
  font: inherit;
  color: #67e8f9;
  text-decoration: underline;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.unsafe-list {
  margin: 0 0 0.75rem;
  padding-left: 1.15rem;
  color: var(--danger);
  font-size: 0.84rem;
  line-height: 1.45;
}

.unsafe-list li {
  margin: 0.25rem 0;
}

.unsafe-note {
  margin: 0 0 0.55rem;
  text-align: left;
  font-size: 0.78rem;
}

.admin-main {
  padding-bottom: 2.5rem;
}

.admin-msg {
  text-align: center;
  margin: 0 0 1rem;
  color: var(--danger);
}

.admin-section {
  width: min(780px, 100%);
  margin: 0 auto 1.4rem;
  padding: 1rem;
  border-radius: 18px;
  background: var(--glass);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.admin-section-title {
  margin: 0 0 0.85rem;
  font: 800 1rem var(--font-display);
  color: var(--text);
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.55rem;
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.75rem 0.65rem;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--line);
  text-align: center;
}

html[data-theme="light"] .stat-card {
  background: rgba(255, 255, 255, 0.7);
}

.stat-val {
  font: 800 1.25rem var(--font-display);
  color: #c4b5fd;
}

html[data-theme="light"] .stat-val {
  color: #5b21b6;
}

.stat-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.admin-dist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.85rem;
}

.dist-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(103, 232, 249, 0.1);
  border: 1px solid rgba(103, 232, 249, 0.22);
  font-size: 0.75rem;
  color: var(--muted);
}

.dist-pill strong {
  color: #67e8f9;
  font-weight: 800;
}

html[data-theme="light"] .dist-pill strong {
  color: #0e7490;
}

.admin-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.admin-table th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.badge {
  display: inline-block;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
}

.badge-ok {
  color: #052e1a;
  background: #34d399;
}

.badge-online {
  color: #042f2e;
  background: #22d3ee;
}

.badge-muted {
  color: var(--muted);
  background: rgba(148, 163, 184, 0.18);
}

.badge-admin {
  color: #042f2e;
  background: #67e8f9;
}

.badge-off {
  color: #fff;
  background: #b91c1c;
}

.admin-table tr.row-deactivated td {
  opacity: 0.72;
}
