@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Outfit:wght@600;700;800&display=swap');

:root {
  --bg0: #07060f;
  --bg1: #110d1f;
  --bg2: #1a1330;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-strong: rgba(255, 255, 255, 0.07);
  --line: rgba(167, 139, 250, 0.18);
  --line-strong: rgba(192, 132, 252, 0.45);
  --text: #f5f3ff;
  --muted: #a5a3c2;
  --purple: #8b5cf6;
  --purple-2: #a78bfa;
  --purple-3: #c4b5fd;
  --pink: #e879f9;
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #fb7185;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --radius: 22px;
  --font: 'Manrope', system-ui, sans-serif;
  --display: 'Outfit', var(--font);
  --sidebar: 272px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text);
  min-height: 100vh;
  background:
    radial-gradient(900px 500px at 0% -10%, rgba(139, 92, 246, 0.35), transparent 55%),
    radial-gradient(700px 420px at 100% 0%, rgba(232, 121, 249, 0.22), transparent 50%),
    radial-gradient(600px 400px at 50% 100%, rgba(91, 33, 182, 0.25), transparent 55%),
    linear-gradient(160deg, var(--bg0), var(--bg1) 45%, #0c0918 100%);
  line-height: 1.45;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ========== AUTH ========== */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
}
@media (max-width: 960px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-visual { min-height: 38vh; }
}
.auth-visual {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(145deg, rgba(76, 29, 149, 0.55), rgba(7, 6, 15, 0.2)),
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="120" height="120"><g fill="none" stroke="%23c4b5fd" stroke-opacity="0.12"><circle cx="60" cy="60" r="40"/><circle cx="60" cy="60" r="20"/></g></svg>'),
    #120a28;
}
.auth-visual::before {
  content: '';
  position: absolute;
  width: 420px; height: 420px;
  right: -80px; bottom: -100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 121, 249, 0.45), transparent 70%);
  filter: blur(10px);
  animation: floaty 8s ease-in-out infinite;
}
.auth-visual::after {
  content: '';
  position: absolute;
  width: 280px; height: 280px;
  left: -60px; top: 20%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.5), transparent 70%);
  animation: floaty 10s ease-in-out infinite reverse;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-18px); }
}
.brand-mark {
  position: relative; z-index: 1;
  font-family: var(--display);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
}
.brand-mark span {
  background: linear-gradient(90deg, #c4b5fd, #e879f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auth-visual p {
  position: relative; z-index: 1;
  max-width: 32ch;
  margin-top: 16px;
  font-size: 1.08rem;
  color: rgba(245, 243, 255, 0.78);
}
.auth-stats {
  position: relative; z-index: 1;
  display: flex; gap: 28px; flex-wrap: wrap;
}
.auth-stats strong {
  display: block;
  font-family: var(--display);
  font-size: 1.9rem;
  font-weight: 800;
}
.auth-stats span { font-size: 0.82rem; color: rgba(245, 243, 255, 0.55); }

.auth-panel {
  display: grid;
  place-items: center;
  padding: clamp(24px, 4vw, 48px);
}
.auth-card {
  width: min(460px, 100%);
  padding: 32px 28px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.03));
  border: 1px solid var(--line);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.06);
  backdrop-filter: blur(18px);
  animation: rise 0.55s ease both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.auth-card h1 {
  font-family: var(--display);
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.auth-card .sub { color: var(--muted); margin-bottom: 26px; }

.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple-3);
  margin-bottom: 7px;
}
.field input, .field select, .field textarea, .search input {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(7, 6, 15, 0.55);
  border-radius: 14px;
  padding: 14px 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.field input:focus, .search input:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.2);
  background: rgba(7, 6, 15, 0.75);
}
.field input:disabled { opacity: 0.6; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn-primary {
  width: 100%;
  color: #fff;
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #e879f9 140%);
  box-shadow: 0 14px 40px rgba(139, 92, 246, 0.4);
}
.btn-secondary {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
  color: var(--text);
}
.btn-accent {
  background: linear-gradient(135deg, #e879f9, #a855f7);
  color: #fff;
}
.btn-sm { padding: 9px 14px; font-size: 0.86rem; }
.auth-links {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--muted);
}
.auth-links a { color: var(--purple-2); font-weight: 700; }

/* ========== SIGNUP (centered, no sidebar) ========== */
.signup-page {
  min-height: 100vh;
  background:
    radial-gradient(900px 480px at 50% -10%, rgba(139, 92, 246, 0.28), transparent 55%),
    radial-gradient(600px 360px at 100% 100%, rgba(232, 121, 249, 0.14), transparent 50%),
    linear-gradient(160deg, var(--bg0), var(--bg1) 45%, #0c0918 100%);
}
.signup-shell {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 24px 16px 40px;
}
.signup-wrap {
  width: min(1040px, 100%);
}
.signup-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin-bottom: 8px;
}
.signup-header-spacer { flex: 1; }
.signup-hero-brand {
  width: 100%;
  text-align: center;
  margin: 0 0 22px;
  padding: 0 4px;
}
.site-logo-signup-hero {
  display: block;
  width: 100%;
  max-height: 148px;
  height: auto;
  object-fit: contain;
  margin: 0 auto 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  padding: 12px 16px;
  box-shadow: 0 16px 40px rgba(124, 58, 237, 0.22);
}
.signup-hero-tagline {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
  max-width: 560px;
  margin-inline: auto;
}
.signup-hero-title {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.signup-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.signup-active-pill {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
}
.signup-card {
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.025));
  box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 36px);
  backdrop-filter: blur(16px);
}
.signup-section { margin-bottom: 22px; }
.signup-section-title {
  margin: 0 0 12px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--purple-3);
}
.signup-plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-gutter: stable;
}
@media (max-width: 860px) {
  .signup-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .signup-plans { grid-template-columns: 1fr; }
}
.signup-plan {
  position: relative;
  padding: 16px 14px 14px 40px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(7, 6, 15, 0.45);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.18s, transform 0.15s;
  min-width: 0;
  overflow: hidden;
}
.signup-plan:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}
.signup-plan.selected {
  border-color: rgba(196, 181, 253, 0.55);
  background: rgba(124, 58, 237, 0.14);
  box-shadow: 0 10px 28px rgba(91, 33, 182, 0.25);
}
.signup-plan-radio {
  position: absolute;
  left: 14px;
  top: 18px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(167, 139, 250, 0.45);
  background: transparent;
}
.signup-plan.selected .signup-plan-radio {
  border-color: #a855f7;
  background: radial-gradient(circle at center, #a855f7 0 5px, transparent 6px);
}
.signup-plan h3 {
  margin: 0 0 6px;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.3;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.signup-plan-price {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--purple-3);
}
.signup-plan-days {
  margin-top: 4px;
  font-size: 0.72rem;
  color: var(--muted);
}
.signup-fields .field-hint {
  opacity: 0.65;
  font-weight: 500;
  font-size: 0.78rem;
  text-transform: none;
  letter-spacing: 0;
}
.signup-pay-note {
  margin: 4px 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.82rem;
  color: var(--muted);
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.2);
  line-height: 1.5;
}
.signup-pay-note a {
  color: #6ee7b7;
  font-weight: 700;
  text-decoration: none;
}
.signup-pay-note a:hover { text-decoration: underline; }
.signup-submit { margin-top: 4px; }
.signup-foot {
  margin: 18px 0 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--muted);
}
.signup-foot a {
  color: var(--purple-2);
  font-weight: 700;
  text-decoration: none;
}
.signup-foot a:hover { text-decoration: underline; }

.alert {
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}
.alert-error { background: rgba(251, 113, 133, 0.12); border: 1px solid rgba(251,113,133,.3); color: #fda4af; }
.alert-ok { background: rgba(52, 211, 153, 0.12); border: 1px solid rgba(52,211,153,.3); color: #6ee7b7; }
.badge-mock {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(139, 92, 246, 0.18);
  color: var(--purple-3);
  border: 1px solid var(--line);
}

/* ========== APP SHELL ========== */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(139, 92, 246, 0.16), transparent 40%),
    linear-gradient(180deg, #100a1f, #0a0714 80%);
  border-right: 1px solid var(--line);
}
.sidebar-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  margin: 10px 0 0;
  padding: 0 2px 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(167, 139, 250, 0.35) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(167, 139, 250, 0.35);
  border-radius: 999px;
}
.sidebar .logo {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  padding: 10px 12px 18px;
  border-bottom: 1px solid var(--line);
}
.sidebar .logo em {
  font-style: normal;
  background: linear-gradient(90deg, #c4b5fd, #e879f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nav-group {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(165, 163, 194, 0.65);
  padding: 12px 12px 6px;
  font-weight: 700;
}
.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px solid transparent;
  color: rgba(245, 243, 255, 0.72);
  font-weight: 600;
  transition: background 0.15s, color 0.15s, transform 0.15s, border-color 0.15s;
}
.nav-link:hover {
  background: rgba(139, 92, 246, 0.12);
  color: #fff;
}
.nav-link.active {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.55), rgba(168, 85, 247, 0.35));
  color: #fff;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.25);
  border: 1px solid rgba(196, 181, 253, 0.35);
}
.nav-link .pill {
  font-size: 0.65rem;
  padding: 3px 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e879f9, #a855f7);
  color: #fff;
  font-weight: 800;
}
.sidebar-foot {
  margin-top: auto;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}
.sidebar-user {
  flex: 0 0 auto;
  margin-top: auto;
  width: 100%;
  padding-top: 12px;
  border-top: 1px solid rgba(167, 139, 250, 0.14);
}
.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(196, 181, 253, 0.2);
  background: rgba(7, 6, 15, 0.55);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s, border-color 0.15s;
}
.sidebar-user-card:hover {
  background: rgba(124, 58, 237, 0.14);
  border-color: rgba(196, 181, 253, 0.32);
}
.sidebar-user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1;
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #e879f9);
}
.sidebar-user-meta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sidebar-user-name {
  display: block;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-email {
  display: block;
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.3;
  color: rgba(165, 163, 194, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-badge {
  margin-top: 8px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  color: #6ee7b7;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.22);
}

.main { padding: 22px clamp(16px, 3vw, 34px) 48px; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.topbar h1 {
  font-family: var(--display);
  font-size: clamp(1.55rem, 2.6vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.topbar p { color: var(--muted); font-size: 0.92rem; margin-top: 2px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn, .avatar {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  cursor: pointer;
}
.avatar {
  border: 0;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(135deg, #7c3aed, #e879f9);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
  transition: transform 0.15s, box-shadow 0.18s;
}
.avatar:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(139, 92, 246, 0.5);
}
.menu-toggle { display: none; }

/* Mobile shell — must come AFTER .sidebar so position:fixed wins over sticky */
@media (max-width: 980px) {
  .app-shell {
    display: block;
    min-height: 100vh;
    min-height: 100dvh;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(300px, 88vw);
    height: 100%;
    height: 100dvh;
    z-index: 50;
    transform: translateX(-108%);
    transition: transform 0.28s cubic-bezier(.2,.8,.2,1);
  }
  .sidebar.open { transform: translateX(0); }
  body.sidebar-open { overflow: hidden; }
  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
  }
  .sidebar-backdrop.show { display: block; }
  .menu-toggle { display: grid !important; }
  .main {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }
}

.hero-strip {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}
@media (max-width: 860px) { .hero-strip { grid-template-columns: 1fr; } }

.panel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.025));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  backdrop-filter: blur(16px);
}
.panel::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196,181,253,.55), transparent);
}
.panel h2 {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.panel .hint { color: var(--muted); font-size: 0.9rem; margin-bottom: 16px; }

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
@media (max-width: 900px) { .stats-row { grid-template-columns: repeat(2, 1fr); } }
.stat {
  position: relative;
  padding: 18px 18px 18px 56px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background:
    linear-gradient(160deg, rgba(124, 58, 237, 0.14), rgba(255, 255, 255, 0.03)),
    rgba(7, 6, 15, 0.42);
  overflow: hidden;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.stat::before {
  content: '◆';
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--purple-3);
  background: rgba(139, 92, 246, 0.22);
  border: 1px solid rgba(196, 181, 253, 0.25);
}
.stat-plans::before { content: '✓'; color: var(--ok); box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.25); background: rgba(52, 211, 153, 0.16); }
.stat-tools::before { content: '⚡'; background: rgba(167, 139, 250, 0.22); }
.stat-shop::before { content: '◈'; background: rgba(96, 165, 250, 0.18); color: #93c5fd; }
.stat-expire::before { content: '!'; background: rgba(251, 191, 36, 0.18); color: var(--warn); }
.stat::after {
  content: '';
  position: absolute;
  right: -20px;
  bottom: -24px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 121, 249, 0.18), transparent 70%);
  pointer-events: none;
}
.stat:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 14px 34px rgba(91, 33, 182, 0.24);
}
.stat b {
  display: block;
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 800;
  background: linear-gradient(90deg, #fff, #c4b5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat span { font-size: 0.8rem; color: var(--muted); font-weight: 600; }

.quick-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 700px) { .quick-row { grid-template-columns: 1fr; } }
.quick {
  display: block;
  padding: 16px 16px 16px 54px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.18), rgba(255,255,255,0.03));
  border: 1px solid var(--line);
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.18s;
  position: relative;
}
.quick-icon {
  position: absolute;
  left: 16px;
  top: 16px;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--purple-3);
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(196, 181, 253, 0.25);
}
.quick:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 12px 28px rgba(91, 33, 182, 0.22);
}
.quick strong { display: block; margin-bottom: 4px; }
.quick span { font-size: 0.8rem; color: var(--muted); }

.subs {
  display: grid;
  gap: 10px;
  max-height: 420px; /* ~6 items then scroll */
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(167, 139, 250, 0.45) transparent;
}
.subs::-webkit-scrollbar { width: 6px; }
.subs::-webkit-scrollbar-thumb {
  background: rgba(167, 139, 250, 0.45);
  border-radius: 999px;
}
.sub-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 14px 15px 14px 18px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(7, 6, 15, 0.42)),
    rgba(7, 6, 15, 0.35);
  border: 1px solid var(--line);
  position: relative;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.18s;
}
.sub-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #7c3aed, #e879f9);
  opacity: 0.65;
}
.sub-item:hover {
  transform: translateX(2px);
  border-color: var(--line-strong);
  box-shadow: 0 10px 24px rgba(91, 33, 182, 0.18);
}
.sub-item strong { font-size: 0.95rem; letter-spacing: -0.01em; }
.sub-item .meta { font-size: 0.82rem; color: var(--muted); margin-top: 3px; }
.status {
  align-self: center;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
}
.status-active { background: rgba(52, 211, 153, 0.15); color: var(--ok); }
.status-warn { background: rgba(251, 191, 36, 0.15); color: var(--warn); }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}
.search { flex: 1; min-width: 210px; }

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}
.tool {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  border-radius: 18px;
  min-height: 0;
  background:
    linear-gradient(165deg, rgba(139, 92, 246, 0.1), rgba(7, 6, 15, 0.55)),
    rgba(7, 6, 15, 0.35);
  border: 1px solid var(--line);
  transition: transform 0.18s, box-shadow 0.2s, border-color 0.18s;
  overflow: hidden;
}
.tool-media {
  position: relative;
  padding: 12px 12px 0;
}
.tool-body {
  position: relative;
  z-index: 1;
  padding: 10px 12px 0;
  flex: 1;
}
.tool-expiry {
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 3px;
  line-height: 1.35;
}
.tool-cta {
  position: relative;
  z-index: 1;
  margin: 10px 12px 12px;
  width: calc(100% - 24px);
  padding: 10px 14px;
  box-shadow: 0 6px 18px rgba(139, 92, 246, 0.28);
}
.tool::after {
  content: '';
  position: absolute;
  width: 120px; height: 120px;
  right: -40px; top: -40px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 121, 249, 0.25), transparent 70%);
  pointer-events: none;
}
.tool:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: 0 18px 40px rgba(91, 33, 182, 0.35);
}
.tool h3 {
  position: relative;
  z-index: 1;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.tool-media .mode {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  width: fit-content;
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(7, 6, 15, 0.78);
  color: var(--purple-3);
  border: 1px solid rgba(167, 139, 250, 0.25);
  backdrop-filter: blur(8px);
}
.tool .btn { position: relative; z-index: 1; margin-top: auto; width: 100%; }

.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.product {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(7, 6, 15, 0.35);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.2s;
  overflow: hidden;
}
.product-cover {
  margin: -18px -18px 14px;
  height: 120px;
  background: rgba(91, 33, 182, 0.2);
  overflow: hidden;
}
.product-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-cover-empty {
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.35), rgba(236, 72, 153, 0.2)),
    radial-gradient(circle at 30% 20%, rgba(255,255,255,0.12), transparent 55%);
}
.product-thumb {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--line);
  display: block;
}
.product-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: var(--muted);
  background: rgba(7, 6, 15, 0.45);
}
.tool-cover {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 0;
  border: 1px solid rgba(167, 139, 250, 0.16);
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.22), rgba(7, 6, 15, 0.88));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}
.tool-cover img {
  width: auto;
  height: auto;
  max-width: 76%;
  max-height: 44px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}
.tool-cover-fallback span {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #e879f9);
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.3);
}
.product:hover, .product.selected {
  border-color: var(--line-strong);
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(91, 33, 182, 0.3);
}
.product .type {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--purple-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.product h3 { margin: 8px 0 6px; font-size: 1.05rem; font-weight: 800; }
.product .price {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(90deg, #fff, #e879f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.product .days { color: var(--muted); font-size: 0.84rem; margin-top: 4px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid .full { grid-column: 1 / -1; }

.steps { display: grid; gap: 10px; counter-reset: step; }
.step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(7, 6, 15, 0.35);
  border: 1px solid var(--line);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 800;
  background: linear-gradient(135deg, #7c3aed, #e879f9);
}
.download-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }

.ext-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin: 12px 0 4px;
}
.ext-card {
  background: rgba(7, 6, 15, 0.45);
  border: 1px solid rgba(167, 139, 250, 0.18);
  border-radius: 16px;
  padding: 16px;
}
.ext-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.ext-card-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(124,58,237,.35), rgba(232,121,249,.25));
  border: 1px solid rgba(167,139,250,.25);
  font-size: 1.1rem;
}
.ext-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: .92rem;
}
.ext-status-row:last-child { border-bottom: 0; }
.ext-status-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.ext-status-dot.checking { background: #fbbf24; }
.ext-status-dot.ok { background: #34d399; }
.ext-status-dot.missing { background: #fb7185; }
.ext-status-label { margin-left: auto; color: var(--muted); font-style: normal; font-size: .85rem; }
.empty {
  text-align: center;
  padding: 40px 16px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 18px;
}

.dot-pulse {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--purple-2);
  box-shadow: 0 0 0 0 rgba(167, 139, 250, 0.55);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(167, 139, 250, 0.45); }
  70% { box-shadow: 0 0 0 12px rgba(167, 139, 250, 0); }
  100% { box-shadow: 0 0 0 0 rgba(167, 139, 250, 0); }
}

.product .btn { pointer-events: none; }

.stat {
  position: relative;
  overflow: hidden;
  transition: transform 0.15s, border-color 0.15s;
}
.stat:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.stat::after {
  content: '';
  position: absolute;
  width: 80px; height: 80px;
  right: -24px; bottom: -28px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.28), transparent 70%);
}

.sidebar-foot span { font-size: 0.75rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ========== PREMIUM LOGIN ========== */
.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 18px 40px;
  position: relative;
  overflow-x: hidden;
}
.login-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 50% -10%, rgba(124, 58, 237, 0.45), transparent 60%),
    radial-gradient(700px 480px at 100% 80%, rgba(232, 121, 249, 0.18), transparent 55%),
    radial-gradient(600px 400px at 0% 90%, rgba(91, 33, 182, 0.28), transparent 50%),
    linear-gradient(180deg, #05040c 0%, #0d0820 48%, #07060f 100%);
}
.login-bg .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.85;
  animation: floaty 10s ease-in-out infinite;
}
.orb-a {
  width: 340px; height: 340px;
  top: -80px; left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(168, 85, 247, 0.45), transparent 70%);
}
.orb-b {
  width: 260px; height: 260px;
  right: -40px; bottom: 10%;
  background: radial-gradient(circle, rgba(232, 121, 249, 0.35), transparent 70%);
  animation-duration: 12s;
  animation-direction: reverse;
}
.orb-c {
  width: 200px; height: 200px;
  left: -30px; bottom: 20%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.3), transparent 70%);
  animation-duration: 14s;
}
.grid-fade {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(196, 181, 253, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(196, 181, 253, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 72%);
}

.login-wrap {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  display: grid;
  gap: 18px;
  animation: rise 0.6s ease both;
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}
.login-mark {
  width: 48px; height: 48px;
  border-radius: 16px;
  display: grid; place-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.35rem;
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #e879f9);
  box-shadow: 0 12px 30px rgba(124, 58, 237, 0.45);
  flex-shrink: 0;
}
.login-mark-img {
  object-fit: contain;
  background: rgba(255,255,255,0.06);
  padding: 4px;
  box-shadow: 0 12px 30px rgba(124, 58, 237, 0.28);
}
.logo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 6px 10px 14px;
  width: 100%;
}
.sidebar-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  padding: 3px;
  flex-shrink: 0;
}
.sidebar-logo-brand {
  width: 100%;
  max-width: min(200px, 100%);
  height: auto;
  max-height: 56px;
  padding: 6px 8px;
  border-radius: 12px;
  object-fit: contain;
}
.sidebar-brand-text em {
  color: var(--purple-2);
  font-style: normal;
  font-weight: 600;
}
.login-brand--logo {
  flex-direction: column;
  text-align: center;
  gap: 10px;
}
.site-logo-login {
  display: block;
  width: 100%;
  max-width: min(520px, 100%);
  max-height: 148px;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  padding: 12px 16px;
  box-shadow: 0 16px 40px rgba(124, 58, 237, 0.22);
}
.site-logo-tagline {
  display: block;
  font-size: 0.88rem;
  color: var(--muted);
  max-width: 320px;
}
.site-logo-signup {
  display: block;
  max-width: min(240px, 90%);
  max-height: 80px;
  width: auto;
  height: auto;
  object-fit: contain;
  margin-bottom: 18px;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  padding: 8px 12px;
}
.login-brand strong {
  display: block;
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.login-brand span {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
}

.login-card {
  padding: 34px 30px 28px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.03));
  border: 1px solid rgba(196, 181, 253, 0.22);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255,255,255,0.08);
  backdrop-filter: blur(22px);
}
.login-kicker {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple-3);
  background: rgba(139, 92, 246, 0.16);
  border: 1px solid var(--line);
}
.login-card h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 2.45rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 8px;
}
.login-sub {
  color: var(--muted);
  margin-bottom: 22px;
  font-size: 0.98rem;
}
.login-form .field { margin-bottom: 16px; }
.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 7px;
}
.label-row label { margin-bottom: 0; }
.forgot {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--purple-2);
}
.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 72px; }
.pass-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: rgba(255,255,255,0.06);
  color: var(--purple-3);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 7px 10px;
  border-radius: 10px;
  cursor: pointer;
}
.pass-toggle:hover { background: rgba(139, 92, 246, 0.2); color: #fff; }
.login-submit {
  margin-top: 6px;
  height: 52px;
  font-size: 1rem;
  letter-spacing: 0.01em;
}
.login-foot {
  margin-top: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}
.login-foot a { color: var(--purple-2); font-weight: 700; }
.login-trust {
  text-align: center;
  font-size: 0.78rem;
  color: rgba(165, 163, 194, 0.75);
  line-height: 1.4;
  max-width: 36ch;
  margin: 0 auto;
}

.login-card .alert-error {
  animation: shake 0.35s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* Content pages (admin HTML) */
.content-page .page-html {
  line-height: 1.6;
  color: var(--text);
}
.content-page .page-html h1,
.content-page .page-html h2,
.content-page .page-html h3 {
  font-family: var(--display);
  margin: 0.8em 0 0.35em;
}
.content-page .page-html p { margin: 0 0 0.85em; color: rgba(245,243,255,0.88); }
.content-page .page-html a { color: var(--purple-2); font-weight: 700; }
.content-page .page-html ul, .content-page .page-html ol { margin: 0 0 1em 1.2em; }
.content-page .page-html img { max-width: 100%; border-radius: 12px; }
.content-page .page-html iframe {
  width: 100%;
  min-height: 480px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #000;
}
.content-page-wrap {
  padding: 14px;
  max-width: 980px;
  margin: 0 auto;
}
.content-page-back {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}
.admin-code {
  width: 100%;
  min-height: 220px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.45;
  border: 1px solid var(--line);
  background: rgba(7, 6, 15, 0.7);
  border-radius: 14px;
  padding: 14px;
  color: var(--text);
  resize: vertical;
}

.table-wrap { overflow-x: auto; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.admin-table th {
  text-align: left;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple-3);
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.admin-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(167, 139, 250, 0.1);
  vertical-align: top;
}
.admin-table .meta { font-size: 0.8rem; color: var(--muted); }
.admin-table .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.admin-table details summary { cursor: pointer; list-style: none; }
.field select {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(7, 6, 15, 0.55);
  border-radius: 14px;
  padding: 14px 15px;
  outline: none;
  color: var(--text);
}
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(7, 6, 15, 0.55);
  border-radius: 14px;
  padding: 14px 15px;
  outline: none;
  color: var(--text);
  resize: vertical;
}
.product-picker {
  display: grid;
  gap: 8px;
}
.product-picker-search {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(7, 6, 15, 0.55);
  border-radius: 14px;
  padding: 12px 14px;
  outline: none;
  color: var(--text);
}
.product-picker-search:focus {
  border-color: rgba(167, 139, 250, 0.55);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18);
}
.product-picker-list {
  width: 100%;
  min-height: 220px;
  max-height: 280px;
  border: 1px solid var(--line);
  background: rgba(7, 6, 15, 0.55);
  border-radius: 14px;
  padding: 6px;
  outline: none;
  color: var(--text);
  overflow-y: auto;
}
.product-picker-list option {
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 2px;
}
.product-picker-list option:checked,
.product-picker-list option:hover {
  background: rgba(124, 58, 237, 0.35);
  color: #fff;
}

.protect-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 0;
  border: 1px solid rgba(167,139,250,0.22);
  border-radius: 14px 14px 0 0;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
}
.protect-tab {
  padding: 10px 16px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border-right: 1px solid rgba(167,139,250,0.12);
}
.protect-tab:hover { color: var(--text); background: rgba(124,58,237,0.12); }
.protect-tab.active {
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
}
.protect-tab.disabled { opacity: 0.45; pointer-events: none; }
.panel + .protect-subnav,
.protect-subnav + .panel { border-radius: 0 0 18px 18px; margin-top: 0; }

.am-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: 14px 14px 0 0;
  overflow: hidden;
}
.am-subnav-link {
  padding: 10px 16px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border-right: 1px solid rgba(167,139,250,0.12);
  background: rgba(7,6,15,0.35);
}
.am-subnav-link:hover { color: var(--text); background: rgba(124,58,237,0.12); }
.am-subnav-link.active {
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
}
.am-subnav-link.disabled { opacity: 0.45; cursor: not-allowed; }
.am-protect-wrap + .am-page-edit-panel,
.am-protect-wrap + .am-grid-panel {
  margin-top: 0;
}
.am-grid-panel {
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 14px 14px;
  background: rgba(7,6,15,0.28);
  padding: 16px;
}
.am-grid-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
  padding: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(167,139,250,0.12);
  border-radius: 12px;
}
.am-grid-toolbar .field { margin: 0; min-width: 180px; flex: 1; }
.am-grid-toolbar label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.am-grid-toolbar input, .am-grid-toolbar select {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(7,6,15,0.55);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
}
.am-grid-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.am-grid-head h2 { margin: 0; font-size: 1.05rem; }
.am-row-drag { cursor: grab; color: var(--muted); user-select: none; padding: 0 6px; }
.am-link-copy {
  display: inline-block;
  color: #c4b5fd;
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(167, 139, 250, 0.35);
  background: rgba(124, 58, 237, 0.12);
  transition: background 0.15s, color 0.15s;
}
.am-link-copy:hover {
  background: rgba(124, 58, 237, 0.28);
  color: #fff;
}
.am-link-copy.is-copied {
  color: #86efac;
  border-color: rgba(134, 239, 172, 0.45);
  background: rgba(34, 197, 94, 0.12);
}
.admin-table tr.drag-over { background: rgba(124,58,237,0.12); }
.admin-table tr.is-disabled td { opacity: 0.55; }
.icon-btn-sm {
  width: 32px; height: 32px;
  display: inline-grid; place-items: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
}

/* ── Dashboard polish ── */
.dash-kicker {
  margin: 0 0 6px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--purple-3);
}
.dash-welcome {
  background:
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(232, 121, 249, 0.16), transparent 55%),
    radial-gradient(ellipse 60% 50% at 0% 100%, rgba(124, 58, 237, 0.2), transparent 50%),
    linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.025));
}
.dash-welcome-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.dash-welcome-head h2 {
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 6px;
  background: linear-gradient(90deg, #fff 30%, #ddd6fe);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.dash-welcome-hint { margin-bottom: 0 !important; }
.dash-welcome-pill {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #ede9fe;
  background: rgba(124, 58, 237, 0.22);
  border: 1px solid rgba(196, 181, 253, 0.28);
  white-space: nowrap;
}
.dash-subs-panel {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.dash-subs-panel .subs { flex: 1; }
.dash-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.dash-section-head h2 { margin: 0 0 4px; }
.dash-tools-panel { margin-top: 4px; }
.dash-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 1080px) {
  .dash-tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .dash-tools-grid { grid-template-columns: 1fr; }
}
.dash-tool {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-radius: 16px;
  background: rgba(7, 6, 15, 0.5);
  overflow: hidden;
}
.dash-tool::after { display: none; }
.dash-tool:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(91, 33, 182, 0.32);
}
.dash-tool .tool-hero {
  position: relative;
  width: 100%;
  height: 118px;
  flex-shrink: 0;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.45), rgba(7, 6, 15, 0.92));
}
.dash-tool .tool-hero-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}
.dash-tool .tool-hero-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 2.4rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.9);
  background:
    linear-gradient(145deg, rgba(124, 58, 237, 0.55), rgba(232, 121, 249, 0.22)),
    rgba(7, 6, 15, 0.65);
  letter-spacing: -0.04em;
}
.dash-tool .tool-hero::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 48px;
  background: linear-gradient(to top, rgba(7, 6, 15, 0.55), transparent);
  pointer-events: none;
}
.dash-tool .tool-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 9px;
  border-radius: 999px;
  color: #ede9fe;
  background: rgba(7, 6, 15, 0.72);
  border: 1px solid rgba(196, 181, 253, 0.28);
  backdrop-filter: blur(8px);
}
.dash-tool .tool-body {
  flex: 1 1 auto;
  padding: 12px 14px 0;
}
.dash-tool .tool-body h3 {
  margin: 0;
  line-height: 1.3;
  font-size: 0.9375rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-tool .tool-expiry {
  margin-top: 4px;
  font-size: 0.72rem;
}
.dash-tool .tool-cta {
  margin: 12px 14px 14px;
  width: calc(100% - 28px);
  padding: 10px 14px;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.25);
}
.dash-toolbar .search input {
  background: rgba(7, 6, 15, 0.55);
  border-color: rgba(167, 139, 250, 0.2);
}
.dash-toolbar .search input:focus {
  border-color: rgba(196, 181, 253, 0.45);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18);
}
@media (max-width: 640px) {
  .dash-welcome-head { flex-direction: column; }
  .dash-welcome-pill { align-self: flex-start; }
  .dash-section-head { flex-direction: column; align-items: stretch; }
}

.pay-panel { max-width: 820px; margin: 0 auto; }
.pay-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.pay-instructions h3 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.pay-lead {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}
.pay-wa {
  margin: 0 0 8px;
  font-size: 0.95rem;
}
.pay-wa a {
  color: #6ee7b7;
  font-weight: 700;
  text-decoration: none;
}
.pay-wa a:hover { text-decoration: underline; }
.pay-note-highlight {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.22);
  font-size: 0.88rem;
  line-height: 1.5;
}
.pay-highlight {
  color: var(--purple-3);
  font-weight: 800;
}
.pay-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
@media (max-width: 640px) {
  .pay-methods { grid-template-columns: 1fr; }
  .pay-head { flex-direction: column; }
}
.pay-method {
  padding: 16px;
  border-radius: 14px;
  text-align: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}
.pay-method-disabled {
  opacity: 0.85;
  background: rgba(251, 113, 133, 0.08);
  border-color: rgba(251, 113, 133, 0.25);
}
.pay-method-label {
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.pay-method-num {
  margin: 0 0 4px;
  font-size: 0.9rem;
  color: var(--text);
}
.pay-method-num strong {
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
.pay-method-title {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.pay-method-notice {
  margin: 0;
  color: #fda4af;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}
.pay-footer-note {
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 16px;
}
.pay-footer-note a {
  color: #6ee7b7;
  text-decoration: none;
}
.pay-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.pay-actions .btn { width: auto; min-width: 200px; }
.icon-btn-sm.danger { color: #fb7185; border-color: rgba(251,113,133,0.35); }

/* ========== MOBILE — member app ========== */
@media (max-width: 640px) {
  html, body {
    overflow-x: hidden;
    max-width: 100%;
  }
  .app-shell {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
  }

  .main {
    padding: 12px 14px 28px;
    padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
    overflow-x: hidden;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
    padding: 10px 0 12px;
    margin-top: -4px;
    background: linear-gradient(180deg, var(--bg0) 55%, transparent);
    backdrop-filter: blur(8px);
  }
  .topbar > div:first-child { flex: 1 1 100%; min-width: 0; }
  .topbar h1 {
    font-size: 1.22rem;
    line-height: 1.25;
    word-break: break-word;
  }
  .topbar p { display: none; }
  .top-actions {
    flex: 1 1 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
  }

  .panel {
    padding: 16px;
    border-radius: 18px;
  }

  .stats-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .stat {
    padding: 14px 12px 14px 46px;
    border-radius: 16px;
  }
  .stat b { font-size: 1.35rem; }

  .hero-strip { gap: 12px; margin-bottom: 14px; }
  .toolbar, .dash-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .search { min-width: 0; width: 100%; }

  .tools-grid,
  .products,
  .ext-grid,
  .dash-tools-grid {
    grid-template-columns: 1fr;
  }

  .btn { min-height: 44px; }
  .btn-sm { min-height: 40px; padding: 8px 14px; }
  .pay-actions .btn { min-width: 0; width: 100%; }

  .content-page-wrap {
    padding: 12px !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  .content-page-back {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
  }
  .content-page .page-html .ti-widget-container {
    padding: 0 !important;
    max-width: 100% !important;
  }
  .content-page .page-html .ti-main-card {
    padding: 1.35rem 1rem !important;
    border-radius: 16px !important;
  }
  .content-page .page-html .ti-title { font-size: 1.45rem !important; }
  .content-page .page-html .ti-subtitle { font-size: 0.95rem !important; }
  .content-page .page-html .ti-btn {
    width: 100% !important;
    max-width: 100% !important;
    padding: 14px 18px !important;
    font-size: 1rem !important;
  }
  .content-page .page-html .ti-button-group {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }
  .content-page .page-html iframe {
    min-height: 220px;
    border-radius: 12px;
  }

  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -2px;
  }
  .data-table { font-size: 0.82rem; min-width: 520px; }

  .alert {
    font-size: 0.88rem;
    padding: 12px 14px;
  }
  .alert .btn { width: auto; flex: 1 1 auto; min-width: 120px; }

  .dash-welcome-head h2 { font-size: 1.25rem; }
  .dash-tool .tool-hero { height: 100px; }

  .sub-item {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .sub-item > div:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .login-wrap { width: min(100%, 440px); padding: 0 14px; }
  .login-card { padding: 22px 18px; border-radius: 20px; }
  .site-logo-login { max-height: 110px !important; }
  .login-card h1 { font-size: 1.45rem; }
}

@media (max-width: 400px) {
  .stats-row { grid-template-columns: 1fr; }
  .main { padding-left: 12px; padding-right: 12px; }
}
