/* Core layout — theme tokens live in themes.css */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; }
button, input, textarea, select { font: inherit; }

.icon {
  width: 18px; height: 18px;
  display: block; flex-shrink: 0;
}
.icon-sm { width: 14px; height: 14px; }
.icon-lg { width: 28px; height: 28px; }
.icon path[fill] { fill: currentColor; }

/* ── Toast ── */
.toast-stack {
  position: fixed; top: 20px; right: 20px; z-index: 9999;
  display: grid; gap: 10px; width: min(380px, calc(100vw - 40px));
}
.toast {
  padding: 14px 16px; border-radius: 12px;
  background: var(--toast-bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg), var(--shadow-inset);
  display: flex; align-items: center; gap: 10px;
  animation: fadeUp .35s ease;
  color: var(--text);
}
.toast-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.toast-success .toast-dot { background: #22c55e; }
.toast-error .toast-dot { background: #ef4444; }
.toast-warning .toast-dot { background: #f59e0b; }
.toast-info .toast-dot { background: #3b82f6; }
.toast {
  position: relative;
  padding-right: 42px;
}
.toast-msg { flex: 1; line-height: 1.45; }
.toast-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
}
.toast-close:hover { color: var(--text); background: var(--hover-surface); }
.toast.is-leaving {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.btn-submit.is-loading .icon { display: none; }
.btn-submit.is-loading::after {
  content: "";
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid var(--loader-track);
  border-top-color: var(--loader-accent);
  animation: loaderSpin .65s linear infinite;
}
@keyframes loaderSpin { to { transform: rotate(360deg); } }

/* ── AUTH (legacy + shared form parts) ── */
.auth-page { min-height: 100vh; position: relative; overflow-x: hidden; }

.auth-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 90% 60% at 50% -15%, rgba(255, 255, 255, 0.06), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 60%, rgba(255, 255, 255, 0.03), transparent 50%),
    var(--bg);
}
.auth-grid-pattern {
  position: absolute; inset: 0; opacity: 0.3;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, black, transparent);
}
.auth-glow {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.6;
}
.auth-glow-a { width: 420px; height: 420px; top: 8%; left: -120px; background: rgba(255, 255, 255, 0.05); }
.auth-glow-b { width: 380px; height: 380px; bottom: 0; right: -100px; background: rgba(255, 255, 255, 0.04); }

.auth-wrap {
  position: relative; z-index: 1;
  width: min(1100px, 100%);
  margin: 0 auto;
  min-height: 100vh;
  padding: 24px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.auth-topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm), var(--shadow-inset);
}
.auth-topbrand {
  display: flex; align-items: center; gap: 12px;
}
.auth-topbrand strong { display: block; font-size: 0.92rem; }
.auth-topbrand span { color: var(--muted); font-size: 0.72rem; }

.auth-layout {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}
.auth-layout-wide { grid-template-columns: 0.9fr 1.1fr; }

.auth-showcase {
  padding: 8px 12px;
  animation: authFadeIn .5s ease;
}
.showcase-badge {
  display: inline-block;
  margin-bottom: 16px;
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.auth-showcase h1 {
  margin: 0 0 14px;
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
}
.auth-showcase > p {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
  max-width: 400px;
}

.auth-feature-grid {
  display: grid; gap: 10px;
}
.auth-feature {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm), var(--shadow-inset);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.auth-feature:hover {
  border-color: rgba(255,255,255,.14);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.auth-feature .icon {
  width: 20px; height: 20px;
  color: rgba(255,255,255,.55);
}
.auth-feature strong {
  display: block; font-size: 0.86rem; margin-bottom: 2px;
}
.auth-feature span {
  font-size: 0.76rem; color: var(--muted);
}

.brand-mark {
  width: 56px; height: 56px; border-radius: 16px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 1rem; color: var(--accent-text);
  background: var(--accent);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.12), 0 2px 8px rgba(0, 0, 0, 0.4);
}
.brand-mark.xl { width: 64px; height: 64px; font-size: 1.1rem; border-radius: 18px; }
.brand-mark.sm { width: 40px; height: 40px; font-size: 0.8rem; border-radius: 12px; }

.brand-logo {
  display: block;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  user-select: none;
  -webkit-user-drag: none;
}
.brand-logo-sm { height: 26px; max-width: 96px; }
.brand-logo-md { height: 34px; max-width: 124px; }
.brand-logo-lg { height: 44px; max-width: 160px; }
.brand-logo-xl { height: 58px; max-width: 210px; }
.loader-orbit-wrap .brand-logo {
  position: absolute;
  inset: 0;
  margin: auto;
  z-index: 2;
  height: 34px;
  max-width: 118px;
}
.sidebar-brand .brand-logo-sm {
  height: 24px;
  max-width: 88px;
  flex-shrink: 0;
}

.auth-card {
  background: linear-gradient(165deg, rgba(20, 20, 20, 0.98), rgba(8, 8, 8, 0.98));
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--shadow-xl), var(--shadow-inset);
  backdrop-filter: blur(24px);
  animation: authSlideUp .55s ease;
}
.auth-card-wide { max-width: 100%; }

.auth-switcher {
  display: flex; gap: 6px; padding: 5px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-inset);
}
.auth-switcher a {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 16px; border-radius: 10px;
  color: var(--muted); font-weight: 600; font-size: 0.88rem;
  transition: .15s;
}
.auth-switcher a:hover { color: var(--text); text-decoration: none; background: rgba(255,255,255,.03); }
.auth-switcher a.is-active {
  color: var(--accent-text);
  background: var(--accent);
  box-shadow: 0 4px 16px rgba(255,255,255,.12);
}

.auth-header h2 {
  margin: 0 0 6px;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.auth-header p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.auth-form { display: grid; gap: 16px; }
.auth-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.field { display: grid; gap: 8px; }
.field > span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--field-label);
}

.field-icon-wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--field-border);
  background: var(--field-bg);
  box-shadow: var(--shadow-inset);
  transition: border-color .15s, box-shadow .15s;
}
.field-icon-wrap:focus-within {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px var(--focus-ring), var(--shadow-inset);
}
.field-icon {
  color: var(--muted);
  flex-shrink: 0;
}
.field-icon-wrap input {
  flex: 1; width: 100%;
  padding: 14px 0;
  border: 0; background: transparent;
  color: var(--text);
  outline: none;
  box-shadow: none !important;
}
.field-icon-wrap input::placeholder { color: #6b7280; }
.field input:not(.field-icon-wrap input) {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.45);
  color: var(--text);
  outline: none;
  box-shadow: var(--shadow-inset);
  transition: border-color .15s, box-shadow .15s;
}
.field input:not(.field-icon-wrap input):focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06), var(--shadow-inset);
}
.field small {
  font-size: 0.74rem;
  color: #6b7280;
}

.field-pass { padding-right: 6px; }
.pass-toggle {
  border: 0; background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.6);
  width: 34px; height: 34px;
  border-radius: 8px;
  display: grid; place-items: center;
  cursor: pointer;
  transition: background .12s, color .12s;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}
.pass-toggle:hover { background: rgba(255,255,255,.12); color: #fff; }
.pass-toggle.is-visible { color: #fff; background: rgba(255,255,255,.14); }

.remember {
  display: flex; align-items: center; gap: 10px;
  color: var(--muted); font-size: 0.86rem; cursor: pointer;
  padding: 4px 0;
}
.remember input { accent-color: #fff; width: 16px; height: 16px; }

.strength { margin-top: -4px; }
.strength-track {
  height: 4px; border-radius: 99px;
  background: rgba(255,255,255,.06);
  overflow: hidden;
  box-shadow: var(--shadow-inset);
}
.strength-track i {
  display: block; height: 100%; width: 0;
  border-radius: inherit;
  background: #737373;
  transition: width .25s, background .25s;
}
.strength small {
  display: block; margin-top: 6px;
  font-size: 0.74rem; color: #6b7280;
}

.captcha-frame {
  display: flex; gap: 10px; align-items: stretch;
}
.captcha-media {
  flex: 1; min-height: 88px;
  position: relative;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #050505;
  overflow: hidden;
  box-shadow: var(--shadow-inset);
  display: flex; align-items: center; justify-content: center;
}
.captcha-media::after {
  content: "";
  position: absolute; inset: 0;
  margin: auto;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: #fff;
  animation: loaderSpin .7s linear infinite;
  opacity: 0; visibility: hidden;
  transition: opacity .2s;
}
.captcha-media:has(img.loading)::after {
  opacity: 1; visibility: visible;
}
.captcha-media img {
  width: 100%; height: 88px; object-fit: contain;
  cursor: pointer;
  transition: opacity .2s;
  background: #0c1220;
}
.captcha-media img.loading { opacity: 0.5; }
.captcha-refresh {
  position: relative;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
  min-width: 76px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 0.72rem; font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background .15s, box-shadow .15s;
}
.captcha-refresh:hover {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-md);
}
.captcha-refresh.is-loading .icon { opacity: 0.25; }
.captcha-refresh.is-loading::after {
  content: "";
  position: absolute; inset: 0;
  margin: auto;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: #fff;
  animation: loaderSpin .65s linear infinite;
}
.captcha-input-wrap { margin-top: 10px; }
.captcha-field {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 600;
  text-align: left;
}

.btn-submit {
  width: 100%;
  margin-top: 4px;
  padding: 15px 20px;
  border: 0; border-radius: 12px;
  font-weight: 700; font-size: 0.95rem;
  color: var(--accent-text);
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(255, 255, 255, 0.14), 0 2px 8px rgba(0,0,0,.3);
  transition: transform .12s, box-shadow .12s, opacity .12s;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(255, 255, 255, 0.18), 0 4px 12px rgba(0,0,0,.35);
}
.btn-submit:disabled { opacity: 0.65; cursor: wait; }
.btn-submit .icon { color: var(--accent-text); }

.auth-footer {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.auth-footer a { font-weight: 600; }

.field-opt {
  font-style: normal; font-weight: 500;
  color: var(--muted); font-size: 0.76rem;
}

@keyframes authFadeIn {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: none; }
}
@keyframes authSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 960px) {
  .auth-layout,
  .auth-layout-wide {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .auth-showcase { text-align: center; padding: 0; }
  .auth-showcase > p { margin-left: auto; margin-right: auto; }
  .auth-feature-grid { max-width: 420px; margin: 0 auto; }
  .auth-form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .auth-wrap { padding: 16px 14px 32px; }
  .auth-card { padding: 24px 20px; border-radius: 20px; }
  .auth-switcher a { font-size: 0.8rem; padding: 10px 12px; }
}

/* ── DASHBOARD ── */
.dash-page { background: var(--bg); min-height: 100vh; position: relative; }

/* Saydam filigran — ekran goruntusu korumasi */
body.dash-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  background-image: var(--site-watermark-image);
  background-size: 400px 280px;
  background-repeat: repeat;
  opacity: var(--site-watermark-opacity);
}

.dash-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 90% 60% at 50% -15%, var(--dash-glow), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 50%, var(--dash-glow), transparent 50%),
    radial-gradient(ellipse 40% 35% at 0% 80%, var(--dash-glow), transparent 50%),
    var(--bg);
}
.dash-bg::after {
  content: "";
  position: absolute; inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, black, transparent);
}

.app-shell {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky; top: 0; height: 100vh;
  padding: 20px 14px;
  background: linear-gradient(180deg, #0c0c0c 0%, #080808 100%);
  border-right: 1px solid rgba(249, 115, 22, 0.12);
  box-shadow: 8px 0 40px rgba(0, 0, 0, 0.45);
  display: flex; flex-direction: column; gap: 16px;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(249, 115, 22, 0.04);
  border: 1px solid rgba(249, 115, 22, 0.1);
}
.sidebar-brand strong { display: block; font-size: 0.95rem; color: var(--text); }
.sidebar-brand-tag {
  display: inline-block;
  margin-top: 3px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fb923c;
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.22);
}

.sidebar-nav { flex: 1; overflow: auto; display: grid; gap: 2px; align-content: start; }
.nav-section {
  margin: 12px 10px 6px;
  font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--nav-section);
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; border-radius: 10px;
  color: var(--nav-text); font-size: 0.88rem; font-weight: 500;
  transition: background .12s, box-shadow .12s;
}
.nav-item svg { width: 18px; height: 18px; fill: var(--nav-muted); flex-shrink: 0; }
.nav-item:hover {
  background: var(--nav-hover);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}
.nav-item.active {
  background: var(--nav-active-bg);
  color: var(--nav-active-text);
  box-shadow: var(--shadow-sm), var(--shadow-inset);
}
.nav-item.active svg { fill: var(--nav-active-text); }
.nav-item.admin-nav {
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.nav-item.admin-nav svg { fill: var(--text); }
.nav-item.sub { padding-left: 20px; font-size: 0.84rem; color: var(--nav-text); }

.nav-group { display: grid; gap: 2px; }
.nav-group-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.nav-group-toggle .nav-group-label { flex: 1; }
.nav-chevron {
  width: 16px;
  height: 16px;
  fill: var(--nav-muted);
  transition: transform .18s ease;
  margin-left: auto;
}
.nav-group.is-open .nav-chevron { transform: rotate(180deg); }
.nav-sublist {
  display: grid;
  gap: 2px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .22s ease, opacity .18s ease;
  padding-left: 8px;
}
.nav-group.is-open .nav-sublist {
  max-height: 520px;
  opacity: 1;
  margin-bottom: 4px;
}
.nav-sublist .nav-item.sub {
  padding-left: 38px;
  font-size: 0.8rem;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.nav-sublist .nav-item.sub.active {
  background: transparent;
  color: var(--nav-query-active-text);
  font-weight: 600;
  box-shadow: var(--nav-query-glow);
}
.nav-sublist .nav-item.sub.active::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 220%;
  height: 420%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    var(--nav-neon-a) 18deg,
    var(--nav-neon-b) 42deg,
    transparent 72deg,
    transparent 180deg,
    var(--nav-neon-a) 198deg,
    var(--nav-neon-b) 222deg,
    transparent 252deg,
    transparent 360deg
  );
  transform: translate(-50%, -50%);
  animation: nav-neon-rotate 2.6s linear infinite;
  pointer-events: none;
  z-index: -2;
}
.nav-sublist .nav-item.sub.active::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 8px;
  background: var(--nav-query-active-bg);
  pointer-events: none;
  z-index: -1;
}
@keyframes nav-neon-rotate {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .nav-sublist .nav-item.sub.active::before { animation: none; opacity: 0.65; }
}
.nav-group-toggle.is-active {
  background: var(--nav-hover);
  color: var(--text);
}

.sidebar-user {
  margin-top: auto;
  padding: 14px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm), var(--shadow-inset);
  display: grid; gap: 10px;
}
.user-avatar {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 0.75rem; font-weight: 800;
  background: var(--avatar-bg); color: var(--avatar-text);
  box-shadow: var(--shadow-sm);
}
.user-chip strong { display: block; font-size: 0.85rem; color: var(--text); }
.user-chip span { color: var(--muted); font-size: 0.74rem; }

.btn-sm { padding: 8px 12px; font-size: 0.82rem; }

.main { padding: 20px 24px 40px; min-width: 0; }

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; margin-bottom: 20px;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 12px; }
.live-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 99px;
  font-size: 0.72rem; font-weight: 700;
  color: var(--pill-text);
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  box-shadow: var(--shadow-sm), var(--shadow-inset);
}
.live-pill.sm { padding: 4px 10px; font-size: 0.68rem; }
.pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.55);
  animation: pulse 1.6s infinite;
}
.top-user {
  padding: 8px 14px; border-radius: 99px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(249, 115, 22, 0.18);
  box-shadow: var(--shadow-sm);
  font-weight: 700; font-size: 0.85rem;
  color: var(--pill-text);
  transition: border-color .15s, box-shadow .15s;
}
.top-user:hover {
  border-color: rgba(249, 115, 22, 0.35);
  box-shadow: 0 0 16px rgba(249, 115, 22, 0.1);
}
.icon-btn {
  display: none;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  place-items: center;
}
.icon-btn .icon { margin: auto; }
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 40;
}

.ad-banner-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

/* Dashboard home — compact ads right under topbar */
.dashboard-home .main { padding-top: 12px; }
.dashboard-home .topbar { margin-bottom: 10px; }
.dashboard-home .ad-banner-row { margin-top: 0; margin-bottom: 12px; }

.ad-banner-row--compact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.dashboard-home .ad-banner-row--compact {
  display: grid !important;
}
.ad-banner-row--compact .ad-slot,
.ad-banner-row--compact .ad-slot-promo {
  min-height: 72px;
  padding: 10px 12px;
  gap: 6px;
  border-radius: 12px;
}
.dashboard-home .ad-banner-row--compact .ad-slot--compact {
  background: var(--surface);
  border: 1px dashed rgba(0, 0, 0, 0.18);
  box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .dashboard-home .ad-banner-row--compact .ad-slot--compact {
  border-color: rgba(255, 255, 255, 0.22);
}
.ad-banner-row--compact .ad-slot-icon-sm {
  width: 22px;
  height: 22px;
}
.ad-banner-row--compact .ad-slot-label {
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  line-height: 1.25;
}
.ad-banner-row--compact .ad-disclosure-badge {
  top: 6px;
  right: 6px;
  padding: 2px 7px;
  font-size: 0.5rem;
}
.ad-banner-row--compact .ad-api-visual { display: none; }
.ad-banner-row--compact .ad-api-bg .ad-api-orb,
.ad-banner-row--compact .ad-api-bg .ad-api-star,
.ad-banner-row--compact .ad-api-bg .ad-api-scan { display: none; }
.ad-banner-row--compact .ad-slot-promo {
  flex-direction: row;
  align-items: center;
  text-align: left;
}
.ad-banner-row--compact .ad-api-copy {
  width: auto;
  flex: 1;
  min-width: 0;
  gap: 2px;
}
.ad-banner-row--compact .ad-api-sub,
.ad-banner-row--compact .ad-api-tags { display: none; }
.ad-banner-row--compact .ad-api-title { font-size: 0.82rem; }
.ad-banner-row--compact .ad-api-brand-row { gap: 4px; }
.ad-banner-row--compact .ad-api-logo { font-size: 0.52rem; padding: 2px 7px; }
.ad-banner-row--compact .ad-api-badge { font-size: 0.5rem; padding: 2px 6px; }
.ad-banner-row--compact .ad-api-cta {
  width: auto;
  margin-top: 0;
  padding: 5px 9px;
  font-size: 0.62rem;
  flex-shrink: 0;
}

.ad-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 150px;
  padding: 28px 20px;
  border-radius: 14px;
  border: 1px dashed var(--ad-border);
  background: var(--ad-bg);
  box-shadow: var(--shadow-md), var(--shadow-inset);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.ad-slot:hover {
  border-color: var(--ad-border-hover);
  box-shadow: var(--shadow-lg), var(--shadow-inset);
  transform: translateY(-1px);
}
.ad-slot::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, var(--ad-shimmer), transparent);
  transform: translateX(-100%);
  animation: adShimmer 4s ease-in-out infinite;
}
.ad-slot-icon {
  color: var(--ad-icon);
  position: relative; z-index: 1;
  filter: none;
}
.ad-slot-label {
  position: relative; z-index: 1;
  font-size: clamp(0.75rem, 1.4vw, 0.92rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ad-text);
  text-align: center;
  line-height: 1.4;
}
@keyframes adShimmer {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}

/* API promo ad (animated banner) */
.ad-slot-promo {
  text-decoration: none;
  border-style: solid;
  border-color: rgba(99, 102, 241, 0.45);
  background: linear-gradient(135deg, #050814 0%, #0c1228 45%, #0a1628 100%);
  cursor: pointer;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  min-height: 168px;
  overflow: hidden;
}
.ad-slot-promo::before { display: none; }
.ad-disclosure-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
  pointer-events: none;
}
.ad-api-promo .ad-disclosure-badge {
  background: rgba(0, 0, 0, 0.42);
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
}
.ad-disclosure-badge-muted {
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.ad-slot-promo:hover {
  border-color: rgba(34, 211, 238, 0.75);
  transform: translateY(-3px);
  box-shadow:
    0 16px 48px rgba(99, 102, 241, 0.22),
    0 0 0 1px rgba(34, 211, 238, 0.15),
    inset 0 0 60px rgba(99, 102, 241, 0.06);
}

.ad-api-bg {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
}
.ad-api-orb {
  position: absolute; border-radius: 50%; filter: blur(32px); opacity: 0.6;
  animation: adApiOrb 6s ease-in-out infinite;
}
.ad-api-orb-a { width: 140px; height: 140px; left: -30px; top: -40px; background: #6366f1; }
.ad-api-orb-b { width: 110px; height: 110px; right: 5%; top: -20px; background: #06b6d4; animation-delay: -2s; }
.ad-api-orb-c { width: 90px; height: 90px; right: -15px; bottom: -25px; background: #a855f7; animation-delay: -4s; }
.ad-api-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(99,102,241,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,0.07) 1px, transparent 1px);
  background-size: 20px 20px;
  animation: adApiGrid 14s linear infinite;
  mask-image: radial-gradient(ellipse 80% 80% at 30% 50%, #000 20%, transparent 75%);
}
.ad-api-scan {
  position: absolute; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(34,211,238,0.8), transparent);
  animation: adApiScan 3.5s ease-in-out infinite;
  opacity: 0.7;
}
.ad-api-star {
  position: absolute; width: 3px; height: 3px; border-radius: 50%;
  background: #fff; opacity: 0;
  animation: adApiStar 2.5s ease-in-out infinite;
}
.ad-api-star-1 { left: 12%; top: 22%; animation-delay: 0s; }
.ad-api-star-2 { left: 28%; top: 68%; animation-delay: 0.6s; }
.ad-api-star-3 { left: 72%; top: 30%; animation-delay: 1.2s; }
.ad-api-star-4 { left: 88%; top: 75%; animation-delay: 1.8s; }
@keyframes adApiOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(14px, 10px) scale(1.15); }
}
@keyframes adApiGrid {
  0% { background-position: 0 0; }
  100% { background-position: 20px 20px; }
}
@keyframes adApiScan {
  0% { top: -2px; opacity: 0; }
  15% { opacity: 0.8; }
  85% { opacity: 0.8; }
  100% { top: 100%; opacity: 0; }
}
@keyframes adApiStar {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 0.9; transform: scale(1.4); }
}

.ad-api-visual {
  position: relative; z-index: 1; flex-shrink: 0;
  width: 148px; height: 118px;
}
.ad-api-orbit-wrap {
  position: absolute; left: -8px; top: 4px;
  width: 64px; height: 64px;
}
.ad-api-orbit {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px dashed rgba(34, 211, 238, 0.35);
}
.ad-api-orbit-1 { animation: adApiSpin 8s linear infinite; }
.ad-api-orbit-2 {
  inset: 8px;
  border-color: rgba(168, 85, 247, 0.35);
  animation: adApiSpin 5s linear infinite reverse;
}
.ad-api-planet {
  position: absolute; left: 50%; top: 50%;
  width: 22px; height: 22px; margin: -11px 0 0 -11px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #67e8f9, #6366f1 55%, #312e81);
  box-shadow: 0 0 18px rgba(99, 102, 241, 0.6);
  animation: adApiPlanet 4s ease-in-out infinite;
}
.ad-api-satellite {
  position: absolute; left: 50%; top: 50%;
  width: 8px; height: 8px; margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 10px #22d3ee;
  animation: adApiSatellite 8s linear infinite;
  transform-origin: -22px center;
}
@keyframes adApiSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes adApiPlanet {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
@keyframes adApiSatellite {
  from { transform: rotate(0deg) translateX(28px); }
  to { transform: rotate(360deg) translateX(28px); }
}

.ad-api-terminal {
  position: absolute; right: 0; bottom: 0; z-index: 2;
  width: 118px; height: 88px;
  border-radius: 12px;
  border: 1px solid rgba(34, 211, 238, 0.4);
  background: rgba(4, 8, 20, 0.92);
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0,0,0,0.45), 0 0 20px rgba(34,211,238,0.08);
  animation: adApiFloat 3.5s ease-in-out infinite;
}
.ad-api-terminal-bar {
  display: flex; align-items: center; gap: 4px; padding: 5px 8px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ad-api-terminal-bar span {
  width: 5px; height: 5px; border-radius: 50%;
}
.ad-api-terminal-bar span:nth-child(1) { background: #f87171; }
.ad-api-terminal-bar span:nth-child(2) { background: #fbbf24; }
.ad-api-terminal-bar span:nth-child(3) { background: #4ade80; }
.ad-api-terminal-bar em {
  margin-left: auto; font-style: normal; font-size: 0.48rem;
  color: rgba(34,211,238,0.7); font-weight: 700; letter-spacing: 0.04em;
}
.ad-api-terminal-body {
  padding: 6px 8px; font-family: ui-monospace, monospace;
  font-size: 0.52rem; line-height: 1.5; color: #a5f3fc;
}
.ad-api-line em { font-style: normal; color: #22d3ee; font-weight: 700; }
.ad-api-line-1 {
  animation: adApiType 5s steps(20) infinite;
  overflow: hidden; white-space: nowrap;
  border-right: 2px solid #22d3ee; max-width: 0;
}
.ad-api-line-2 { opacity: 0; animation: adApiFade 5s ease infinite 1.1s; color: #86efac; }
.ad-api-line-3 { opacity: 0; animation: adApiFade 5s ease infinite 2.1s; color: #c4b5fd; }
.ad-api-progress {
  margin-top: 4px; height: 3px; border-radius: 999px;
  background: rgba(255,255,255,0.08); overflow: hidden;
}
.ad-api-progress span {
  display: block; height: 100%; width: 40%;
  background: linear-gradient(90deg, #6366f1, #22d3ee);
  border-radius: inherit;
  animation: adApiProgress 2s ease-in-out infinite;
}
@keyframes adApiFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-5px) rotate(-1deg); }
}
@keyframes adApiType {
  0%, 8% { max-width: 0; }
  42%, 88% { max-width: 100%; }
  100% { max-width: 0; }
}
@keyframes adApiFade {
  0%, 12% { opacity: 0; transform: translateY(3px); }
  28%, 78% { opacity: 1; transform: translateY(0); }
  92%, 100% { opacity: 0; }
}
@keyframes adApiProgress {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(280%); }
}

.ad-api-packets {
  position: absolute; left: 20px; top: 50%; width: 80px; height: 2px;
  transform: translateY(-50%);
}
.ad-api-packets span {
  position: absolute; top: 0; left: 0;
  width: 6px; height: 6px; margin-top: -2px; border-radius: 2px;
  background: #22d3ee; box-shadow: 0 0 8px #22d3ee;
  animation: adApiPacket 2.2s ease-in-out infinite;
}
.ad-api-packets span:nth-child(2) { animation-delay: 0.7s; background: #a78bfa; box-shadow: 0 0 8px #a78bfa; }
.ad-api-packets span:nth-child(3) { animation-delay: 1.4s; background: #34d399; box-shadow: 0 0 8px #34d399; }
@keyframes adApiPacket {
  0% { left: 0; opacity: 0; transform: scale(0.6); }
  20% { opacity: 1; transform: scale(1); }
  80% { opacity: 1; }
  100% { left: 100%; opacity: 0; transform: scale(0.6); }
}

.ad-api-copy {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 5px; min-width: 0; flex: 1;
}
.ad-api-brand-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.ad-api-logo {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 4px 10px; border-radius: 8px;
  background: #111; color: #fff;
  font-size: 0.62rem; font-weight: 900; letter-spacing: 0.14em;
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
  animation: adApiLogo 3s ease-in-out infinite;
}
@keyframes adApiLogo {
  0%, 100% { box-shadow: 0 4px 12px rgba(0,0,0,0.35); }
  50% { box-shadow: 0 4px 20px rgba(99,102,241,0.45); }
}
.ad-api-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 0.58rem; font-weight: 800; letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #064e3b; background: linear-gradient(90deg, #34d399, #6ee7b7);
  animation: adApiBadge 2s ease-in-out infinite;
}
.ad-api-badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: #059669;
  animation: adApiDot 1.2s ease-in-out infinite;
}
@keyframes adApiBadge {
  0%, 100% { box-shadow: 0 0 0 rgba(52, 211, 153, 0); }
  50% { box-shadow: 0 0 16px rgba(52, 211, 153, 0.5); }
}
@keyframes adApiDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.65); }
}
.ad-api-title {
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  font-weight: 900; letter-spacing: 0.04em; line-height: 1.15;
  background: linear-gradient(90deg, #fff 0%, #22d3ee 25%, #a78bfa 55%, #fff 100%);
  background-size: 250% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: adApiTitle 4s linear infinite;
}
@keyframes adApiTitle {
  0% { background-position: 0% center; }
  100% { background-position: 250% center; }
}
.ad-api-sub {
  font-size: 0.76rem; color: rgba(226, 232, 240, 0.82); font-weight: 600;
}
.ad-api-tags {
  display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px;
}
.ad-api-tags span {
  padding: 2px 8px; border-radius: 6px;
  font-size: 0.58rem; font-weight: 700; letter-spacing: 0.03em;
  color: rgba(165, 243, 252, 0.9);
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.22);
}
.ad-api-cta {
  position: relative; overflow: hidden;
  margin-top: 6px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  font-size: 0.74rem; font-weight: 800; letter-spacing: 0.03em;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #0891b2);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
  animation: adApiCta 2s ease-in-out infinite;
}
.ad-api-cta-shine {
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,0.35) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: adApiShine 2.5s ease-in-out infinite;
}
@keyframes adApiCta {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}
@keyframes adApiShine {
  0%, 40% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}
.ad-slot-promo:hover .ad-api-cta {
  box-shadow: 0 10px 28px rgba(99, 102, 241, 0.5);
}

@media (max-width: 720px) {
  .ad-slot-promo {
    flex-direction: row;
    align-items: center;
    text-align: left;
    min-height: 0;
    padding: 10px 12px;
    gap: 10px;
  }
  .ad-api-visual { display: none; }
  .ad-api-copy { width: auto; flex: 1; min-width: 0; gap: 3px; }
  .ad-api-sub,
  .ad-api-tags { display: none; }
  .ad-api-title { font-size: 0.84rem; }
  .ad-api-cta {
    width: auto;
    margin-top: 0;
    padding: 6px 10px;
    font-size: 0.66rem;
    flex-shrink: 0;
  }
  .ad-api-brand-row { gap: 4px; }
  .ad-api-logo { font-size: 0.52rem; padding: 2px 7px; }
  .ad-api-badge { font-size: 0.5rem; padding: 2px 6px; }
}

/* Dashboard home header + Profilim */
.dash-home-header {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}
.dash-home-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.dash-home-brand-copy strong {
  display: block;
  font-size: 1rem;
  color: var(--text);
  line-height: 1.2;
}
.dash-home-brand-copy span {
  color: var(--muted);
  font-size: 0.76rem;
}

.dash-profilim {
  display: flex;
  justify-content: center;
  margin: 8px 0 22px;
}
.dash-profilim-card {
  width: min(100%, 420px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 28px 24px 22px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md), var(--shadow-inset);
}
.dash-profilim-avatar {
  position: relative;
  margin-bottom: 12px;
}
.dash-profilim-avatar img {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  border: 2px solid var(--line);
  box-shadow: var(--shadow-sm);
  object-fit: cover;
}
.dash-profilim-vip {
  position: absolute;
  right: -6px;
  bottom: -4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #422006;
}
.dash-profilim-kicker {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.dash-profilim-name {
  margin: 6px 0 4px;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text);
}
.dash-profilim-meta {
  margin: 0 0 16px;
  font-size: 0.84rem;
  color: var(--muted);
}
.dash-profilim-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  margin-bottom: 18px;
}
.dash-profilim-stats div {
  padding: 10px 8px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.dash-profilim-stats strong {
  display: block;
  font-size: 1rem;
  color: var(--text);
}
.dash-profilim-stats span {
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 600;
}
.dash-profilim-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 18px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}
.dash-profilim-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.dash-profilim-btn:hover {
  background: #000;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}
[data-theme="dark"] .dash-profilim-btn {
  background: #f5f5f5;
  color: #111;
}
[data-theme="dark"] .dash-profilim-btn:hover {
  background: #fff;
}

/* ── Marquee (horizontal scroll) ── */
.dash-marquee {
  position: relative;
  margin-bottom: 12px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(90deg, #111 0%, #0d0d0d 50%, #111 100%);
  color: var(--marquee-text);
  border: 1px solid rgba(249, 115, 22, 0.15);
  box-shadow: var(--shadow-sm);
}
.dash-marquee-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--marquee-bg) 0%, transparent 10%, transparent 90%, var(--marquee-bg) 100%);
  pointer-events: none;
  z-index: 2;
}
.dash-marquee-viewport {
  overflow: hidden;
  width: 100%;
  padding: 9px 0;
}
.dash-marquee-track {
  display: flex;
  width: max-content;
  flex-wrap: nowrap;
  animation: dashMarqueeScroll var(--marquee-duration, 22s) linear infinite;
  will-change: transform;
}
.dash-marquee-track.is-ready {
  animation-play-state: running;
}
.dash-marquee-group {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-shrink: 0;
  padding-right: 40px;
}
.dash-marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--marquee-text);
  flex-shrink: 0;
}
.dash-marquee-item::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--marquee-dot);
  opacity: 0.85;
  flex-shrink: 0;
}
@keyframes dashMarqueeScroll {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

.telegram-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(34, 158, 217, 0.1);
  color: var(--telegram);
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid rgba(34, 158, 217, 0.22);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.telegram-link:hover {
  color: var(--telegram-hover);
  background: rgba(34, 158, 217, 0.16);
  border-color: rgba(34, 158, 217, 0.35);
}
.telegram-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.prayer-widget .prayer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 14px 14px;
}
.prayer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--hover-surface);
  border: 1px solid var(--line);
  font-size: 0.78rem;
}
.prayer-row span { color: var(--muted); }
.prayer-row strong { font-size: 0.82rem; color: var(--text); }

.account-info-grid {
  display: grid;
  gap: 8px;
  padding: 0 16px 16px;
}
.account-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--hover-surface);
  border: 1px solid var(--line);
  font-size: 0.78rem;
}
.account-info-row span { color: var(--muted); flex-shrink: 0; }
.account-info-row strong {
  color: var(--text);
  font-size: 0.82rem;
  text-align: right;
  word-break: break-word;
}
.widget-pill.warn {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.22);
}

/* ── Telegram bot popup ── */
.bot-popup {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.bot-popup[hidden] { display: none; }
.bot-popup-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay);
  backdrop-filter: blur(4px);
}
.bot-popup-card {
  position: relative;
  width: min(420px, 100%);
  padding: 28px 24px 22px;
  border-radius: 18px;
  background: var(--card-bg);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-xl);
  text-align: center;
  animation: botPopupIn 0.35s ease;
}
@keyframes botPopupIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.bot-popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: var(--hover-surface);
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.bot-popup-close:hover { color: var(--text); background: var(--ghost-hover); }
.bot-popup-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(34, 158, 217, 0.14);
  color: var(--telegram);
}
.bot-popup-icon svg { width: 30px; height: 30px; }
.bot-popup-badge {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(34, 158, 217, 0.12);
  color: var(--telegram);
  border: 1px solid rgba(34, 158, 217, 0.22);
}
.bot-popup-card h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  line-height: 1.35;
}
.bot-popup-card p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}
.btn-telegram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--telegram);
  color: #fff;
  border: none;
  box-shadow: 0 8px 24px rgba(34, 158, 217, 0.35);
}
.btn-telegram:hover {
  background: var(--telegram-hover);
  color: #fff;
}
.bot-popup-dismiss {
  margin-top: 12px;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 0.78rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.bot-popup-dismiss:hover { color: var(--text); }
body.bot-popup-open { overflow: hidden; }

.admin-marquee-panel { margin-bottom: 16px; }
.admin-marquee-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  background: var(--admin-form-bg);
}
.admin-marquee-form .field { gap: 6px; }
.admin-marquee-form input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--input-bg);
  color: var(--text);
  outline: none;
}
.admin-marquee-form input:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.admin-marquee-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.hero-card {
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px; padding: 28px;
  border-radius: 20px; margin-bottom: 20px;
  background: var(--hero-bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg), var(--shadow-inset);
}
.hero-badge {
  display: inline-block; margin-bottom: 10px;
  padding: 4px 10px; border-radius: 99px;
  font-size: 0.7rem; font-weight: 700;
  background: var(--hero-badge-bg);
  color: var(--hero-badge-text);
  border: 1px solid rgba(249, 115, 22, 0.22);
  box-shadow: 0 0 20px rgba(249, 115, 22, 0.08);
}
.hero-copy h1 { color: var(--text); }
.hero-copy h1 em { font-style: normal; color: var(--strong); }
.hero-copy h1 {
  margin: 0 0 8px;
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hero-actions { display: flex; gap: 10px; flex-shrink: 0; }
.btn-block { width: 100%; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.stat-card {
  padding: 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--surface-3) 0%, var(--surface) 100%);
  border: 1px solid var(--line);
  min-height: 100px;
  box-shadow: var(--shadow-md), var(--shadow-inset);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}

.announce-section {
  margin-bottom: 16px;
}
.announce-list-top {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
  padding: 12px 16px 16px;
}
.announce-list-top .announce-empty.compact {
  grid-column: 1 / -1;
  padding: 28px 16px;
  text-align: center;
}
.admin-announce-form {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1.5fr auto auto;
  gap: 10px;
  align-items: end;
  background: var(--admin-form-bg);
}
.admin-announce-form .btn-block { width: auto; white-space: nowrap; }
@media (max-width: 960px) {
  .admin-announce-form { grid-template-columns: 1fr 1fr; }
  .admin-announce-form .btn-block { grid-column: 1 / -1; width: 100%; }
}
@media (max-width: 600px) {
  .admin-announce-form { grid-template-columns: 1fr; }
}
.stat-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lg), var(--shadow-inset);
  transform: translateY(-2px);
}
.stat-card.featured {
  background: linear-gradient(145deg, rgba(249, 115, 22, 0.1) 0%, rgba(14, 14, 14, 0.98) 55%);
  border-color: rgba(249, 115, 22, 0.28);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(249, 115, 22, 0.08);
}
.stat-card.plan-card {
  background: linear-gradient(145deg, rgba(249, 115, 22, 0.06) 0%, rgba(14, 14, 14, 0.98) 50%);
  border-left: 3px solid #f97316;
}
.stat-card-accent {
  background: linear-gradient(180deg, var(--surface-3) 0%, var(--surface) 100%);
  border-color: var(--line-strong);
}
.stat-label {
  display: block; font-size: 0.72rem;
  color: var(--muted); margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.stat-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.74rem;
}
.stat-card-accent small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.74rem;
}

.stat-icon { color: var(--stat-icon); margin-bottom: 8px; display: flex; }

.panel {
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(18, 18, 18, 0.98) 0%, rgba(10, 10, 10, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: border-color .2s, box-shadow .2s;
}
.panel:hover {
  border-color: rgba(249, 115, 22, 0.14);
}
.panel-head h3 { margin: 0; font-size: 0.95rem; font-weight: 700; color: var(--strong); }
.panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 0.8rem; }
.admin-hint { color: var(--strong) !important; font-size: 0.72rem !important; opacity: 0.7; }
.spy-panel .panel-head {
  background: rgba(255, 255, 255, 0.02);
  box-shadow: 0 1px 0 rgba(255,255,255,.04);
}
.panel-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.feed-list { padding: 8px; }
.spy-panel .feed-list {
  overflow: hidden;
  max-height: none;
}
.feed-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px; align-items: start;
  padding: 14px 12px; border-radius: 12px;
  border-left: 3px solid transparent;
  transition: background .12s, border-color .12s, box-shadow .12s;
}
.feed-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-left-color: #fff;
  box-shadow: var(--shadow-sm);
}
.feed-login { border-left-color: rgba(255, 255, 255, 0.6); }
.feed-register { border-left-color: rgba(255, 255, 255, 0.45); }
.feed-logout { border-left-color: rgba(255, 255, 255, 0.25); }
.feed-query { border-left-color: rgba(255, 255, 255, 0.35); }
.feed-avatar {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  font-size: 0.75rem; font-weight: 800;
  background: #fff; color: #000;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.12);
}
.feed-top strong { font-size: 0.86rem; color: #fff; }
.feed-top time { color: rgba(255, 255, 255, 0.4); font-size: 0.7rem; white-space: nowrap; }
.spy-text {
  margin: 6px 0 0;
  color: #e5e5e5;
  font-size: 0.88rem;
  line-height: 1.55;
  font-style: italic;
}
.feed-tag {
  align-self: center;
  padding: 5px 10px; border-radius: 99px;
  font-size: 0.62rem; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tag-login { color: #fff; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15); }
.tag-register { color: #d4d4d4; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); }
.tag-logout { color: #a3a3a3; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); }
.tag-query { color: #e5e5e5; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); }
.tag-referral { color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); }
.feed-referral { border-left-color: rgba(255, 255, 255, 0.5); }

.left-stack { display: grid; gap: 12px; align-content: start; min-width: 0; }

.referral-panel {
  border-color: var(--line);
  background: var(--surface);
}
.referral-badge {
  padding: 5px 10px; border-radius: 99px;
  font-size: 0.68rem; font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.referral-body { padding: 14px 16px 16px; }
.referral-code-box {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 12px;
  background: #080808;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,.04);
  margin-bottom: 10px;
}
.referral-code-box code {
  flex: 1;
  font-size: 1.05rem; font-weight: 800;
  letter-spacing: 0.12em;
  color: #fff;
  font-family: ui-monospace, "Cascadia Code", monospace;
}
.btn-copy {
  padding: 8px 12px; border-radius: 8px; border: 0;
  font-size: 0.75rem; font-weight: 700;
  color: var(--accent-text); cursor: pointer;
  background: var(--accent);
  transition: opacity .12s;
}
.btn-copy:hover { opacity: 0.85; }
.btn-copy.copied { background: #fff; color: #000; }
.referral-hint {
  margin: 0 0 12px;
  font-size: 0.8rem; line-height: 1.5;
  color: var(--muted);
}
.referral-hint strong { color: #fff; }
.referral-stats {
  display: flex; gap: 16px;
  font-size: 0.78rem; color: var(--muted);
}
.referral-stats strong { color: #fff; }

.spy-compact .panel-head { padding: 12px 16px; }
.spy-compact .panel-head h3 { font-size: 0.88rem; }
.spy-compact .panel-head p { font-size: 0.72rem; }
.feed-compact { padding: 4px 8px 10px; overflow: hidden; }
.feed-compact .feed-item { padding: 8px 10px; gap: 8px; }
.feed-compact .feed-avatar.sm { width: 32px; height: 32px; border-radius: 9px; font-size: 0.65rem; }
.feed-compact .spy-text {
  font-size: 0.78rem;
  line-height: 1.4;
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.feed-compact .feed-top strong { font-size: 0.78rem; }
.feed-compact .feed-top time { font-size: 0.65rem; }
.feed-compact .feed-tag { padding: 3px 7px; font-size: 0.58rem; }
.spy-empty.compact { padding: 20px 12px; }
.spy-empty.compact strong { font-size: 0.82rem; }

.side-stack { display: grid; gap: 16px; align-content: start; min-width: 0; }

.panel-badge {
  padding: 5px 10px; border-radius: 99px;
  font-size: 0.68rem; font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.recent-list { padding: 8px 10px 12px; display: grid; gap: 6px; }
.recent-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px; align-items: center;
  padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  box-shadow: var(--shadow-sm);
  transition: background .12s, border-color .12s, box-shadow .12s, transform .12s;
}
.recent-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.recent-avatar {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 0.7rem; font-weight: 800;
  background: #fff; color: #000;
  box-shadow: 0 3px 10px rgba(255,255,255,.1);
}
.recent-body strong {
  display: block; font-size: 0.84rem; color: #fff;
  font-family: ui-monospace, "Cascadia Code", monospace;
  letter-spacing: 0.02em;
}
.recent-meta {
  display: block; margin-top: 3px;
  font-size: 0.7rem; color: var(--muted);
}
.recent-tag {
  padding: 4px 8px; border-radius: 99px;
  font-size: 0.6rem; font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line);
}
.recent-empty { padding: 24px 16px; }

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
}
.info-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px; border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  box-shadow: var(--shadow-sm), var(--shadow-inset);
  transition: box-shadow .15s, transform .15s;
}
.info-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.info-item .icon { color: var(--muted); margin-top: 2px; }
.info-item strong {
  display: block; font-size: 0.78rem; color: var(--strong); margin-bottom: 2px;
}
.info-item span { font-size: 0.7rem; color: var(--muted); }

.field-opt {
  font-style: normal; font-weight: 500;
  color: var(--muted); font-size: 0.78rem;
}

.announce-panel { border-color: var(--line); }
.admin-announce-form .field { gap: 6px; }
.admin-announce-form .field > span {
  font-size: 0.75rem; font-weight: 600; color: var(--strong);
}
.admin-announce-form input,
.admin-announce-form textarea,
.admin-announce-form select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--input-bg);
  color: var(--text);
  outline: none;
  resize: vertical;
}
.admin-announce-form input:focus,
.admin-announce-form textarea:focus,
.admin-announce-form select:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.admin-announce-form select option { background: var(--surface); color: var(--text); }

.announce-list { padding: 12px; display: grid; gap: 10px; }
.announce-item-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px;
}
.announce-item {
  padding: 14px; border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: border-color .12s, box-shadow .12s;
}
.announce-item:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}
.announce-tag {
  display: inline-block;
  padding: 2px 8px; border-radius: 99px;
  font-size: 0.65rem; font-weight: 700;
  background: var(--surface-3);
  color: var(--muted);
}
.announce-tag.new {
  background: var(--accent);
  color: var(--accent-text);
}
.announce-tag.warn {
  background: var(--surface-3);
  color: var(--muted);
}
.announce-item strong { display: block; margin-bottom: 4px; font-size: 0.9rem; color: var(--strong); }
.announce-item p { margin: 0; color: var(--muted); font-size: 0.82rem; line-height: 1.5; }
.announce-meta {
  display: block; margin-top: 8px;
  font-size: 0.68rem; color: var(--muted);
}
.btn-delete {
  width: 28px; height: 28px;
  border-radius: 8px; border: 1px solid var(--line);
  background: var(--ghost-bg);
  color: var(--text);
  display: grid; place-items: center;
  cursor: pointer; transition: background .12s;
  padding: 0;
}
.btn-delete:hover { background: var(--ghost-hover); }
.announce-delete-form { margin: 0; }

.empty-state {
  padding: 40px 20px; text-align: center; color: var(--muted);
}
.empty-state strong { display: block; color: var(--strong); margin-bottom: 6px; }
.empty-icon {
  display: block; margin: 0 auto 10px;
  color: var(--empty-icon);
}
.spy-empty, .announce-empty { padding: 32px 20px; }

.stat-value {
  display: block; font-size: 1.5rem;
  font-weight: 800; letter-spacing: -0.02em;
  color: var(--stat-value);
}
.stat-value.text { font-size: 1rem; font-weight: 700; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.hero-copy p { margin: 0; color: var(--muted); line-height: 1.55; max-width: 560px; }
.btn-primary {
  padding: 10px 16px; border-radius: 10px; border: 0;
  font-weight: 700; font-size: 0.86rem; color: var(--accent-text);
  background: var(--accent-gradient);
  cursor: pointer;
  box-shadow: var(--btn-shadow);
  transition: transform .12s, box-shadow .12s, filter .12s;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--btn-shadow-hover);
  filter: brightness(1.05);
  text-decoration: none;
}
.btn-ghost {
  padding: 10px 14px; border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--ghost-bg);
  color: var(--text);
  font-weight: 600; font-size: 0.84rem;
  cursor: pointer; text-align: center;
  display: block;
  box-shadow: var(--shadow-sm);
  transition: background .12s, box-shadow .12s, transform .12s;
}
.btn-ghost:hover {
  background: var(--ghost-hover);
  border-color: rgba(249, 115, 22, 0.25);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  text-decoration: none;
}
.top-link { color: var(--muted); font-size: 0.84rem; }
.user-chip { display: flex; align-items: center; gap: 10px; }

.content-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 16px;
  align-items: start;
  margin-bottom: 8px;
}

/* ── Dashboard widgets ── */
.dash-widgets { align-items: stretch; }
.widget-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.widget-col-main { min-width: 0; }
.widget-col-side { min-width: 0; }
.widget { overflow: hidden; }

.widget-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.widget-head-copy {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}
.widget-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  flex-shrink: 0;
}
.widget-head h3 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--strong);
}
.widget-head p {
  margin: 3px 0 0;
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.4;
}
.widget-pill {
  padding: 5px 10px;
  border-radius: 99px;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
  color: var(--pill-text);
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  flex-shrink: 0;
}
.widget-pill.accent {
  color: var(--accent-text);
  background: var(--accent);
  border-color: transparent;
}
.widget-pill.live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.referral-widget-body { padding: 16px 18px 18px; }
.referral-code-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 16px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  margin-bottom: 12px;
}
.referral-code-row code {
  flex: 1;
  min-width: 0;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--text);
  font-family: ui-monospace, "Cascadia Code", monospace;
  overflow: hidden;
  text-overflow: ellipsis;
}
.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 10px;
  border: 0;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent-text);
  cursor: pointer;
  background: var(--accent);
  transition: opacity .12s, transform .12s;
  flex-shrink: 0;
}
.btn-copy:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-copy.copied { background: var(--surface-3); color: var(--text); }
.referral-hint {
  margin: 0 0 14px;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--muted);
}
.referral-hint strong { color: var(--strong); }
.referral-stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.mini-stat {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.mini-stat span {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.mini-stat strong {
  font-size: 1.15rem;
  color: var(--strong);
}

.spy-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  max-height: calc(5 * 56px);
}
.spy-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 16px;
  min-height: 56px;
  max-height: 56px;
  border-bottom: 1px solid var(--line);
  transition: background .12s;
}
.spy-row:last-child { border-bottom: 0; }
.spy-row:hover { background: var(--surface-2); }
.spy-row-avatar {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 0.65rem; font-weight: 800;
  background: var(--avatar-bg);
  color: var(--avatar-text);
  flex-shrink: 0;
}
.spy-row-body { min-width: 0; overflow: hidden; }
.spy-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}
.spy-row-top strong {
  font-size: 0.78rem;
  color: var(--strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.spy-row-top time {
  font-size: 0.65rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.spy-row-body p {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.35;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.spy-row-tag {
  padding: 4px 8px;
  border-radius: 99px;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.feed-login .spy-row-tag { border-color: var(--line-strong); }
.feed-register .spy-row-tag { opacity: 0.9; }
.feed-logout .spy-row-tag { opacity: 0.75; }

.recent-widget { height: 100%; display: flex; flex-direction: column; }
.recent-feed {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px 16px;
}
.recent-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  transition: border-color .12s, box-shadow .12s, transform .12s;
}
.recent-row:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.recent-row-avatar {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 0.68rem; font-weight: 800;
  background: var(--avatar-bg);
  color: var(--avatar-text);
}
.recent-row-body { min-width: 0; }
.recent-row-body strong {
  display: block;
  font-size: 0.82rem;
  color: var(--strong);
  font-family: ui-monospace, "Cascadia Code", monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.recent-row-body span {
  display: block;
  margin-top: 2px;
  font-size: 0.68rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.recent-row-tag {
  padding: 4px 8px;
  border-radius: 99px;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-text);
  background: var(--accent);
  flex-shrink: 0;
}

.widget-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
}
.widget-empty strong {
  display: block;
  margin-top: 8px;
  color: var(--strong);
  font-size: 0.84rem;
}
.widget-empty .empty-icon {
  margin: 0 auto;
  opacity: 0.45;
}

@media (max-width: 960px) {
  .content-grid,
  .dash-widgets { grid-template-columns: 1fr; }
  .recent-widget { height: auto; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .announce-list-top { grid-template-columns: 1fr; }
  .auth-form-grid { grid-template-columns: 1fr; }
}

.panel-head.compact { padding: 14px 18px; }

.mobile-only { display: none; }
body.sidebar-open { overflow: hidden; }

@media (max-width: 768px) {
  .toast-stack {
    top: 12px;
    right: 12px;
    left: 12px;
    width: auto;
  }

  .main {
    padding: 14px 14px calc(88px + env(safe-area-inset-bottom, 0px));
  }

  .topbar {
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
  }
  .topbar-left {
    flex: 1;
    min-width: 0;
    flex-wrap: wrap;
    gap: 8px;
  }
  .topbar-right { flex-shrink: 0; }
  .top-link {
    display: none;
  }
  .top-user {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.78rem;
    padding: 6px 10px;
  }

  .ad-banner-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
  }
  .ad-slot {
    min-height: 0;
    padding: 10px 8px;
    gap: 6px;
    border-radius: 10px;
  }
  .ad-slot-icon.icon-lg {
    width: 22px;
    height: 22px;
  }
  .ad-slot-label {
    letter-spacing: 0.05em;
    font-size: 0.58rem;
    line-height: 1.25;
  }
  .ad-disclosure-badge {
    top: 5px;
    right: 5px;
    padding: 2px 6px;
    font-size: 0.5rem;
  }
  .dashboard-home .ad-banner-row { margin-bottom: 8px; }
  .ad-banner-row--compact .ad-slot,
  .ad-banner-row--compact .ad-slot-promo {
    min-height: 0;
    padding: 8px 10px;
  }
  .ad-banner-row--compact .ad-api-title { font-size: 0.76rem; }
  .ad-banner-row--compact .ad-api-brand-row .ad-api-badge { display: none; }

  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; z-index: 50;
    width: min(300px, 88vw);
    height: 100dvh;
    transform: translateX(-105%);
    transition: transform .25s ease;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .sidebar.open { transform: none; }
  .sidebar-overlay.open { display: block; }
  .mobile-only { display: grid; place-items: center; }

  .hero-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    gap: 16px;
  }
  .hero-copy h1 {
    font-size: clamp(1.25rem, 5vw, 1.6rem);
  }
  .hero-copy p { font-size: 0.88rem; }
  .hero-actions {
    width: 100%;
    flex-direction: column;
  }
  .hero-actions .btn { width: 100%; flex: none; }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .stat-card {
    padding: 14px;
    min-height: 88px;
  }
  .stat-value { font-size: 1.25rem; }

  .announce-section { margin-bottom: 14px; }
  .admin-announce-form {
    grid-template-columns: 1fr;
    padding: 12px 14px;
  }
  .admin-marquee-form {
    grid-template-columns: 1fr;
  }
  .admin-marquee-actions {
    width: 100%;
  }
  .admin-marquee-actions .btn { flex: 1; }

  .dash-marquee-item { font-size: 0.74rem; letter-spacing: 0.04em; }

  .widget-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
  }
  .widget-head-copy { width: 100%; }
  .widget-pill { align-self: flex-start; }

  .referral-code-row {
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    gap: 10px;
  }
  .referral-code-row code {
    text-align: center;
    font-size: 0.95rem;
    letter-spacing: 0.1em;
  }
  .btn-copy {
    width: 100%;
    justify-content: center;
    padding: 11px 14px;
  }
  .referral-stat-row { grid-template-columns: 1fr 1fr; }

  .spy-feed { max-height: none; }
  .spy-row {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    align-items: start;
    min-height: auto;
    max-height: none;
    padding: 12px 14px;
    gap: 8px 10px;
  }
  .spy-row-tag {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
  }
  .spy-row-body p { white-space: normal; }

  .recent-row {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 8px 10px;
  }
  .recent-row-tag {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
  }
  .recent-row-body span {
    white-space: normal;
    line-height: 1.4;
  }

  .auth-v2-wrap { padding: 16px 12px 24px; }
  .auth-v2-form-side { padding: 24px 18px; }
  .auth-v2-visual { padding: 24px 18px; }
  .auth-v2-tabs {
    width: 100%;
    align-self: stretch;
  }
  .auth-v2-tabs a { flex: 1; justify-content: center; }
  .auth-form-grid { grid-template-columns: 1fr; }

  .captcha-frame { flex-direction: column; }
  .captcha-refresh {
    flex-direction: row;
    min-width: 0;
    width: 100%;
  }

  .loader-stage {
    padding: 28px 22px 24px;
    border-radius: 20px;
  }
}

@media (max-width: 480px) {
  .main { padding: 12px 12px calc(84px + env(safe-area-inset-bottom, 0px)); }

  .ad-banner-row--compact .ad-slot,
  .ad-banner-row--compact .ad-slot-promo {
    min-height: 58px;
    padding: 8px 10px;
  }
  .ad-banner-row--compact .ad-slot-label { font-size: 0.56rem; }
  .ad-banner-row--compact .ad-api-title { font-size: 0.72rem; }
  .ad-banner-row--compact .ad-api-cta { padding: 4px 8px; font-size: 0.58rem; }

  .ad-banner-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .ad-slot { padding: 8px 10px; min-height: 64px; }
  .ad-slot-label { font-size: 0.54rem; }
  .ad-slot-promo {
    min-height: 0;
    padding: 8px 10px;
    gap: 8px;
  }
  .ad-api-title { font-size: 0.78rem; white-space: normal; }
  .ad-api-cta { padding: 5px 8px; font-size: 0.6rem; }
  .ad-api-brand-row .ad-api-badge { display: none; }

  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: auto; }

  .live-pill.sm { display: none; }
  .top-user { max-width: 110px; }

  .referral-stat-row { grid-template-columns: 1fr; }
  .auth-v2-head h2 { font-size: 1.35rem; }
  .auth-v2-visual h1 { font-size: 1.75rem; }
  .auth-v2-stats { grid-template-columns: 1fr; }

  .theme-switcher {
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    right: 12px;
  }
  .theme-switcher-btn {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 360px) {
  .spy-row-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  .widget-icon { width: 32px; height: 32px; }
}

/* ── Packages ── */
.packages-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.packages-hero-copy { max-width: 640px; }
.packages-hero-copy h1 {
  margin: 10px 0 8px;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  line-height: 1.25;
}
.packages-hero-copy p { margin: 0; color: var(--muted); line-height: 1.55; }
.packages-current {
  min-width: 180px;
  padding: 16px 18px;
  border-radius: 14px;
}
.packages-current-label {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.packages-current strong {
  display: block;
  font-size: 1.2rem;
  color: var(--strong);
}
.packages-current small { color: var(--muted); font-size: 0.78rem; }

/* ── Upgrade / Premium gate ── */
.upgrade-page .upgrade-main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 24px 48px;
}
.upgrade-wrap {
  width: min(520px, 100%);
  animation: upgradeIn .4s ease;
}
@keyframes upgradeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.upgrade-card {
  padding: 32px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #101010;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}
.upgrade-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.upgrade-head-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(249, 115, 22, 0.1);
  color: #f97316;
  border: 1px solid rgba(249, 115, 22, 0.2);
}
.upgrade-head-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.upgrade-kicker {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f97316;
}
.upgrade-head h1 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.45;
  color: #f5f5f5;
}
.upgrade-head h1 span {
  color: #fb923c;
  font-weight: 800;
}
.upgrade-block {
  margin-bottom: 20px;
}
.upgrade-block-label {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #737373;
}
.upgrade-block h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}
.upgrade-block-desc {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #a3a3a3;
}
.upgrade-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.84rem;
}
.upgrade-meta span { color: #737373; }
.upgrade-meta strong { color: #e5e5e5; font-weight: 600; }
.upgrade-plan {
  margin-bottom: 24px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid rgba(249, 115, 22, 0.25);
  background: rgba(249, 115, 22, 0.06);
}
.upgrade-plan-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #e5e5e5;
}
.upgrade-plan-top em {
  font-style: normal;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fb923c;
  background: rgba(249, 115, 22, 0.15);
}
.upgrade-plan-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.upgrade-plan-period {
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: #737373;
}
.upgrade-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: 10px;
}
.upgrade-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.82rem;
}
.upgrade-foot a {
  color: #737373;
  text-decoration: none;
  transition: color .15s;
}
.upgrade-foot a:hover { color: #fb923c; }

.btn-block { width: 100%; justify-content: center; }

.nav-premium-tag {
  margin-left: auto;
  margin-right: 6px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #ffb86b;
  background: rgba(255, 184, 107, 0.12);
  padding: 2px 7px;
  border-radius: 999px;
}
.nav-item.sub.is-locked {
  opacity: 0.82;
}
.nav-lock-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  fill: currentColor;
  opacity: 0.55;
}

.packages-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.package-card {
  position: relative;
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100%;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.package-card:hover {
  border-color: rgba(249, 115, 22, 0.28);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), 0 0 24px rgba(249, 115, 22, 0.08);
}
.package-card.is-featured {
  border-color: rgba(249, 115, 22, 0.35);
  box-shadow: var(--shadow-lg), 0 0 24px rgba(249, 115, 22, 0.1);
  transform: translateY(-2px);
}
.package-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(34, 158, 217, 0.12);
  color: var(--telegram);
  border: 1px solid rgba(34, 158, 217, 0.22);
}
.package-head h3 { margin: 0; font-size: 1rem; color: var(--strong); }
.package-head p { margin: 4px 0 0; color: var(--muted); font-size: 0.78rem; }
.package-price strong {
  display: block;
  font-size: 1.45rem;
  line-height: 1.1;
  color: var(--strong);
}
.package-price span {
  display: block;
  margin-top: 4px;
  font-size: 0.76rem;
  color: var(--muted);
}
.package-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  flex: 1;
}
.package-features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text);
  line-height: 1.45;
}
.package-features .icon { color: #22c55e; margin-top: 2px; }
.package-buy-btn { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

.packages-payment-panel { margin-bottom: 16px; }
.crypto-methods-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0 16px 12px;
}
.crypto-method-card {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--hover-surface);
  display: grid;
  gap: 10px;
}
.crypto-method-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.crypto-coin {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--strong);
}
.crypto-coin-usdt { color: #26a17b; }
.crypto-coin-btc { color: #f7931a; }
.crypto-coin-eth { color: #627eea; }
.crypto-network {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.crypto-wallet {
  display: block;
  font-size: 0.72rem;
  word-break: break-all;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
}
.packages-payment-note {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line);
  background: var(--admin-form-bg);
}
.packages-payment-note p {
  margin: 0;
  flex: 1;
  min-width: 220px;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}
.packages-empty {
  padding: 16px;
  color: var(--muted);
  font-size: 0.84rem;
}

.package-pay-modal {
  position: fixed;
  inset: 0;
  z-index: 100500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  -webkit-overflow-scrolling: touch;
}
.package-pay-modal[hidden] { display: none; }
.package-pay-modal.is-open { display: flex !important; }
.package-pay-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay);
  backdrop-filter: blur(4px);
}
.package-pay-card {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  padding: 24px 22px 20px;
  border-radius: 18px;
}
.package-pay-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: var(--hover-surface);
  color: var(--muted);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}
.package-pay-badge {
  display: inline-block;
  margin-bottom: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(247, 147, 26, 0.12);
  color: #f7931a;
  border: 1px solid rgba(247, 147, 26, 0.25);
}
.package-pay-card h2 { margin: 0 0 6px; font-size: 1.2rem; }
.package-pay-sub { margin: 0 0 12px; color: var(--muted); font-size: 0.84rem; }
.package-pay-amount {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--strong);
  margin-bottom: 14px;
}
.package-pay-steps {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}
.package-pay-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text);
  line-height: 1.45;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--hover-surface);
  border: 1px solid var(--line);
}
.package-pay-step span {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--surface-3);
  flex-shrink: 0;
}
.package-pay-wallets {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  max-height: 180px;
  overflow: auto;
}
.package-pay-wallet-row {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--hover-surface);
}
.package-pay-wallet-row span { font-size: 0.74rem; color: var(--muted); font-weight: 600; }
.package-pay-wallet-row code {
  font-size: 0.72rem;
  word-break: break-all;
  color: var(--text);
}
body.package-pay-open { overflow: hidden; }
body.package-confirm-open { overflow: hidden; }

.package-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 100500;
  display: grid;
  place-items: center;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
}
.package-confirm-modal[hidden] { display: none; }
.package-confirm-modal.is-open { display: grid !important; }
.package-confirm-card { max-width: 420px; width: 100%; position: relative; z-index: 1; }
.package-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.package-cancel-modal {
  position: fixed;
  inset: 0;
  z-index: 100510;
  display: grid;
  place-items: center;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
}
.package-cancel-modal[hidden] { display: none; }
.package-cancel-modal.is-open { display: grid !important; }
body.package-cancel-open { overflow: hidden; }

.package-pay-actions {
  margin-top: 8px;
}

.package-pay-timer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  margin: 12px 0;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
}
.package-pay-timer-label { font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.package-pay-timer strong { font-size: 1.1rem; letter-spacing: 0.04em; }

.package-pay-amount-block {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}
.package-pay-amount-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--panel-2, rgba(255,255,255,0.04));
  border: 1px solid var(--border);
}
.package-pay-amount-row span { font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.package-pay-amount-row strong { font-size: 1rem; }
.package-pay-amount-row.muted strong { font-size: 0.88rem; color: var(--muted); }

.package-pay-qr-wrap {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  background: var(--panel-2, rgba(255,255,255,0.03));
}
.package-pay-qr-wrap img {
  border-radius: 8px;
  background: #fff;
  padding: 6px;
}
.package-pay-wallet {
  width: 100%;
  text-align: center;
  font-size: 0.72rem;
  word-break: break-all;
}

.package-pay-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 12px;
  font-size: 0.82rem;
  color: var(--muted);
}
.package-pay-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warning, #f59e0b);
  flex-shrink: 0;
}
.package-pay-status.is-checking .package-pay-status-dot { background: var(--accent); animation: pulse 1s infinite; }
.package-pay-status.is-paid .package-pay-status-dot { background: #22c55e; }
.package-pay-status.is-expired .package-pay-status-dot { background: #ef4444; }
.package-pay-check-hint {
  margin: 8px 0 0;
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.45;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@media (max-width: 1100px) {
  .packages-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crypto-methods-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .packages-grid { grid-template-columns: 1fr; }
  .packages-current { width: 100%; }
}

.hidden { display: none !important; }

.dash-page .field input:not(.field-icon-wrap input) {
  background: var(--field-bg);
  border-color: var(--field-border);
  color: var(--text);
}
.dash-page .field input:not(.field-icon-wrap input):focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px var(--focus-ring), var(--shadow-inset);
}
.dash-page .field > span {
  color: var(--field-label);
}
.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.field-tag {
  font-style: normal;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  flex-shrink: 0;
}
.field-tag.required {
  color: #b45309;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.22);
}
.field-tag.optional {
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.field-optional input:not(:focus) {
  border-style: dashed;
}
.dash-page .field input::placeholder {
  color: var(--muted);
}

.query-page .main {
  padding-top: 14px;
  padding-bottom: 20px;
}
.query-main {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.query-page-shell {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}

.query-form-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: linear-gradient(180deg, rgba(18, 18, 18, 0.98) 0%, rgba(10, 10, 10, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 22px 24px 20px;
  box-shadow: var(--shadow-md);
}
.query-form-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  color: #fb923c;
  background: rgba(249, 115, 22, 0.1);
  border: 1px solid rgba(249, 115, 22, 0.22);
}
.query-form-head {
  width: 100%;
  margin: 0 0 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.query-form-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.query-form-title {
  margin: 0;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 700;
  color: var(--strong);
  line-height: 1.2;
}
.query-form-badge-multi {
  color: #065f46;
  background: rgba(52, 211, 153, 0.15);
  border-color: rgba(52, 211, 153, 0.35);
}
.query-form-desc {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.82rem;
}
.query-form-hint {
  margin: 8px 0 0;
  color: var(--text);
  opacity: 0.82;
  font-size: 0.74rem;
}
.query-form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  padding-top: 0;
  border-top: none;
  font-size: 0.72rem;
  color: var(--muted);
}
.query-form-body {
  width: 100%;
}
.query-form-foot strong {
  color: var(--strong);
  font-size: 0.92rem;
}

.query-workspace {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}
.query-form-panel {
  display: block;
  width: 100%;
}
.query-form-card .query-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}
.query-single-layout {
  display: grid;
  gap: 12px;
  width: 100%;
}
.query-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  padding: 0;
  width: 100%;
}
.query-fields .field {
  width: 100%;
  max-width: none;
  min-width: 0;
}
.query-form-card .field > span,
.query-form-card .field-label-row {
  color: var(--field-label);
  font-size: 0.78rem;
  font-weight: 600;
}
.query-form-card .field input {
  width: 100%;
  padding: 12px 14px;
  font-size: 0.88rem;
  color: var(--text);
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.query-form-card .field input::placeholder {
  color: var(--muted);
  opacity: 0.75;
}
.query-form-card .field input:focus {
  outline: none;
  border-color: rgba(249, 115, 22, 0.45);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.14);
}
.query-form-card .field-tag.optional {
  color: var(--muted);
  background: var(--surface-2);
  border-color: var(--line);
}
.query-fields .field:only-child {
  grid-column: 1 / -1;
  max-width: none;
}
.query-fields .field:nth-last-child(1):nth-child(odd):not(:only-child) {
  grid-column: 1 / -1;
}
.query-form-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 0 0;
}
.query-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 132px;
  padding: 11px 22px;
  border: none;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, filter 0.15s ease, opacity 0.15s ease;
}
.query-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}
.query-btn-search {
  background: var(--accent-gradient);
  color: #0a0a0a;
  box-shadow: 0 8px 22px rgba(249, 115, 22, 0.32);
}
.query-btn-search:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(249, 115, 22, 0.38);
}
.query-btn-clear {
  background: #7f1d1d;
  color: #fff;
  box-shadow: 0 8px 18px rgba(127, 29, 29, 0.22);
}
.query-btn-clear:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.query-btn:disabled {
  opacity: 0.72;
  cursor: not-allowed;
  transform: none;
}
.query-btn.is-loading .query-btn-label::after {
  content: '...';
}

.query-media-wrap {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}
.query-media-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.query-media-item:only-child {
  grid-column: 1 / -1;
  max-width: 520px;
  justify-self: center;
  width: 100%;
}
.query-media-item h4 {
  margin: 0;
  padding: 12px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--strong);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.query-media-img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  background: #0f172a;
  flex: 1 1 auto;
}
.query-media-pdf {
  display: block;
  width: 100%;
  min-height: 420px;
  flex: 1 1 auto;
  border: 0;
  background: #fff;
}
.query-media-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.query-media-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}
.query-media-btn:hover {
  filter: brightness(1.05);
  color: #fff;
}
.query-media-btn:last-child {
  background: #334155;
}

.query-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.query-hero-copy { max-width: 680px; }
.query-hero-copy h1 { margin: 8px 0; font-size: clamp(1.35rem, 2vw, 1.8rem); }
.query-hero-copy p { margin: 0; color: var(--muted); line-height: 1.55; }

.query-result-panel .panel-head.compact {
  padding: 12px 16px;
}
.query-result-panel .panel-head.compact h3 {
  font-size: 0.88rem;
}
.query-result-panel .panel-head.compact p {
  font-size: 0.74rem;
  margin-top: 2px;
}

.query-result-panel .query-result-head {
  align-items: flex-start;
}
.query-result-head-copy {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}
.query-result-wrap .query-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  width: 100%;
  flex: none;
  justify-content: flex-start;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.query-export-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 4px;
}
.query-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.query-export-actions.hidden { display: none !important; }
.btn-export {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background .12s, border-color .12s, box-shadow .12s, transform .12s;
  white-space: nowrap;
}
.btn-export svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  flex-shrink: 0;
}
.btn-export:hover {
  background: var(--hover-surface);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}
.btn-export:active { transform: translateY(1px); }

.query-result-wrap {
  position: relative;
  min-height: 110px;
  max-height: min(52vh, 520px);
  overflow: auto;
  padding: 0 16px 14px;
}

.query-result-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 12px;
  text-align: center;
}
.query-result-loader.hidden { display: none; }
.query-result-loader strong { color: var(--text); font-size: 0.84rem; }
.query-result-loader p { margin: 0; color: var(--muted); font-size: 0.74rem; }

.query-loader-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--loader-track);
  border-top-color: var(--loader-accent);
  animation: loaderSpin .65s linear infinite;
}

.query-result-body {
  display: grid;
  gap: 14px;
  user-select: text;
  -webkit-user-select: text;
  -webkit-touch-callout: default;
}
.query-result-empty,
.query-result-error {
  margin: 0;
  padding: 12px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  font-size: 0.78rem;
}
.query-result-error { color: #ef4444; }

.query-result-table-wrap {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.query-result-table-title {
  margin: 0;
  padding: 12px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--strong);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.query-table-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
.query-result-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}
.query-result-table th,
.query-result-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
  user-select: text;
  -webkit-user-select: text;
  -webkit-touch-callout: default;
}
.query-cell-copyable {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.query-cell-value {
  min-width: 0;
}
.query-cell-copy-btn {
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: opacity .15s, transform .15s, background .15s;
}
.query-cell-copy-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.query-cell-copy-btn.is-copied {
  background: var(--accent);
  color: var(--accent-text);
  border-color: transparent;
}
.query-result-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-2);
  color: var(--strong);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.68rem;
}
.query-result-table tbody tr:hover {
  background: var(--hover-surface);
}
.query-result-table tbody tr:last-child td {
  border-bottom: 0;
}

.query-kv-wrap .query-kv-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 14px;
}
.query-kv-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}
.query-kv-label {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.35;
}
.query-kv-value {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.45;
  word-break: break-word;
  white-space: normal;
}
.query-kv-item:hover {
  border-color: var(--line-strong);
  background: var(--hover-surface);
}

#querySubmitBtn.is-loading {
  position: relative;
  color: transparent;
}
#querySubmitBtn.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--loader-track);
  border-top-color: var(--loader-accent);
  animation: loaderSpin .65s linear infinite;
}

@media (max-width: 960px) {
  .query-form-card {
    padding: 18px 16px 16px;
  }
  .query-form-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .query-btn {
    width: 100%;
    min-width: 0;
  }
  .query-page-shell { max-width: none; padding: 0 2px; }
  .query-kv-wrap .query-kv-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .query-result-head {
    flex-direction: column;
    align-items: stretch;
  }
  .query-result-wrap .query-export-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }
  .query-export-label {
    grid-column: 1 / -1;
  }
  .btn-export {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    font-size: 0.8rem;
  }
  .query-table-scroll {
    -webkit-overflow-scrolling: touch;
  }
  .query-result-table th,
  .query-result-table td {
    padding: 9px 10px;
    font-size: 0.74rem;
  }
}

@media (max-width: 480px) {
  .query-kv-wrap .query-kv-grid {
    grid-template-columns: 1fr;
  }
  .query-media-wrap {
    grid-template-columns: 1fr;
  }
  .query-media-item:only-child {
    max-width: none;
  }
  .query-result-wrap .query-export-actions {
    grid-template-columns: 1fr;
  }
  .query-result-wrap {
    padding-left: 14px;
    padding-right: 14px;
  }
  .query-result-panel .panel-head.compact {
    padding: 12px 14px;
  }
}

.about-hero {
  padding: 24px;
  margin-bottom: 14px;
}
.about-hero h1 {
  margin: 8px 0 12px;
  font-size: clamp(1.3rem, 2.2vw, 1.85rem);
  line-height: 1.2;
}
.about-lead {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.9rem;
  max-width: 820px;
}
.about-main {
  max-width: 980px;
  margin: 0 auto;
  width: 100%;
}
.about-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.about-content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.about-block {
  padding: 20px 22px;
}
.about-block-wide {
  grid-column: 1 / -1;
}
.about-block h2 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: var(--strong);
}
.about-block p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.84rem;
}
.about-block p:last-child {
  margin-bottom: 0;
}
.about-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.65;
}
.about-list li {
  margin-bottom: 8px;
}
.about-list strong {
  color: var(--text);
}
.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.about-tags span {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}
.about-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.leaderboard-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.leaderboard-hero-copy {
  flex: 1 1 320px;
}
.leaderboard-hero-copy h1 {
  margin: 8px 0 10px;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
}
.leaderboard-hero-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.84rem;
}
.leaderboard-you {
  min-width: 140px;
}
.leaderboard-you-tag {
  display: inline-flex;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 700;
}
tr[data-self="1"] {
  background: rgba(37, 99, 235, 0.06);
}
.about-stat {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.about-stat span {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.about-stat strong {
  font-size: 1.2rem;
  color: var(--text);
}
.about-leaderboard {
  overflow: hidden;
}
.leaderboard-wrap {
  overflow-x: auto;
}
.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.leaderboard-table th,
.leaderboard-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
.leaderboard-table th {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: var(--surface-2);
}
.leaderboard-table tbody tr:hover {
  background: var(--hover-surface);
}
.leaderboard-table tbody tr:last-child td {
  border-bottom: 0;
}
.leaderboard-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: 0.76rem;
}
.leaderboard-top-1 .leaderboard-rank {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
}
.leaderboard-top-2 .leaderboard-rank {
  background: #e5e7eb;
  border-color: #9ca3af;
  color: #374151;
}
.leaderboard-top-3 .leaderboard-rank {
  background: #ffedd5;
  border-color: #fb923c;
  color: #9a3412;
}
.leaderboard-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.leaderboard-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
}
.leaderboard-user strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.02em;
}
.leaderboard-plan {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}
.leaderboard-count {
  font-size: 0.92rem;
  color: var(--strong);
}

@media (max-width: 720px) {
  .about-content-grid {
    grid-template-columns: 1fr;
  }
  .about-hero {
    padding: 18px 16px;
  }
  .leaderboard-table th,
  .leaderboard-table td {
    padding: 10px 12px;
  }
  .leaderboard-table th:nth-child(3),
  .leaderboard-table td:nth-child(3) {
    display: none;
  }
}

/* Admin panel */
.admin-page .admin-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 20px 22px;
}
.admin-hero-stats {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.admin-hero-stats div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 72px;
}
.admin-hero-stats strong {
  font-size: 1.35rem;
  color: var(--strong);
}
.admin-hero-stats span {
  font-size: 0.72rem;
  color: var(--muted);
}
.admin-section { margin-bottom: 16px; }
.admin-users-panel .panel-head.compact {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.admin-hero-stats-wide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 16px;
}
@media (min-width: 900px) {
  .admin-hero-stats-wide {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
.admin-user-result {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.admin-user-result-top {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.admin-user-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}
.admin-user-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.admin-user-toolbar form {
  margin: 0;
  display: inline-flex;
}
.admin-activity-list {
  display: grid;
  gap: 8px;
}
.admin-activity-row {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 8px 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--admin-form-bg);
  font-size: 0.78rem;
}
.admin-activity-row span {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-activity-row em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.72rem;
  white-space: nowrap;
}
.admin-ip-banned {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 0 16px 12px;
}
.admin-ip-chip-form { margin: 0; }
.admin-ip-chip {
  border: 1px solid rgba(185, 28, 28, 0.35);
  background: rgba(185, 28, 28, 0.08);
  color: #b91c1c;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.72rem;
  cursor: pointer;
}
.admin-bulk-vip {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 12px;
}
@media (max-width: 900px) {
  .admin-activity-row {
    grid-template-columns: 1fr;
  }
}
.admin-users-panel {
  margin-bottom: 16px;
}
.admin-search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 0 16px 14px;
}
.admin-search-bar input[type="search"] {
  flex: 1 1 220px;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field-bg);
  color: var(--text);
  font-size: 0.88rem;
}
.admin-user-list {
  display: grid;
  gap: 10px;
  padding: 0 16px 16px;
}
.admin-user-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.admin-user-name {
  font-size: 0.95rem;
  color: var(--strong);
}
.admin-user-sub {
  font-size: 0.76rem;
  color: var(--muted);
}
.admin-user-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.admin-user-tags .admin-tag {
  margin-left: 0;
}
.admin-tag.muted {
  color: var(--muted);
}
.admin-vip-form {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}
.admin-vip-days {
  width: 48px;
  padding: 6px 6px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-size: 0.76rem;
  text-align: center;
}
.admin-act-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s, border-color .12s;
}
.admin-act-btn:hover {
  background: var(--surface-2);
  border-color: var(--line-strong);
}
.admin-vip-form .admin-act-btn {
  border: 0;
  border-radius: 0;
}
.admin-act-btn.admin-act-vip {
  color: #b45309;
  border-color: rgba(180, 83, 9, 0.3);
  background: rgba(180, 83, 9, 0.08);
}
.admin-act-btn.admin-act-ban {
  color: #b91c1c;
  border-color: rgba(185, 28, 28, 0.3);
  background: rgba(185, 28, 28, 0.06);
}
.admin-act-btn.admin-act-ok {
  color: #047857;
  border-color: rgba(4, 120, 87, 0.3);
  background: rgba(4, 120, 87, 0.06);
}
.admin-empty {
  padding: 0 16px 16px;
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}
@media (max-width: 720px) {
  .admin-user-toolbar {
    gap: 5px;
  }
  .admin-act-btn {
    padding: 5px 8px;
    font-size: 0.68rem;
  }
}
.admin-accordion {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.admin-acc {
  overflow: hidden;
  margin-bottom: 0;
}
.admin-acc-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  color: inherit;
}
.admin-status-pill {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  margin-left: auto;
  margin-right: 4px;
}
.admin-status-pill.ok {
  color: #047857;
  background: rgba(4, 120, 87, 0.1);
  border: 1px solid rgba(4, 120, 87, 0.25);
}
.admin-status-pill.warn {
  color: #b45309;
  background: rgba(180, 83, 9, 0.1);
  border: 1px solid rgba(180, 83, 9, 0.25);
}
.admin-acc-warn {
  border-color: rgba(180, 83, 9, 0.35);
}
.query-maint-banner {
  margin-bottom: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(180, 83, 9, 0.35);
  background: rgba(180, 83, 9, 0.08);
  color: var(--text);
  font-size: 0.84rem;
}
.query-maint-banner strong {
  display: block;
  margin-bottom: 4px;
  color: #b45309;
}
.admin-query-status-note {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.82rem;
  line-height: 1.5;
}
.admin-query-status-note.is-open {
  background: rgba(4, 120, 87, 0.08);
  border: 1px solid rgba(4, 120, 87, 0.25);
  color: var(--text);
}
.admin-query-status-note.is-open strong { color: #047857; }
.admin-query-status-note.is-closed {
  background: rgba(180, 83, 9, 0.08);
  border: 1px solid rgba(180, 83, 9, 0.25);
}
.admin-query-status-note.is-closed strong { color: #b45309; }
.admin-acc-toggle-copy h3 {
  margin: 0 0 4px;
  font-size: 0.98rem;
  color: var(--strong);
}
.admin-acc-toggle-copy p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}
.admin-acc-chevron {
  width: 18px;
  height: 18px;
  fill: var(--muted);
  flex-shrink: 0;
  transition: transform .18s ease;
}
.admin-acc.is-open .admin-acc-chevron {
  transform: rotate(180deg);
}
.admin-acc-body {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid var(--line);
}
.admin-acc.is-open .admin-acc-body {
  display: block;
  padding-top: 14px;
}
.admin-acc.is-open .admin-acc-toggle {
  background: var(--admin-form-bg);
}
.admin-settings-form,
.admin-inline-form,
.admin-search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  padding: 0;
}
.admin-marquee-form,
.admin-announce-form {
  padding: 0;
}
.admin-list {
  display: grid;
  gap: 10px;
  padding-top: 14px;
}
.admin-table-wrap {
  overflow-x: auto;
  padding-top: 14px;
}
.admin-hint {
  padding: 0;
  margin: 14px 0 0;
}
.admin-settings-form {
  flex-direction: column;
  align-items: stretch;
}
.admin-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text);
}
.admin-toggle input { width: auto; }
.admin-list-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--admin-form-bg);
}
.admin-list-row p {
  margin: 6px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}
.admin-tag {
  display: inline-flex;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.admin-tag.vip { color: #b45309; border-color: rgba(180, 83, 9, 0.25); }
.admin-tag.ban { color: #b91c1c; border-color: rgba(185, 28, 28, 0.25); }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.admin-table th,
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.admin-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.admin-actions-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 180px;
}
.admin-mini-form {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.admin-mini-input {
  width: 56px;
  padding: 6px 8px;
  font-size: 0.78rem;
}
.vip-code {
  font-family: ui-monospace, monospace;
  font-size: 0.84rem;
  letter-spacing: 0.06em;
}
.vip-redeem-panel { margin-bottom: 16px; }
.maintenance-card {
  max-width: 440px;
  margin: 0 auto;
  padding: 28px 24px;
  text-align: center;
}
.maintenance-card h1 {
  margin: 16px 0 8px;
  font-size: 1.5rem;
}
.maintenance-card p {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.6;
}
.maintenance-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* 404 error page */
.error-page .auth-v2-wrap { min-height: 100dvh; }
.error-card {
  max-width: 460px;
  margin: 0 auto;
  padding: 32px 28px;
  text-align: center;
}
.error-icon {
  width: 56px; height: 56px; margin: 0 auto 6px;
  display: grid; place-items: center; border-radius: 16px;
  background: rgba(99, 102, 241, 0.12); color: #6366f1;
}
.error-icon svg { width: 28px; height: 28px; }
.error-code {
  margin: 0 0 4px;
  font-size: clamp(2.8rem, 11vw, 4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #6366f1, #0ea5e9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.error-card h1 { margin: 14px 0 8px; font-size: 1.45rem; }
.error-card p { margin: 0 0 22px; color: var(--muted); line-height: 1.6; font-size: 0.9rem; }
.error-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.error-actions .btn { min-width: 140px; }
.auth-v2-tabs a.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* Register form premium inputs */
.register-form { gap: 20px; }
.register-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.register-fields--duo {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px 12px;
  align-items: start;
}
.register-fields--duo .field-footnote--wide {
  grid-column: 1 / -1;
  margin: 0;
}
.register-form .field-pro {
  min-width: 0;
  gap: 7px;
}
.register-form .field-label-row,
.register-form .field-pro > span {
  min-height: 1.35rem;
  align-items: center;
}
.register-form .field-hint--ghost {
  visibility: hidden;
  pointer-events: none;
}
.register-form .field-footnote {
  display: block;
  margin: 0;
  font-size: 0.72rem;
  color: #737373;
  line-height: 1.4;
}
.register-section {
  display: grid; gap: 12px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.register-section-label {
  font-size: 0.68rem; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: #737373;
}
.field-pro > span,
.field-pro .field-label-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  font-size: 0.82rem; font-weight: 700; color: var(--field-label);
}
.field-hint {
  font-style: normal; font-size: 0.68rem; font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
}
.field-hint.is-ok { color: #16a34a; }
.field-hint.is-bad { color: #dc2626; }
.field-opt {
  font-style: normal; font-size: 0.65rem; font-weight: 600;
  color: var(--muted); padding: 2px 7px; border-radius: 999px;
  background: rgba(249, 115, 22, 0.08); border: 1px solid rgba(249, 115, 22, 0.18);
  flex-shrink: 0;
}

.register-fields--duo .field-icon-pill {
  width: 30px;
  height: 30px;
  margin: 5px 0 5px 5px;
}
.register-fields--duo .field-pro-wrap .pass-toggle {
  width: 30px;
  height: 30px;
  margin: 5px;
}
.register-fields--duo .field-pro-wrap input {
  padding: 11px 6px;
  font-size: 0.84rem;
}
.register-fields--duo .field-ref input {
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}

.register-form.auth-v2-form .field-pro-wrap,
.register-form .field-pro-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  width: 100%;
  min-height: 46px;
  position: relative;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0a0a0a;
  box-shadow: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.register-form.auth-v2-form .field-pro-wrap:focus-within,
.register-form .field-pro-wrap:focus-within {
  border-color: rgba(249, 115, 22, 0.55);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
  transform: none;
}
.register-form .field-pro-wrap.is-valid {
  border-color: rgba(34, 197, 94, 0.45);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.08);
}
.register-form .field-pro-wrap.is-invalid {
  border-color: rgba(239, 68, 68, 0.45);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08);
}
.register-form .field-icon-pill {
  width: 34px; height: 34px; flex-shrink: 0;
  display: grid; place-items: center;
  margin: 6px 0 6px 6px;
  border-radius: 9px;
  background: rgba(249, 115, 22, 0.1);
  border: 1px solid rgba(249, 115, 22, 0.18);
  color: #fb923c;
}
.register-form .field-pro-wrap input {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  padding: 12px 10px 12px 8px;
  border: 0;
  background: transparent;
  font-size: 0.88rem;
  font-weight: 500;
  color: #f5f5f5;
  text-align: left;
  outline: none;
  box-shadow: none !important;
}
.register-form .field-pro-wrap input::placeholder {
  color: #525252;
  opacity: 1;
  font-weight: 400;
}
.register-form .field-ref input {
  font-family: ui-monospace, monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.82rem;
  text-align: left;
}
.register-form .field-status {
  width: 8px; height: 8px; border-radius: 50%;
  background: transparent; flex-shrink: 0;
  margin-right: 10px;
}
.register-form .field-pro-wrap.is-valid .field-status { background: #22c55e; box-shadow: 0 0 8px rgba(34,197,94,0.5); }
.register-form .field-pro-wrap.is-invalid .field-status { background: #ef4444; }

.register-form .field-pro-wrap.field-pass { padding-right: 0; }
.register-form .field-pro-wrap .pass-toggle {
  width: 34px; height: 34px; border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #737373;
  margin: 6px;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}
.register-form .field-pro-wrap .pass-toggle:hover,
.register-form .field-pro-wrap .pass-toggle.is-visible {
  background: rgba(249, 115, 22, 0.12);
  border-color: rgba(249, 115, 22, 0.22);
  color: #fb923c;
}

.strength-pro { margin-top: 4px; }
.strength-segments {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  margin-bottom: 8px;
}
.strength-seg {
  height: 4px; border-radius: 999px;
  background: var(--line);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.strength-seg.is-on:nth-child(1) { background: #ef4444; box-shadow: 0 0 8px rgba(239,68,68,0.4); }
.strength-seg.is-on:nth-child(2) { background: #f97316; box-shadow: 0 0 8px rgba(249,115,22,0.4); }
.strength-seg.is-on:nth-child(3) { background: #eab308; box-shadow: 0 0 8px rgba(234,179,8,0.4); }
.strength-seg.is-on:nth-child(4) { background: #22c55e; box-shadow: 0 0 8px rgba(34,197,94,0.4); }
.strength-pro .strength-track { display: none; }
.strength-pro small {
  font-size: 0.74rem; font-weight: 600; color: var(--muted);
}

.captcha-frame-pro { gap: 12px; }
.captcha-media-pro {
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: linear-gradient(145deg, #0a0f1a, #111827);
  min-height: 92px;
  position: relative;
}
.captcha-media-pro:hover { border-color: rgba(249, 115, 22, 0.35); }
.captcha-tap-hint {
  position: absolute; bottom: 6px; right: 8px;
  font-size: 0.58rem; font-weight: 700; letter-spacing: 0.04em;
  color: rgba(255,255,255,0.45); text-transform: uppercase;
  pointer-events: none;
}
.captcha-refresh-pro {
  border-radius: 14px;
  min-width: 80px;
  background: var(--surface-2);
  border: 1.5px solid var(--line);
  color: var(--text);
  font-weight: 700;
}
.captcha-refresh-pro:hover {
  border-color: var(--primary);
  background: var(--surface);
}
.register-form .captcha-field {
  font-size: 1rem;
  letter-spacing: 0.2em;
  font-weight: 800;
  text-align: left;
}

.btn-submit-pro {
  position: relative; overflow: hidden;
  border-radius: 12px;
  padding: 15px 22px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0a0a0a;
  background: var(--accent-gradient);
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.3);
}
[data-theme="light"] .btn-submit-pro,
[data-theme="dark"] .btn-submit-pro {
  background: var(--accent-gradient);
  color: #0a0a0a;
}
.btn-submit-shine {
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.2) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: regBtnShine 3s ease-in-out infinite;
}
@keyframes regBtnShine {
  0%, 50% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}
.btn-submit-pro:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(249, 115, 22, 0.38);
  filter: brightness(1.05);
}

@media (max-width: 720px) {
  .register-section { padding: 14px; }
  .register-form .field-pro-wrap input { font-size: 16px; }
}
@media (max-width: 480px) {
  .register-fields--duo { grid-template-columns: 1fr; }
}

/* Profile */
.profile-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 18px 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.profile-banner-main { display: flex; align-items: center; gap: 16px; min-width: 0; }
.profile-banner-avatar { position: relative; flex-shrink: 0; }
.profile-banner-avatar img {
  width: 72px; height: 72px; border-radius: 18px;
  object-fit: cover; box-shadow: var(--shadow-sm);
  border: 2px solid var(--line);
}
.profile-banner-vip {
  position: absolute; right: -4px; bottom: -4px;
  padding: 2px 7px; border-radius: 999px;
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.04em;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #422006;
}
.profile-banner-kicker {
  display: block; font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted);
}
.profile-banner-copy h2 { margin: 4px 0; font-size: 1.35rem; }
.profile-banner-copy p { margin: 0; color: var(--muted); font-size: 0.86rem; }
.profile-banner-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.user-avatar-img {
  padding: 0; overflow: hidden; background: transparent;
}
.user-avatar-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.user-chip-link {
  text-decoration: none; color: inherit;
  border-radius: 12px; transition: background 0.15s ease;
}
.user-chip-link:hover { background: var(--surface-2); }

.top-user-link {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--text);
  padding: 6px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  font-size: 0.82rem; font-weight: 600;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.top-user-link:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.top-user-avatar { border-radius: 8px; display: block; }

.profile-main { padding-top: 12px; }

/* Profile page v2 */
.profile-cover {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  margin-bottom: 14px;
}
.profile-cover-bg {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, transparent 100%);
}
.profile-orb { display: none; }

.profile-cover-inner {
  position: relative; z-index: 1;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  padding: 28px 28px 20px;
}
.profile-cover-user { display: flex; align-items: center; gap: 20px; min-width: 0; }
.profile-cover-avatar {
  position: relative; flex-shrink: 0;
  width: 112px; height: 112px;
}
.profile-avatar-ring {
  position: absolute; inset: -3px; border-radius: 24px;
  background: var(--line);
  opacity: 1;
}
.profile-cover-avatar img {
  position: relative; z-index: 1;
  width: 112px; height: 112px; border-radius: 22px;
  border: 3px solid var(--surface);
  object-fit: cover;
  box-shadow: 0 12px 32px rgba(0,0,0,0.15);
}
.profile-avatar-status {
  position: absolute; right: 6px; bottom: 6px; z-index: 2;
  width: 14px; height: 14px; border-radius: 50%;
  background: #22c55e; border: 2px solid var(--surface);
  box-shadow: 0 0 0 2px rgba(34,197,94,0.35);
}
.profile-cover-kicker {
  display: inline-block;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: 4px;
}
.profile-cover-copy h1 {
  margin: 0 0 10px; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800;
  letter-spacing: -0.02em;
}
.profile-badge-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.profile-badge {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: 999px;
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.03em;
  border: 1px solid var(--line); background: var(--surface-2);
}
.profile-badge-plan,
.profile-badge-vip,
.profile-badge-admin,
.profile-badge-multi,
.profile-badge-device {
  color: var(--muted);
  background: var(--surface-2);
  border-color: var(--line);
  font-weight: 700;
}
.profile-cover-meta { margin: 0; font-size: 0.8rem; color: var(--muted); }

.profile-cover-actions {
  display: flex; flex-wrap: wrap; gap: 8px; align-self: center;
}
.profile-quick-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px;
  background: #111; color: #fff;
  font-size: 0.82rem; font-weight: 700; text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.profile-quick-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.profile-quick-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(0,0,0,0.2); }
.profile-quick-btn-ghost {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .profile-quick-btn { background: #f97316; color: #0a0a0a; }
[data-theme="dark"] .profile-quick-btn-ghost { background: rgba(249,115,22,0.1); color: #fb923c; border-color: rgba(249,115,22,0.25); }

.profile-stat-strip {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px; background: var(--line);
  border-top: 1px solid var(--line);
}
.profile-stat-tile {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px; background: var(--surface);
}
.profile-stat-icon {
  width: 38px; height: 38px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--muted);
}
.profile-stat-icon svg { width: 18px; height: 18px; }
.profile-stat-icon-list,
.profile-stat-icon-lock,
.profile-stat-icon-warn { background: var(--surface-2); color: var(--muted); }
.profile-stat-tile strong {
  display: block; font-size: 1.25rem; font-weight: 800; color: var(--text);
  line-height: 1.1;
}
.profile-stat-tile span { font-size: 0.72rem; color: var(--muted); font-weight: 600; }

.profile-tabs {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 6px; margin-bottom: 16px;
  border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  position: sticky; top: 10px; z-index: 20;
  box-shadow: var(--shadow-sm);
}
.profile-tab {
  flex: 1; min-width: 80px;
  text-align: center; padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.82rem; font-weight: 700;
  color: var(--muted); text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.profile-tab:hover { color: var(--text); background: var(--surface); }
.profile-tab.is-active {
  background: #111; color: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.profile-tab-danger.is-active { background: #dc2626; color: #fff; }
[data-theme="dark"] .profile-tab.is-active { background: rgba(249,115,22,0.16); color: #fb923c; }
[data-theme="dark"] .profile-tab-danger.is-active { background: #ef4444; color: #fff; }

.profile-layout { display: grid; gap: 16px; width: 100%; }
.profile-section { scroll-margin-top: 80px; }
.profile-section[hidden] { display: none !important; }

/* ── Profile hero (v4) ── */
.profile-hero {
  padding: 0;
  overflow: hidden;
  margin-bottom: 16px;
  border-radius: 20px;
}
.profile-hero-top {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 26px 28px 22px;
  flex-wrap: wrap;
}
.profile-hero-avatar {
  position: relative;
  flex-shrink: 0;
}
.profile-hero-avatar img {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  border: 2px solid var(--line);
  object-fit: cover;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease;
}
.profile-hero-vip {
  position: absolute;
  right: -6px;
  bottom: -4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #422006;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}
.profile-hero-info {
  flex: 1;
  min-width: 220px;
}
.profile-hero-kicker {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.profile-hero-info h1 {
  margin: 0 0 10px;
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.15;
}
.profile-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.profile-hero-badge {
  display: inline-flex;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.profile-hero-badge-admin {
  color: var(--text);
  background: rgba(249, 115, 22, 0.12);
  border-color: rgba(249, 115, 22, 0.28);
}
[data-theme="dark"] .profile-hero-badge-admin {
  color: #fb923c;
}
.profile-hero-meta {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
  max-width: 640px;
}
.profile-hero .profile-stat-strip {
  border-radius: 0;
  border-top: 1px solid var(--line);
}

.profile-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}
.profile-card-header-inline {
  margin-bottom: 0;
}
.profile-card-header .profile-block-title {
  margin: 0 0 4px;
}
.profile-card-header .profile-block-desc {
  margin: 0;
}
.profile-card-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--line);
}
.profile-card-icon svg {
  width: 20px;
  height: 20px;
}
.profile-card-icon-vip {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
  border-color: rgba(245, 158, 11, 0.25);
}
.profile-card-icon-lock {
  background: rgba(99, 102, 241, 0.12);
  color: #6366f1;
  border-color: rgba(99, 102, 241, 0.22);
}
.profile-card-icon-list {
  background: rgba(14, 165, 233, 0.12);
  color: #0ea5e9;
  border-color: rgba(14, 165, 233, 0.22);
}
.profile-card-icon-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.25);
}
.profile-field-flush {
  margin-bottom: 0;
}
.profile-vip-stack {
  display: grid;
  gap: 12px;
}
.profile-avatar-save {
  justify-self: start;
}
.profile-login-item.is-fail strong {
  color: #ef4444;
}

.profile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 22px 24px;
  margin-bottom: 14px;
  border-radius: 18px;
}
.profile-head-main {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}
.profile-head-avatar {
  width: 88px;
  height: 88px;
  border-radius: 18px;
  border: 1px solid var(--line);
  object-fit: cover;
  flex-shrink: 0;
}
.profile-head-copy h1 {
  margin: 0 0 8px;
  font-size: 1.45rem;
  font-weight: 800;
}
.profile-head-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}
.profile-chip {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.profile-head-meta {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}
.profile-head-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(72px, 1fr));
  gap: 10px;
  flex: 1 1 280px;
  max-width: 420px;
}
.profile-head-stat {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  text-align: center;
}
.profile-head-stat strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.1;
}
.profile-head-stat span {
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 600;
}

.profile-tabs-bar {
  border-radius: 14px;
  margin-bottom: 14px;
}

.profile-card-full { width: 100%; }
.profile-block-title {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 800;
}
.profile-block-desc {
  margin: -4px 0 14px;
  font-size: 0.82rem;
  color: var(--muted);
}
.profile-hesap-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.profile-hesap-block {
  min-width: 0;
}
.profile-avatar-form {
  display: grid;
  gap: 16px;
}
.profile-avatar-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.profile-avatar-choice {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 18px 14px;
  border-radius: 16px;
  border: 2px solid var(--line);
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.profile-avatar-choice img {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  object-fit: cover;
}
.profile-avatar-choice span {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--muted);
}
.profile-avatar-choice:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}
.profile-avatar-choice.is-active {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--primary);
}
.profile-avatar-choice.is-active span {
  color: var(--text);
}
.profile-vip-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.profile-vip-row .profile-input { flex: 1; min-width: 0; }
.profile-vip-row .btn { white-space: nowrap; }

.profile-guvenlik-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.profile-delete-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  max-width: 720px;
}

.profile-card {
  padding: 22px 24px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.profile-card-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.profile-card-head-row .profile-block-title { margin: 0; }
.profile-password-form {
  display: grid;
  gap: 12px;
}
.profile-login-list-compact {
  display: grid;
  gap: 8px;
}
.profile-login-list-compact .profile-login-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 0.8rem;
}
.profile-login-list-compact .profile-login-item span {
  color: var(--muted);
  text-align: right;
}
.profile-card-danger { border-color: rgba(239, 68, 68, 0.35); }

.profile-cover-compact {
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.profile-cover-compact .profile-cover-inner {
  padding: 18px 20px;
}
.profile-cover-avatar-sm {
  width: 72px;
  height: 72px;
}
.profile-cover-avatar-sm img {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  border: 1px solid var(--line);
  object-fit: cover;
}
.profile-cover-compact .profile-cover-copy h1 {
  margin: 0 0 6px;
  font-size: 1.35rem;
}
.profile-cover-compact .profile-cover-meta {
  font-size: 0.78rem;
  line-height: 1.5;
}

.profile-card-title {
  margin: 0 0 14px;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text);
}
.profile-card-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.profile-card-head-row .profile-card-title { margin: 0; }
.profile-card-note {
  margin: -6px 0 14px;
  font-size: 0.82rem;
  color: var(--muted);
}

.profile-card {
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: none;
}
.profile-card:hover { box-shadow: none; }

.avatar-picker-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.avatar-picker-inline .avatar-picker-grid {
  margin: 0;
  max-width: none;
  flex: 1 1 180px;
}
.profile-vip-form-inline {
  display: flex;
  gap: 10px;
  align-items: center;
}
.profile-vip-form-inline .profile-input {
  flex: 1;
  min-width: 0;
}

.profile-history-list-compact .profile-history-item {
  padding: 12px 0;
  gap: 10px;
}
.profile-history-list-compact .profile-history-main p {
  font-size: 0.82rem;
  margin: 2px 0;
}
.profile-login-list-compact {
  display: grid;
  gap: 8px;
}
.profile-login-list-compact .profile-login-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 0.8rem;
}
.profile-login-list-compact .profile-login-item span {
  color: var(--muted);
  text-align: right;
}
.profile-password-form {
  display: grid;
  gap: 12px;
}

.profile-section-split {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.profile-card-wide { width: 100%; }
.profile-card-danger {
  border-color: rgba(239,68,68,0.3);
}

.profile-section-head {
  display: flex; align-items: flex-start; gap: 14px;
  margin-bottom: 18px;
}
.profile-section-head-row {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.profile-section-head-row > div { flex: 1; min-width: 0; }
.profile-section-head h2 { margin: 0 0 4px; font-size: 1.08rem; font-weight: 800; }
.profile-section-head p { margin: 0; color: var(--muted); font-size: 0.82rem; line-height: 1.45; }
.profile-section-icon {
  width: 42px; height: 42px; flex-shrink: 0;
  display: grid; place-items: center; border-radius: 14px;
}
.profile-section-icon svg { width: 20px; height: 20px; }
.profile-section-icon-purple { background: rgba(99,102,241,0.14); color: #6366f1; }
.profile-section-icon-gold { background: rgba(245,158,11,0.15); color: #d97706; }
.profile-section-icon-blue { background: rgba(14,165,233,0.14); color: #0284c7; }
.profile-section-icon-green { background: rgba(34,197,94,0.14); color: #16a34a; }
.profile-section-icon-red { background: rgba(239,68,68,0.14); color: #dc2626; }

.avatar-picker-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px; margin-bottom: 16px; max-width: 280px;
}
.avatar-option {
  display: grid; gap: 6px; justify-items: center;
  padding: 12px 8px; border-radius: 16px;
  border: 2px solid var(--line); background: var(--surface-2);
  cursor: pointer; transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.avatar-option img { width: 56px; height: 56px; border-radius: 14px; }
.avatar-option span { font-size: 0.72rem; font-weight: 700; color: var(--muted); }
.avatar-option:hover { border-color: var(--primary); transform: translateY(-2px); }
.avatar-option.is-active {
  border-color: var(--line-strong);
  box-shadow: none;
  transform: none;
  background: var(--surface);
}
.profile-save-btn { width: 100%; }

.profile-vip-form { display: grid; gap: 12px; }
.profile-field-vip .profile-input {
  font-family: ui-monospace, monospace; letter-spacing: 0.08em;
  text-transform: uppercase;
}
.profile-vip-submit { width: 100%; font-weight: 800; }
.profile-ref-box {
  margin-top: 16px; padding: 12px 14px; border-radius: 14px;
  background: var(--surface-2); border: 1px dashed var(--line);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.profile-ref-box span { font-size: 0.74rem; color: var(--muted); font-weight: 600; }
.profile-ref-box code {
  font-size: 0.9rem; font-weight: 800; letter-spacing: 0.06em;
  color: var(--primary);
}

.profile-input {
  width: 100%;
  padding: 11px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface-2);
  color: var(--text); font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.profile-input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.profile-field { display: grid; gap: 6px; margin-bottom: 12px; }
.profile-field span { font-size: 0.78rem; font-weight: 600; color: var(--muted); }

.profile-history-list { display: grid; gap: 10px; }
.profile-history-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border-radius: 16px;
  background: var(--surface-2); border: 1px solid var(--line);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.profile-history-item:hover { border-color: rgba(99,102,241,0.35); transform: translateX(2px); }
.profile-history-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  display: grid; place-items: center; border-radius: 12px;
  background: rgba(249, 115, 22, 0.12); color: var(--primary);
}
.profile-history-icon svg { width: 16px; height: 16px; }
.profile-history-main { flex: 1; min-width: 0; }
.profile-history-top { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.profile-history-main strong { font-size: 0.92rem; }
.profile-history-tag {
  padding: 2px 8px; border-radius: 999px;
  font-size: 0.65rem; font-weight: 800;
  background: rgba(249, 115, 22, 0.12); color: var(--primary);
}
.profile-history-main p { margin: 4px 0; font-size: 0.82rem; color: var(--text); }
.profile-history-main small { color: var(--muted); font-size: 0.72rem; }
.profile-history-del {
  flex-shrink: 0; width: 36px; height: 36px;
  display: grid; place-items: center; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.profile-history-del svg { width: 16px; height: 16px; }
.profile-history-del:hover {
  color: #dc2626; border-color: rgba(239,68,68,0.4);
  background: rgba(239,68,68,0.06);
}

.profile-pagination {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 8px;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--line);
}
.profile-page-list { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.profile-page-link, .profile-page-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 36px; padding: 8px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface-2);
  color: var(--text); font-size: 0.78rem; font-weight: 700;
  text-decoration: none; transition: border-color 0.15s ease, background 0.15s ease;
}
.profile-page-link:hover, .profile-page-btn:hover { border-color: var(--primary); background: var(--surface); }
.profile-page-link.is-active { background: #111; border-color: #111; color: #fff; }
[data-theme="dark"] .profile-page-link.is-active { background: rgba(249,115,22,0.16); color: #fb923c; border-color: rgba(249,115,22,0.3); }
.profile-page-meta { margin: 10px 0 0; text-align: center; font-size: 0.74rem; color: var(--muted); }

.profile-empty {
  padding: 32px 20px; border-radius: 16px;
  background: var(--surface-2); border: 1px dashed var(--line);
  text-align: center; color: var(--muted);
}
.profile-empty-icon {
  width: 52px; height: 52px; margin: 0 auto 10px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
}
.profile-empty-icon svg { width: 26px; height: 26px; }
.profile-empty strong { display: block; color: var(--text); margin-bottom: 6px; }
.profile-empty p { margin: 0 0 14px; font-size: 0.84rem; }
.profile-empty-inline { padding: 16px; border-radius: 12px; background: var(--surface-2); color: var(--muted); font-size: 0.84rem; }

body.profile-confirm-open { overflow: hidden; }
.profile-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 1210;
  display: grid;
  place-items: center;
  padding: 16px;
}
.profile-confirm-modal[hidden] { display: none; }
.profile-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay);
}
.profile-confirm-card {
  position: relative;
  z-index: 1;
  max-width: 420px;
  width: 100%;
  padding: 22px;
}
.profile-confirm-badge {
  display: inline-block;
  margin-bottom: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(99, 102, 241, 0.12);
  color: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.25);
}
.profile-confirm-badge.is-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.25);
}
.profile-confirm-card h2 { margin: 0 0 8px; font-size: 1.15rem; }
.profile-confirm-card p { margin: 0; color: var(--muted); font-size: 0.86rem; line-height: 1.5; }
.profile-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.profile-security-grid {
  display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 16px; align-items: start;
}
.profile-panel-inner {
  padding: 18px; border-radius: 16px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.profile-password-form h3, .profile-login-log h3 { margin: 0 0 12px; font-size: 0.95rem; font-weight: 800; }
.profile-login-note { margin: 0 0 12px; color: var(--muted); font-size: 0.8rem; }

.profile-login-list {
  display: grid; gap: 8px; max-height: 380px; overflow: auto;
  padding-right: 4px;
}
.profile-login-item {
  display: flex; gap: 10px; padding: 10px 12px;
  border-radius: 12px; background: var(--surface);
  border: 1px solid var(--line);
}
.profile-login-item.is-fail { border-color: rgba(239,68,68,0.25); background: rgba(239,68,68,0.03); }
.profile-login-item-icon {
  width: 28px; height: 28px; flex-shrink: 0;
  display: grid; place-items: center; border-radius: 8px;
  background: rgba(34,197,94,0.15); color: #15803d;
}
.profile-login-item-icon svg { width: 16px; height: 16px; }
.profile-login-item.is-fail .profile-login-item-icon {
  background: rgba(239,68,68,0.15); color: #b91c1c;
}
.profile-login-item-body strong { display: block; font-size: 0.82rem; margin-bottom: 2px; }
.profile-login-item-body span { font-size: 0.72rem; color: var(--muted); }
.profile-login-item-body span code { font-size: 0.7rem; }
.profile-login-item-body p { margin: 4px 0 0; font-size: 0.7rem; color: var(--muted); line-height: 1.4; }

.profile-delete-form { max-width: 440px; }

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff; border: none;
  box-shadow: 0 8px 20px rgba(239,68,68,0.25);
}
.btn-danger:hover { filter: brightness(1.05); }

@media (max-width: 900px) {
  .profile-hesap-grid,
  .profile-guvenlik-grid { grid-template-columns: 1fr; }
  .profile-hero-top { padding: 20px 18px 16px; }
  .profile-hero-info h1 { font-size: 1.35rem; }
  .profile-head { flex-direction: column; align-items: stretch; }
  .profile-head-stats { max-width: none; grid-template-columns: repeat(2, 1fr); }
  .profile-delete-form-grid { grid-template-columns: 1fr; }
  .profile-vip-row { flex-direction: column; }
  .profile-section-split { grid-template-columns: 1fr; }
  .profile-security-grid { grid-template-columns: 1fr; }
  .profile-stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .avatar-picker-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-cover-inner { flex-direction: column; align-items: stretch; }
  .profile-cover-user { flex-direction: column; text-align: center; }
  .profile-badge-row { justify-content: center; }
  .profile-cover-actions { justify-content: center; }
}
@media (max-width: 520px) {
  .profile-tabs { border-radius: 16px; }
  .profile-tab { min-width: calc(50% - 6px); flex: unset; }
  .profile-vip-form-inline { flex-direction: column; align-items: stretch; }
  .avatar-picker-inline { flex-direction: column; align-items: stretch; }
  .profile-stat-strip { grid-template-columns: 1fr; }
  .profile-cover-inner { padding: 18px 14px 14px; }
  .profile-cover-actions { flex-direction: column; width: 100%; }
  .profile-quick-btn { width: 100%; justify-content: center; }
  .profile-section-head-row > form { width: 100%; }
  .profile-section-head-row > form .btn { width: 100%; }
  .profile-history-item { flex-wrap: wrap; gap: 10px; }
  .profile-page-btn { flex: 1; min-width: 0; }
}

/* ── Mobile responsive polish (all pages) ── */
@media (max-width: 768px) {
  html, body { overflow-x: clip; }

  .dash-page .panel-head {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .dash-page .panel-head .btn,
  .dash-page .panel-head .widget-pill { align-self: flex-start; }

  .topbar-left { min-width: 0; }
  .telegram-link {
    max-width: min(160px, calc(100vw - 200px));
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.72rem;
    padding: 5px 9px;
  }

  .packages-hero,
  .query-hero,
  .leaderboard-hero {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .packages-current,
  .query-hero .packages-current,
  .leaderboard-you { width: 100%; }

  .upgrade-wrap { width: 100%; }
  .upgrade-card { padding: 24px 20px; }
  .upgrade-foot { flex-direction: column; align-items: flex-start; }

  .query-fields { grid-template-columns: 1fr; }
  .query-form-title { width: 100%; }

  .about-content-grid { grid-template-columns: 1fr; }
  .about-hero { padding: 18px 16px; }
  .about-block { padding: 16px; }

  .leaderboard-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .leaderboard-table { min-width: 520px; }

  .admin-page .admin-hero {
    flex-direction: column;
    padding: 16px;
  }
  .admin-hero-stats-wide {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .admin-users-panel .panel-head.compact {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-search-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 0 14px 14px;
  }
  .admin-search-bar input[type="search"] { flex: none; width: 100%; }
  .admin-search-bar .btn { width: 100%; }
  .admin-inline-form,
  .admin-marquee-form,
  .admin-announce-form {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-inline-form .btn,
  .admin-marquee-actions .btn { width: 100%; }
  .admin-acc-toggle { padding: 14px; gap: 10px; }
  .admin-acc-toggle .admin-status-pill { margin-left: 0; margin-right: auto; }
  .admin-user-toolbar { gap: 5px; }
  .admin-vip-form { flex-wrap: wrap; }

  .package-pay-modal,
  .package-confirm-modal,
  .package-cancel-modal,
  .profile-confirm-modal {
    padding: 12px;
    align-items: flex-end;
  }
  .package-pay-card,
  .package-confirm-card,
  .profile-confirm-card {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
  .package-pay-wallet {
    word-break: break-all;
    font-size: 0.68rem;
    white-space: normal;
  }

  .bot-popup-card {
    width: min(calc(100vw - 24px), 400px);
    margin: 12px;
    padding: 22px 18px;
  }

  .error-card { padding: 24px 18px; margin: 0 12px; }
  .error-actions { flex-direction: column; }
  .error-actions .btn { width: 100%; min-width: 0; }

  .maintenance-card { margin: 0 12px; padding: 24px 18px; }
  .maintenance-actions { flex-direction: column; }
  .maintenance-actions .btn { width: 100%; }

  .dashboard-home .main { padding-top: 10px; }
  .dashboard-home .topbar { margin-bottom: 8px; }
}

@media (max-width: 480px) {
  .admin-hero-stats-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-tab { min-width: 100%; }
  .avatar-picker-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .account-info-grid { grid-template-columns: 1fr; }
  .packages-payment-note {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }
  .packages-payment-note .btn { width: 100%; }
}

/* ── Global UI polish (siyah / turuncu) ── */
.sidebar-user {
  background: rgba(249, 115, 22, 0.04);
  border-color: rgba(249, 115, 22, 0.12);
}
.nav-item.active {
  box-shadow: inset 0 0 0 1px rgba(249, 115, 22, 0.2), 0 0 20px rgba(249, 115, 22, 0.08);
}
.stat-value { color: var(--strong); }
.stat-card:hover {
  border-color: rgba(249, 115, 22, 0.22);
}
.package-features .icon { color: #fb923c; }
.telegram-link {
  border-color: rgba(42, 171, 238, 0.25);
  transition: border-color .15s, box-shadow .15s, transform .12s;
}
.telegram-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(42, 171, 238, 0.15);
}
.dashboard-home .ad-banner-row--compact .ad-slot--compact {
  border-color: rgba(255, 255, 255, 0.08) !important;
  background: rgba(14, 14, 14, 0.9) !important;
}
.query-result-panel {
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(16, 16, 16, 0.98), rgba(10, 10, 10, 0.98));
}
.btn-lg {
  padding: 12px 18px;
  font-size: 0.92rem;
  border-radius: 11px;
}

.login-confirm-panel {
  padding: 18px 20px;
  margin-bottom: 18px;
  text-align: center;
  border: 1px solid rgba(249, 115, 22, 0.25);
  background: rgba(249, 115, 22, 0.06);
}
.login-confirm-label {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 8px;
}
.login-confirm-user {
  display: block;
  font-size: 1.6rem;
  letter-spacing: 0.02em;
}
.login-confirm-note {
  margin: 8px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}
.login-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.btn-submit-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text);
  box-shadow: none;
}
.register-turnstile {
  display: flex;
  justify-content: center;
  margin: 14px 0 18px;
}
.auth-captcha-stack {
  display: grid;
  gap: 14px;
  margin: 14px 0 18px;
}
.auth-captcha-stack .register-turnstile,
.auth-captcha-stack .auth-recaptcha {
  margin: 0;
  display: flex;
  justify-content: center;
}
.auth-recaptcha .g-recaptcha {
  transform-origin: center top;
}
@media (max-width: 480px) {
  .auth-recaptcha .g-recaptcha {
    transform: scale(0.92);
  }
}

/* Register page: centered compact card */
.login-page .auth-v2-wrap,
.register-page .auth-v2-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 32px 20px;
  align-items: center;
  justify-content: center;
}
.login-page .auth-v2-card,
.register-page .auth-v2-card {
  width: min(400px, 100%);
  margin: 0 auto;
}
.login-page .auth-v2-form-side,
.register-page .auth-v2-form-side {
  padding: 28px 28px 24px;
  justify-content: center;
}
.login-page .auth-v2-tabs,
.register-page .auth-v2-tabs {
  margin-bottom: 18px;
}
.login-page .auth-v2-head--compact,
.register-page .auth-v2-head--compact {
  margin-bottom: 14px;
}
.login-page .auth-v2-head--compact h2,
.register-page .auth-v2-head--compact h2 {
  font-size: 1.35rem;
  margin: 0;
}
.login-page .auth-v2-head--compact p,
.register-page .auth-v2-head--compact p {
  margin: 4px 0 0;
  font-size: 0.82rem;
}
.login-page .login-password-form {
  gap: 12px;
}
.login-page .login-password-form .field-icon-wrap {
  min-height: 44px;
}
.login-page .login-password-form .field-icon-wrap input {
  padding: 11px 0;
  font-size: 0.88rem;
}
.login-page .remember {
  font-size: 0.82rem;
  padding: 0;
}
.register-page .register-form {
  gap: 16px;
}
.register-page .register-form .field-pro {
  gap: 7px;
}
.register-page .register-form .field-pro-wrap {
  min-height: 46px;
}
.register-page .register-form .field-pro-wrap input {
  padding: 12px 10px;
  font-size: 0.88rem;
}
.register-page .register-form .field-label-row,
.register-page .register-form .field-pro > span {
  font-size: inherit;
  min-height: 1.35rem;
}
.register-page .register-turnstile {
  margin: 10px 0 14px;
  transform: none;
}
.login-page .btn-submit-compact,
.register-page .btn-submit-compact {
  min-height: 44px;
  padding: 12px 18px;
  font-size: 0.92rem;
  margin-top: 2px;
}
.login-page .auth-v2-footer,
.register-page .auth-v2-footer {
  margin-top: 16px;
  padding-top: 14px;
  font-size: 0.84rem;
}

/* Compact captcha (login + register) — image ustte, input altta tam genislik */
.auth-image-captcha--compact {
  gap: 8px;
}
.auth-image-captcha--compact > span {
  font-size: 0.84rem;
}
.auth-captcha-stack-v2 {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.auth-captcha-stack-v2 .captcha-media-auth {
  width: 100%;
  flex: none;
  min-height: 64px !important;
  border-radius: 12px;
  background: #0c1220;
}
.auth-captcha-stack-v2 .captcha-media-auth img {
  width: 100%;
  height: 64px;
  object-fit: contain;
  background: #0c1220;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}
.auth-captcha-stack-v2 .captcha-input-wrap--auth {
  width: 100%;
  margin-top: 0;
  min-height: 46px;
  padding: 0 14px;
}
.auth-captcha-stack-v2 .captcha-input-wrap--auth input {
  padding: 13px 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.login-page .auth-captcha-stack-v2 .captcha-input-wrap--auth,
.register-page .auth-captcha-stack-v2 .captcha-input-wrap--auth {
  min-height: 46px;
}
.login-page .auth-captcha-stack-v2 .captcha-input-wrap--auth input,
.register-page .auth-captcha-stack-v2 .captcha-input-wrap--auth input {
  font-size: 1rem;
}

/* Eski yan yana layout (activity popup vb.) */
.auth-captcha-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}
.auth-captcha-row .captcha-input-wrap {
  flex: 1;
  margin-top: 0;
  min-height: 64px;
  padding: 0 12px;
}
.auth-captcha-row .captcha-input-wrap input {
  padding: 12px 0;
  font-size: 0.88rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.captcha-media-compact {
  flex: 0 0 240px;
  width: 240px;
  min-height: 64px !important;
  border-radius: 10px;
  background: #0c1220;
}
.captcha-media-compact img {
  width: 240px;
  height: 64px;
  object-fit: contain;
  background: #0c1220;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}
.captcha-media-compact .captcha-tap-hint {
  bottom: 4px;
  right: 6px;
  font-size: 0.5rem;
}
@media (max-width: 420px) {
  .auth-captcha-row {
    flex-direction: column;
  }
  .captcha-media-compact {
    flex: none;
    width: 100%;
  }
  .captcha-media-compact img {
    width: 100%;
  }
}

.auth-v2-reviews {
  display: grid;
  gap: 9px;
  margin-top: auto;
}
.auth-v2-review {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.auth-v2-review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.auth-v2-review-head strong {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fb923c;
  letter-spacing: 0.01em;
}
.auth-v2-review-stars {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: #fbbf24;
  line-height: 1;
}
.auth-v2-review p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.68);
}

@media (max-width: 768px) {
  .register-page .auth-v2-reviews {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
  }
  .register-page .auth-v2-review:last-child {
    grid-column: 1 / -1;
  }
  .register-page .auth-v2-visual {
    padding: 20px 18px;
    gap: 14px;
  }
}
@media (max-width: 520px) {
  .register-page .auth-v2-reviews {
    grid-template-columns: 1fr;
  }
  .register-page .auth-v2-review:last-child {
    grid-column: auto;
  }
}
.banned-card {
  max-width: 520px;
}
.banned-badge {
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.banned-support {
  padding: 18px;
  margin-top: 18px;
  text-align: center;
}
.banned-support p {
  color: var(--muted);
  margin: 8px 0 14px;
}
.banned-until {
  color: #fbbf24;
  font-size: 0.85rem;
}
.banned-note {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(249, 115, 22, 0.08);
  border: 1px solid rgba(249, 115, 22, 0.18);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.84rem;
  line-height: 1.55;
}
.banned-note strong {
  color: #fb923c;
}
.admin-ip-chip-ok {
  border-color: rgba(34, 197, 94, 0.35);
  color: #86efac;
}

.activity-captcha-modal {
  position: fixed;
  inset: 0;
  z-index: 10100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.activity-captcha-modal[hidden] { display: none !important; }
.activity-captcha-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay, rgba(0, 0, 0, 0.72));
  backdrop-filter: blur(4px);
}
.activity-captcha-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  padding: 22px 20px 18px;
  border-radius: 18px;
  background: var(--card, #111827);
  border: 1px solid rgba(249, 115, 22, 0.25);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.activity-captcha-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}
.activity-captcha-card > p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}
.activity-captcha-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
}
.activity-captcha-row .captcha-input-wrap {
  flex: 1 1 160px;
  margin-top: 0;
}
.activity-captcha-error {
  margin: 10px 0 0;
  color: #f87171;
  font-size: 0.82rem;
}
body.activity-captcha-open {
  overflow: hidden;
}

/* ── Forum-style session notice bar (top strip) ── */
.forum-notice-bar,
.session-refresh-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 12000;
  animation: forumNoticeIn 0.28s ease;
}
.forum-notice-bar[hidden],
.session-refresh-banner[hidden] {
  display: none !important;
}
@keyframes forumNoticeIn {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}
.forum-notice-bar-track {
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.forum-notice-bar[data-level="warn"] .forum-notice-bar-track {
  background: #fff3cd;
  color: #664d03;
  border-bottom-color: #ffecb5;
}
.forum-notice-bar[data-level="critical"] .forum-notice-bar-track {
  background: #f8d7da;
  color: #842029;
  border-bottom-color: #f5c2c7;
}
.forum-notice-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 44px 8px 14px;
  min-height: 38px;
  font-size: 0.84rem;
  line-height: 1.35;
  text-align: center;
}
.forum-notice-bar-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
}
.forum-notice-bar[data-level="warn"] .forum-notice-bar-icon {
  background: #ffc107;
  color: #3d2e00;
}
.forum-notice-bar[data-level="critical"] .forum-notice-bar-icon {
  background: #dc3545;
  color: #fff;
}
.forum-notice-bar.is-recovering .forum-notice-bar-icon {
  animation: forumNoticePulse 1s ease-in-out infinite;
}
@keyframes forumNoticePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
.forum-notice-bar-text {
  margin: 0;
  flex: 1 1 240px;
  font-weight: 600;
  color: inherit;
}
.forum-notice-bar-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.forum-notice-bar-dot {
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.45;
}
.forum-notice-bar-action {
  padding: 0;
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  white-space: nowrap;
}
.forum-notice-bar-action:hover:not(:disabled) {
  opacity: 0.75;
}
.forum-notice-bar-action:disabled {
  opacity: 0.55;
  cursor: wait;
  text-decoration: none;
}
.forum-notice-bar-action-primary {
  text-decoration-thickness: 2px;
}
.forum-notice-bar-close {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.65;
}
.forum-notice-bar-close:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.06);
}
.forum-notice-bar-track {
  position: relative;
}
.forum-notice-bar-progress {
  height: 2px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
}
.forum-notice-bar[data-level="warn"] .forum-notice-bar-progress::after {
  background: #ffc107;
}
.forum-notice-bar[data-level="critical"] .forum-notice-bar-progress::after {
  background: #dc3545;
}
.forum-notice-bar-progress::after {
  content: "";
  display: block;
  height: 100%;
  width: 30%;
  animation: forumNoticeProgress 1.2s ease-in-out infinite;
}
@keyframes forumNoticeProgress {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(420%); }
}
body.session-stale-open {
  padding-top: var(--session-banner-h, 40px);
}
body.session-stale-open .app-shell,
body.session-stale-open .auth-shell {
  min-height: calc(100vh - var(--session-banner-h, 40px));
}
@media (max-width: 640px) {
  .forum-notice-bar-inner {
    padding: 10px 36px 10px 12px;
    gap: 8px;
  }
  .forum-notice-bar-text {
    flex-basis: 100%;
    font-size: 0.8rem;
  }
  .forum-notice-bar-actions {
    width: 100%;
    justify-content: center;
  }
}

.auth-seo-footer {
  max-width: 420px;
  margin: 28px auto 12px;
  padding: 0 16px;
  text-align: center;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.55;
}
.auth-seo-footer-title {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}
.auth-seo-footer strong {
  color: var(--text);
  font-weight: 600;
}
.auth-seo-footer-keywords {
  margin: 8px 0 0;
  font-size: 0.66rem;
  opacity: 0.85;
}
