/* MSTool Hub — unified design system */
:root {
  --brand: #14b8a6;
  --brand-dark: #0d9488;
  --brand-darker: #0f766e;
  --brand-light: rgba(20, 184, 166, 0.12);
  --brand-ring: rgba(20, 184, 166, 0.18);
  --brand-soft: #5eead4;

  --bg: #0b1220;
  --bg-0: var(--bg);
  --bg-1: #ffffff;
  --bg-2: #f1f5f9;
  --surface: #ffffff;

  --text: #0f172a;
  --page-text: #e2e8f0;
  --page-text-muted: #94a3b8;
  --ink-0: var(--text);
  --ink-1: #334155;
  --ink-2: #475569;
  --muted: #64748b;

  --border: #e2e8f0;
  --line: var(--border);
  --card: var(--surface);

  --success: #10b981;
  --ok: var(--success);
  --ok-bg: #ecfdf5;
  --ok-border: #a7f3d0;
  --warn: #f59e0b;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;

  --grad-1: linear-gradient(135deg, #2dd4bf 0%, #0d9488 55%, #0f766e 100%);
  --grad-hero: linear-gradient(145deg, #0b1220 0%, #111827 42%, #134e4a 100%);
  --grad-2: linear-gradient(135deg, #1e293b 0%, #0b1220 100%);

  --grid-line: rgba(255, 255, 255, 0.05);
  --grid-line-major: rgba(255, 255, 255, 0.09);
  --grid-dot: rgba(45, 212, 191, 0.16);
  --grid-size: 32px;
  --grid-size-major: 128px;

  --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 10px 28px rgba(15, 23, 42, 0.06);

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;

  --content-width: 1120px;
  --content-wide: 1200px;

  --font: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
  --nav-height: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  min-height: 100%;
  background-color: #0b1220;
}
body {
  font-family: var(--font);
  color: var(--page-text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background: transparent;
}

/* Full-site hero background (fixed layer — works in all browsers) */
.site-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: #0b1220;
  background-image:
    radial-gradient(circle at center, rgba(45, 212, 191, 0.14) 1px, transparent 1px),
    linear-gradient(to right, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(to right, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 18% 16%, rgba(45, 212, 191, 0.18), transparent 34%),
    radial-gradient(circle at 84% 10%, rgba(56, 189, 248, 0.12), transparent 30%),
    radial-gradient(circle at 70% 90%, rgba(16, 185, 129, 0.12), transparent 36%),
    linear-gradient(145deg, #0b1220 0%, #111827 42%, #134e4a 100%);
  background-size:
    var(--grid-size) var(--grid-size),
    var(--grid-size) var(--grid-size),
    var(--grid-size) var(--grid-size),
    var(--grid-size-major) var(--grid-size-major),
    var(--grid-size-major) var(--grid-size-major),
    auto, auto, auto, auto;
  background-position: center center;
}

.site-content {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topnav,
.shell,
.site-footer,
.footer {
  position: relative;
  z-index: 1;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); }

.shell {
  width: 100%;
  max-width: min(var(--content-width), 100%);
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 24px);
  box-sizing: border-box;
}
.shell.wide {
  max-width: min(var(--content-wide), 100%);
  padding: 0 clamp(16px, 3vw, 24px);
}

/* ── Navigation ── */
.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  /* Align nav content with shell.wide so layout never feels stretched */
  padding: 0 max(16px, calc((100% - var(--content-wide)) / 2 + 16px));
  height: var(--nav-height);
  background: rgba(11, 18, 32, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
  box-sizing: border-box;
}
.topnav .brand {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: #f8fafc;
}
.topnav .brand a { text-decoration: none; color: inherit; display: inline-flex; align-items: center; gap: 8px; }
.topnav .brand i {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-1);
  color: #fff;
  font-size: 14px;
  margin-right: 0;
}
.topnav .actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.topnav .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--page-text-muted);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
  border: none;
  background: transparent;
  cursor: pointer;
}
.topnav .nav-link:hover { color: #f8fafc; background: rgba(255, 255, 255, 0.06); }
.topnav .nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 7px 18px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  transition: all 0.2s;
  cursor: pointer;
}
.topnav .nav-btn:hover { background: rgba(255, 255, 255, 0.10); border-color: rgba(255, 255, 255, 0.18); color: #fff; }
.topnav .nav-btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.topnav .nav-btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.topnav .nav-btn.logout { background: rgba(220, 38, 38, 0.12); border-color: rgba(248, 113, 113, 0.35); color: #fca5a5; }
.topnav .nav-btn.logout:hover { background: rgba(220, 38, 38, 0.2); color: #fecaca; }
#globalUserBadge { font-size: 13px; color: var(--page-text-muted); font-weight: 500; }
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--page-text-muted);
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
}

/* ── Buttons ── */
.btn, a.btn, button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  padding: 12px 24px;
  border-radius: 11px;
  font-weight: 600;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s;
  background: var(--brand);
  color: #fff;
}
.btn:hover { opacity: 0.92; transform: translateY(-1px); }
.btn.ghost {
  background: var(--bg-1);
  color: var(--ink-1);
  border: 1px solid var(--border);
}
.btn.ghost:hover { background: var(--bg-2); color: var(--text); border-color: #cbd5e1; transform: translateY(-1px); }
.btn.small { padding: 8px 16px; font-size: 13px; border-radius: var(--radius-sm); }
.btn.danger { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-border); }
.btn.danger:hover { background: #fff1f2; }
.btn-full { width: 100%; padding: 16px; font-size: 16px; }

/* ── Forms ── */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-group input,
.form-group select,
.form-group textarea,
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus,
.form-group select:focus,
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
}
.form-group input::placeholder { color: #94a3b8; }
.form-group input[readonly],
input[readonly] { background: var(--bg-2); cursor: not-allowed; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 14px; }

/* ── Alerts & status ── */
.alert {
  display: none;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  margin-top: 14px;
  line-height: 1.5;
}
.alert.show { display: flex; }
.alert.ok { background: var(--ok-bg); border: 1px solid var(--ok-border); color: #166534; }
.alert.err { background: var(--danger-bg); border: 1px solid var(--danger-border); color: #991b1b; }
.alert.warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.alert-icon { font-size: 15px; line-height: 1; flex-shrink: 0; margin-top: 1px; }
.status { min-height: 24px; font-size: 14px; font-weight: 500; margin-top: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.status.ok { color: var(--ok); }
.status.err { color: var(--danger); }
.status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.muted, p.muted { color: var(--muted); font-size: 13px; }

/* ── Panels & cards ── */
.panel, .card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.panel h3, .card h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; color: var(--text); }

/* ── Tables ── */
.table-wrap { overflow-x: auto; border-radius: 11px; border: 1px solid var(--border); background: var(--bg-1); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  background: var(--bg-2);
  color: var(--ink-2);
  font-weight: 600;
  text-align: left;
  padding: 11px 14px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
td { padding: 12px 14px; border-bottom: 1px solid #f1f5f9; color: var(--ink-1); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-2); }
pre {
  background: var(--bg-2);
  padding: 16px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-size: 13px;
  color: var(--ink-2);
  border: 1px solid var(--border);
}

/* ── Tags & badges ── */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}
.tag.ok { background: rgba(5, 150, 105, 0.12); color: var(--ok); }
.tag.warn { background: rgba(217, 119, 6, 0.12); color: var(--warn); }
.tag.danger { background: rgba(220, 38, 38, 0.12); color: var(--danger); }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.status-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.status-badge.active { background: rgba(5, 150, 105, 0.1); color: var(--ok); border: 1px solid rgba(5, 150, 105, 0.2); }
.status-badge.active::before { background: var(--ok); }
.status-badge.development { background: rgba(217, 119, 6, 0.1); color: var(--warn); border: 1px solid rgba(217, 119, 6, 0.2); }
.status-badge.development::before { background: var(--warn); }
.status-badge.coming_soon { background: var(--brand-light); color: var(--brand-darker); border: 1px solid rgba(0, 173, 181, 0.25); }
.status-badge.coming_soon::before { background: var(--brand); }
.status-badge.inactive { background: rgba(220, 38, 38, 0.1); color: var(--danger); border: 1px solid rgba(220, 38, 38, 0.2); }
.status-badge.inactive::before { background: var(--danger); }
.status-active { background: rgba(5, 150, 105, 0.1); color: var(--ok); }
.status-development { background: rgba(217, 119, 6, 0.1); color: var(--warn); }
.status-closed { background: rgba(220, 38, 38, 0.1); color: var(--danger); }
.status-coming_soon { background: var(--brand-light); color: var(--brand-darker); }

/* ── Tabs ── */
.tabs-container { display: flex; justify-content: center; margin: 0 0 28px; }
.tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding: 5px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: var(--shadow);
  width: fit-content;
}
.tab-btn {
  background: transparent;
  color: var(--page-text-muted);
  border: none;
  padding: 10px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.tab-btn:hover { color: #f8fafc; background: rgba(255, 255, 255, 0.08); }
.tab-btn.active { background: var(--brand); color: #fff; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── Site footer ── */
.site-footer, .footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 40px 0;
  margin-top: 48px;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(8px);
}
.footer-inner, .footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-brand {
  font-size: 17px;
  font-weight: 700;
  color: #f8fafc;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.footer-brand i {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-1);
  color: #fff;
  font-size: 12px;
}
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a {
  color: var(--page-text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.footer-links a:hover { color: var(--brand); }
.footer-copy, .footer-copyright { color: #64748b; font-size: 14px; }

/* ── Hero (homepage) ── */
.hero {
  padding: 72px 0 56px;
  text-align: center;
  background: var(--grad-hero);
  margin: 0 -24px 0;
  padding-left: 24px;
  padding-right: 24px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(103, 232, 249, 0.16) 1px, transparent 1px),
    linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to right, rgba(255, 255, 255, 0.09) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.09) 1px, transparent 1px),
    radial-gradient(circle at 20% 20%, rgba(0, 173, 181, 0.22), transparent 35%),
    radial-gradient(circle at 80% 10%, rgba(0, 173, 181, 0.12), transparent 30%),
    radial-gradient(circle at 70% 80%, rgba(5, 150, 105, 0.12), transparent 35%);
  background-size:
    var(--grid-size) var(--grid-size),
    var(--grid-size) var(--grid-size),
    var(--grid-size) var(--grid-size),
    var(--grid-size-major) var(--grid-size-major),
    var(--grid-size-major) var(--grid-size-major),
    auto, auto, auto;
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #a5f3fc;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -1.5px;
  margin-bottom: 18px;
}
.hero h1 span { color: #67e8f9; }
.hero p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.82);
  max-width: 620px;
  margin: 0 auto 32px;
  line-height: 1.7;
}
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-cta .btn { background: var(--grad-1); box-shadow: 0 12px 30px rgba(0, 173, 181, 0.25); }
.hero-cta .btn.ghost { background: rgba(255, 255, 255, 0.08); color: #fff; border-color: rgba(255, 255, 255, 0.25); }
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 48px;
  padding-top: 36px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}
.hero-stat-value { font-size: 28px; font-weight: 800; color: #fff; }
.hero-stat-label { font-size: 13px; color: rgba(255, 255, 255, 0.7); margin-top: 2px; }

.features-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0;
  margin: 0 -24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(6px);
}
.feature-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 28px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}
.feature-item:last-child { border-right: none; }
.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 173, 181, 0.15);
  color: #67e8f9;
  font-size: 16px;
}
.feature-item h4 { font-size: 14px; font-weight: 700; color: #f1f5f9; margin-bottom: 2px; }
.feature-item p { font-size: 12px; color: var(--page-text-muted); }

.section-head { text-align: center; padding: 48px 0 24px; }
.section-head h2 {
  font-size: clamp(24px, 3.5vw, 30px);
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.section-head p { font-size: 15px; color: var(--page-text-muted); max-width: 420px; margin: 0 auto; }

/* ── Product cards ── */
.products-grid {
  display: grid;
  gap: 18px;
  margin-bottom: 48px;
}
.product-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  box-shadow: var(--shadow-card);
}
.product-card:hover {
  border-color: rgba(20, 184, 166, 0.45);
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(13, 148, 136, 0.12);
}
.product-title-group { display: flex; flex-direction: column; gap: 7px; }
.product-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.product-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: var(--brand-light);
  border: 1px solid rgba(20, 184, 166, 0.22);
  flex-shrink: 0;
}
.product-title-group h3 { font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
.product-title-group p { color: var(--ink-2); font-size: 14px; max-width: 460px; line-height: 1.6; }
.product-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.download-btn {
  background: var(--bg-1);
  color: var(--ink-1);
  border: 1px solid var(--border);
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  white-space: nowrap;
  font-size: 13px;
}
.download-btn:hover { background: var(--bg-2); border-color: var(--brand); color: var(--brand); }
.download-btn.active { background: var(--brand); color: #fff; border-color: transparent; }
.download-btn.tutorial { background: var(--bg-1); color: var(--brand-darker); border-color: rgba(0, 173, 181, 0.25); }
.download-btn.tutorial:hover { background: var(--brand-light); border-color: var(--brand); color: var(--brand-dark); }
.download-btn.disabled { background: var(--bg-2); color: #94a3b8; border: 1px solid var(--border); pointer-events: none; }

.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
@media (min-width: 1200px) {
  .plans-grid { grid-template-columns: repeat(4, 1fr); }
}
.plan-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}
.plan-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--brand);
  opacity: 0;
  transition: opacity 0.25s;
}
.plan-card:hover::before { opacity: 1; }
.plan-card.featured { border-color: var(--brand); box-shadow: 0 0 0 1px rgba(0, 173, 181, 0.2); }
.plan-card.featured::before { opacity: 1; }
.plan-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--brand);
  color: #fff;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}
.plan-name { font-size: 12px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.6px; }
.old-price { font-size: 15px; color: #94a3b8; text-decoration: line-through; min-height: 20px; }
.new-price { font-size: 32px; font-weight: 800; color: var(--text); line-height: 1; }
.price-suffix { font-size: 16px; font-weight: 500; color: var(--ink-2); }
.save-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(5, 150, 105, 0.1);
  color: var(--ok);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  width: fit-content;
  border: 1px solid rgba(5, 150, 105, 0.2);
}
.effective-price { font-size: 12px; color: var(--ok); font-weight: 600; }
.features { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--border); }
.features li {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-2);
  font-size: 13px;
  margin-bottom: 8px;
}
.features li::before {
  content: '\2713';
  width: 18px;
  height: 18px;
  background: rgba(5, 150, 105, 0.15);
  color: var(--ok);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.select-plan-btn {
  margin-top: auto;
  width: 100%;
  padding: 12px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 11px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-family: inherit;
}
.select-plan-btn:hover { opacity: 0.92; transform: translateY(-1px); }

.custom-plan-section { margin-top: 50px; margin-bottom: 20px; }
.custom-plan-container {
  max-width: 560px;
  margin: 0 auto 48px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-card);
}
.custom-plan-header { text-align: center; margin-bottom: 22px; }
.custom-plan-header h3 { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.custom-plan-header p { color: var(--ink-2); font-size: 14px; }
.custom-plan-form { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.custom-plan-form .form-group { flex: 1; min-width: 180px; }
.custom-plan-result { margin-top: 22px; display: none; }
.custom-plan-result.show { display: block; animation: fadeIn 0.25s ease; }
.custom-quote-box {
  background: var(--brand-light);
  border: 1px solid rgba(0, 173, 181, 0.2);
  border-radius: 14px;
  padding: 26px;
  text-align: center;
}
.custom-quote-label { font-size: 12px; color: var(--ink-2); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.custom-quote-price { font-size: 40px; font-weight: 800; color: var(--brand); margin-bottom: 18px; }

/* ── Tutorials ── */
.tutorials-section { margin: 20px 0 60px; }
.tutorial-block {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.tutorial-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  user-select: none;
  gap: 16px;
  flex-wrap: wrap;
}
.tutorial-block-header:hover { background: var(--bg-2); }
.tutorial-block-title { display: flex; align-items: center; gap: 14px; }
.tutorial-block-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: var(--brand-light);
  color: var(--brand);
  flex-shrink: 0;
}
.tutorial-block-title h3 { font-size: 17px; font-weight: 700; color: var(--text); }
.tutorial-block-title p { font-size: 13px; color: var(--muted); margin-top: 2px; }
.tutorial-toggle { color: #94a3b8; font-size: 18px; transition: transform 0.3s; }
.tutorial-block.open .tutorial-toggle { transform: rotate(180deg); }
.tutorial-body { display: none; padding: 28px; }
.tutorial-block.open .tutorial-body { display: block; }
.video-container { width: 100%; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: var(--bg-2); }
.video-container video { width: 100%; height: auto; display: block; background: var(--bg-2); }
.video-container iframe { width: 100%; height: 380px; display: block; border: none; }
.video-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  background: linear-gradient(135deg, #f0fdfa, #eff6ff);
  color: var(--ink-2);
  text-align: center;
  padding: 40px;
  border-radius: 14px;
}
.video-placeholder .play-icon {
  width: 72px;
  height: 72px;
  background: var(--brand);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  font-size: 26px;
  color: #fff;
}

/* ── Auth pages ── */
.page-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: transparent;
}
.auth-bg {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: transparent;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  box-shadow: var(--shadow-lg);
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--grad-1);
  font-size: 24px;
  margin-bottom: 14px;
}
.auth-header { text-align: center; margin-bottom: 30px; }
.auth-header h1 { font-size: 24px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.auth-header p { color: var(--muted); font-size: 14px; }
.form-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.remember { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.remember input { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }
.forgot { color: var(--brand); font-size: 13px; font-weight: 600; text-decoration: none; }
.forgot:hover { text-decoration: underline; }
.btn-submit {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 10px;
  background: var(--grad-1);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  font-family: inherit;
}
.btn-submit:hover { opacity: 0.92; transform: translateY(-1px); }
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.auth-footer { margin-top: 24px; text-align: center; font-size: 14px; color: var(--muted); }
.auth-footer a { color: var(--brand); font-weight: 600; text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }
.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.divider span { color: #94a3b8; font-size: 12px; white-space: nowrap; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.pw-hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--brand-light);
  border: 1px solid rgba(0, 173, 181, 0.2);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.5;
}
.notice strong { color: var(--warn); }
.code-input { letter-spacing: 6px; font-size: 22px; text-align: center; }
.btn-ghost {
  width: 100%;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  margin-top: 10px;
}
.btn-ghost:hover { background: var(--bg-2); color: var(--text); }

/* ── Checkout ── */
.checkout-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  max-width: 920px;
  margin: 0 auto;
  padding: 20px 0 40px;
}
.checkout-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--shadow-lg);
}
.checkout-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 20px; color: var(--text); }
.plan-summary { background: var(--bg-2); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 20px; }
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.summary-row:last-child { border-bottom: none; }
.summary-row.discount .summary-value { color: var(--ok); }
.summary-label { color: var(--muted); font-size: 14px; }
.summary-value { color: var(--text); font-weight: 600; font-size: 15px; }
.price-value { font-size: 28px; font-weight: 800; color: var(--brand); }
.coupon-box {
  margin-top: 18px;
  padding: 16px;
  border-radius: 14px;
  background: var(--brand-light);
  border: 1px dashed rgba(0, 173, 181, 0.35);
}
.coupon-row { display: flex; gap: 10px; margin-top: 10px; }
.coupon-row input { flex: 1; }
.coupon-applied {
  display: none;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(5, 150, 105, 0.1);
  color: var(--ok);
  font-size: 13px;
  font-weight: 600;
}
.coupon-applied.show { display: block; }
.secure-badge { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--ok); font-size: 14px; margin-top: 16px; }

/* ── Payment result ── */
body.page-centered .site-content {
  align-items: center;
  justify-content: center;
  padding: 24px 16px 40px;
}
body.pay-result-page .site-content {
  padding-top: 28px;
  padding-bottom: 48px;
}

.pay-shell {
  width: min(560px, 100%);
  margin: 0 auto;
}

.pay-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  background: #ffffff;
  color: var(--text);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 24px;
  box-shadow:
    0 18px 50px rgba(15, 23, 42, 0.18),
    0 2px 8px rgba(15, 23, 42, 0.06);
  padding: 36px 28px 28px;
  text-align: center;
}

.pay-card[hidden] { display: none !important; }

.pay-card--in {
  animation: payCardIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes payCardIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.pay-glow {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 180px;
  pointer-events: none;
  filter: blur(28px);
  opacity: 0.55;
}
.pay-glow--ok {
  background: radial-gradient(circle at 50% 20%, rgba(16, 185, 129, 0.35), transparent 70%);
}
.pay-glow--err {
  background: radial-gradient(circle at 50% 20%, rgba(239, 68, 68, 0.28), transparent 70%);
}

.pay-badge {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  font-size: 30px;
  position: relative;
  z-index: 1;
  animation: payPulse 1.8s ease-in-out infinite;
}
.pay-badge--ok {
  color: #059669;
  background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
  border: 2px solid #6ee7b7;
  box-shadow: 0 10px 24px rgba(16, 185, 129, 0.2);
}
.pay-badge--err {
  color: #dc2626;
  background: linear-gradient(180deg, #fef2f2 0%, #fee2e2 100%);
  border: 2px solid #fca5a5;
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.16);
  animation: none;
}

@keyframes payPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.pay-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}
.pay-kicker--ok { color: #059669; }
.pay-kicker--err { color: #dc2626; }

.pay-card h1 {
  font-size: clamp(1.55rem, 4vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
  margin: 0 0 10px;
  position: relative;
  z-index: 1;
}

.pay-lead {
  color: #64748b;
  font-size: 15px;
  line-height: 1.55;
  margin: 0 auto 22px;
  max-width: 36ch;
  position: relative;
  z-index: 1;
}

.pay-card--loading h1 {
  margin-top: 4px;
}
.pay-card--loading p {
  color: #64748b;
  font-size: 14px;
  margin: 0;
}

.pay-spinner {
  width: 52px;
  height: 52px;
  margin: 8px auto 18px;
  border-radius: 50%;
  border: 4px solid #e2e8f0;
  border-top-color: var(--brand);
  animation: spin 0.8s linear infinite;
}

.pay-license {
  text-align: left;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 14px 14px 16px;
  margin: 0 0 18px;
  position: relative;
  z-index: 1;
}
.pay-license[hidden] { display: none !important; }

.pay-license__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.pay-license__head span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.pay-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: 0.18s ease;
}
.pay-copy:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.pay-copy.is-copied {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #059669;
}

.pay-license__key {
  display: block;
  width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(12px, 3.4vw, 14px);
  line-height: 1.45;
  word-break: break-all;
  color: #0f172a;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  user-select: all;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.pay-license__key:hover {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 173, 181, 0.12);
}

.pay-details {
  display: grid;
  gap: 0;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  margin: 0 0 22px;
  text-align: left;
  position: relative;
  z-index: 1;
}
.pay-details[hidden] { display: none !important; }

.pay-detail {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-top: 1px solid #e2e8f0;
  font-size: 13px;
}
.pay-detail:first-child { border-top: none; }
.pay-detail span {
  color: #64748b;
  font-weight: 600;
}
.pay-detail strong {
  color: #0f172a;
  font-weight: 700;
  word-break: break-word;
  text-align: right;
}

.pay-status {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.pay-status--ok { color: #059669 !important; }
.pay-status--err { color: #dc2626 !important; }

.pay-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.pay-btn {
  min-height: 46px;
  border-radius: 12px;
  font-weight: 700;
  width: 100%;
}
.pay-btn--primary {
  background: var(--grad-1);
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 173, 181, 0.25);
}
.pay-btn--primary:hover {
  opacity: 1;
  filter: brightness(1.03);
}
.pay-btn--ghost {
  background: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
}
.pay-btn--ghost:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #94a3b8;
  transform: translateY(-1px);
}

.pay-footnote {
  margin: 16px 0 0;
  font-size: 12px;
  color: #94a3b8;
  word-break: break-all;
  position: relative;
  z-index: 1;
}
.pay-footnote:empty { display: none; }
.pay-footnote code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 6px;
  padding: 2px 6px;
}

/* Legacy loaders / result blocks (kept for other pages) */
.loader { text-align: center; }
.spinner {
  width: 52px;
  height: 52px;
  border: 4px solid var(--bg-2);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader p { color: var(--muted); font-size: 15px; }
.result {
  display: none;
  max-width: 560px;
  width: 100%;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  padding: 32px;
}
.icon-wrap {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 36px;
}
.icon-wrap.ok { background: var(--ok-bg); color: var(--ok); border: 2px solid var(--ok-border); }
.icon-wrap.err { background: var(--danger-bg); color: var(--danger); border: 2px solid var(--danger-border); }
.result h2 { text-align: center; font-size: 24px; margin-bottom: 8px; }
.result p { text-align: center; color: var(--muted); margin-bottom: 24px; }
.result-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 640px) {
  body.page-centered .site-content {
    padding: 16px 12px 32px;
    align-items: flex-start;
  }
  .pay-card {
    padding: 28px 18px 20px;
    border-radius: 20px;
  }
  .pay-badge {
    width: 68px;
    height: 68px;
    font-size: 26px;
    margin-bottom: 14px;
  }
  .pay-lead {
    font-size: 14px;
    margin-bottom: 18px;
  }
  .pay-detail {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 12px;
  }
  .pay-detail strong,
  .pay-status {
    text-align: left;
    justify-content: flex-start;
  }
  .pay-actions {
    grid-template-columns: 1fr;
  }
  .pay-btn {
    min-height: 48px;
  }
}

@media (min-width: 900px) {
  .pay-card {
    padding: 42px 36px 32px;
  }
  .pay-lead {
    max-width: 40ch;
  }
}

/* ── Dashboard ── */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
  width: 100%;
}
.summary-grid .stat-card {
  min-width: 0;
  max-width: none;
  width: 100%;
}
.stat-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-card);
}
.stat-card:hover { border-color: #cbd5e1; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.stat-icon i { line-height: 1; }
.stat-value { font-size: 26px; font-weight: 700; color: var(--text); line-height: 1; }
.stat-label { font-size: 12px; color: var(--ink-2); margin-top: 3px; }
.main-layout { display: flex; gap: 24px; width: 100%; align-items: flex-start; }
.main-content { flex: 1; min-width: 0; width: 100%; }
.sidebar { width: 260px; flex-shrink: 0; display: flex; flex-direction: column; gap: 8px; }
.sidebar-menu {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  flex: 1;
  box-shadow: var(--shadow);
}
.sidebar-title { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.8px; margin: 8px 10px 6px; }
.sidebar-divider { height: 1px; background: var(--border); margin: 8px 0; }
.sidebar-link, .sidebar-action {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  background: transparent;
  width: 100%;
  font-family: inherit;
}
.sidebar-link:hover, .sidebar-action:hover { background: var(--bg-2); color: var(--text); }
.sidebar-link.active { background: var(--brand-light); color: var(--brand); }
.sidebar-action.logout { color: var(--danger); }
.sidebar-action.logout:hover { background: var(--danger-bg); }
.sidebar-icon { font-size: 15px; flex-shrink: 0; width: 22px; text-align: center; color: inherit; }
.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 5px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  position: relative;
}
.user-badge-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #fff;
  font-weight: 700;
}
.user-dropdown, .profile-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  min-width: 180px;
  box-shadow: var(--shadow-lg);
  z-index: 100;
}
.user-dropdown.active, .profile-dropdown.active { display: block; }

.admin-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 20px 0 8px;
}
.admin-toolbar .user-badge { position: relative; }

.shell.wide > .summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* ── Security / standalone cards ── */
.turnstile-card, .security-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  max-width: 440px;
  width: 100%;
  margin: 20px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.turnstile-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: var(--brand);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -1px;
}
.cf-wrap { display: flex; justify-content: center; margin-bottom: 24px; }
.shield-note { font-size: 13px; color: #94a3b8; margin-top: 20px; }
.error-banner {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 20px;
}

/* ── Success / status card ── */
.status-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 48px 40px;
  max-width: 540px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: fadeIn 0.4s ease forwards;
  position: relative;
  overflow: hidden;
}
.status-card h1 { font-size: clamp(1.4rem, 4vw, 1.7rem); font-weight: 800; margin-bottom: 10px; color: var(--text); letter-spacing: -0.02em; }
.status-card p { color: var(--muted); margin-bottom: 24px; line-height: 1.6; }
.status-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 36px;
}
.status-icon.ok { background: var(--ok-bg); color: var(--ok); border: 2px solid var(--ok-border); }
.status-icon.warn { background: #fffbeb; color: var(--warn); border: 2px solid #fde68a; }
.status-icon.err { background: var(--danger-bg); color: var(--danger); border: 2px solid var(--danger-border); }
.license-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 20px 0;
  text-align: left;
  font-family: ui-monospace, monospace;
  font-size: 13px;
  word-break: break-all;
}
.key-container { margin: 24px 0; }
.key-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); margin-bottom: 8px; font-weight: 600; }
.key {
  font-family: ui-monospace, monospace;
  font-size: clamp(13px, 3.5vw, 15px);
  padding: 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  word-break: break-all;
}
.copy-btn {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-1);
  cursor: pointer;
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text);
  transition: all 0.2s;
}
.copy-btn:hover { border-color: var(--brand); color: var(--brand); }
.meta-info {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}
.btn-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.btn-group .btn,
.btn-group a.btn {
  width: 100%;
  min-height: 46px;
}
.download-section {
  background: var(--brand-light);
  border: 1px solid rgba(0, 173, 181, 0.25);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 24px 0;
  text-align: center;
}
.download-section h3 { margin: 0 0 8px; color: var(--brand-dark); font-size: 1.2rem; font-weight: 700; }
.status-card .icon { font-size: 3rem; margin-bottom: 12px; }

@media (max-width: 640px) {
  .status-card {
    padding: 28px 18px 22px;
    border-radius: 20px;
  }
  .btn-group {
    grid-template-columns: 1fr;
  }
  .download-section {
    padding: 18px 14px;
  }
}
.dropdown-item, .profile-dropdown-item {
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--ink-2);
  transition: all 0.15s;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.dropdown-item:hover, .profile-dropdown-item:hover { background: var(--bg-2); color: var(--brand); }
.setup-banner { background: #fffbeb; border-color: #fde68a; }
.setup-banner h3 { color: #b45309; }
.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
@media (min-width: 1400px) {
  .quick-grid { grid-template-columns: repeat(4, 1fr); }
}
.quick-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.2s;
  box-shadow: var(--shadow);
}
.quick-card:hover { border-color: #cbd5e1; box-shadow: var(--shadow-lg); }
.quick-card h4 { font-size: 15px; font-weight: 700; margin-bottom: 5px; color: var(--text); width: 100%; }
.quick-card p { color: var(--ink-2); font-size: 13px; margin-bottom: 14px; flex: 1; width: 100%; }
.card-actions { width: 100%; margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.welcome-panel {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
}
.welcome-panel h3,
.welcome-panel h2,
.welcome-panel p { color: #fff; }
.welcome-panel p.muted { color: rgba(255, 255, 255, 0.78); }
.welcome-panel .btn.ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.welcome-panel .btn.ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.profile-card { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
}
.profile-info { flex: 1; min-width: 220px; }
.profile-name { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.profile-email { font-size: 13px; color: var(--ink-2); margin-bottom: 10px; }
.profile-meta { display: grid; gap: 6px; font-size: 13px; }
.profile-meta-item { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.profile-meta-item .label { color: var(--ink-2); font-weight: 500; }
.profile-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.timeline-icon.ok { background: rgba(5, 150, 105, 0.1); color: var(--ok); }
.timeline-icon.warn { background: rgba(217, 119, 6, 0.1); color: var(--warn); }
.timeline-icon.danger { background: rgba(220, 38, 38, 0.1); color: var(--danger); }

/* ── Admin ── */
.summary-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
}
.summary-card .value { font-size: 28px; font-weight: 800; color: var(--brand); margin-bottom: 4px; }
.summary-card .label { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.tool-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 14px; }
.tool-btn { border-radius: 999px; }
.tool-btn.active { background: var(--grad-1); color: #fff; border-color: transparent; }
.tools-grid { display: grid; gap: 16px; }
.tool-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.tool-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--bg-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.tool-info { flex: 1; }
.tool-info h4 { margin: 0 0 4px; font-size: 16px; }
.tool-info p { margin: 0; font-size: 13px; color: var(--muted); }
.status-select {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  width: auto;
}

/* ── Modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.15);
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-title { font-size: 18px; font-weight: 700; color: var(--text); }
.modal-close {
  background: var(--bg-2);
  border: none;
  font-size: 20px;
  color: var(--muted);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}
.modal-close:hover { background: var(--border); color: var(--text); }

/* ── Skeleton ── */
.skeleton-loader {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  height: 60px;
  border-radius: var(--radius-sm);
  margin: 8px 0;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Responsive ── */
@media (max-width: 900px) {
  .main-layout { flex-direction: column; }
  .sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; }
  .sidebar-menu { flex: 1; min-width: 200px; }
}

@media (min-width: 1100px) {
  .summary-grid,
  .shell.wide > .summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .shell { padding: 0 16px; }
  .hero { margin: 0 -16px; padding: 56px 16px 44px; }
  .hero h1 { font-size: 30px; letter-spacing: -0.5px; }
  .hero p { font-size: 16px; }
  .hero-stats { gap: 24px; }
  .features-strip { margin: 0 -16px; grid-template-columns: 1fr 1fr; }
  .feature-item { padding: 16px 18px; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; padding: 5px; }
  .tab-btn { padding: 9px 14px; font-size: 12px; white-space: nowrap; }
  .product-card { padding: 20px; border-radius: 18px; }
  .product-header { flex-direction: column; align-items: flex-start; gap: 14px; }
  .product-title-group h3 { font-size: 18px; }
  .product-actions { width: 100%; }
  .product-actions .btn, .product-actions .download-btn { flex: 1; justify-content: center; }
  .plans-grid { grid-template-columns: 1fr; gap: 12px; }
  .plan-card { padding: 18px; }
  .new-price { font-size: 26px; }
  .custom-plan-form { flex-direction: column; }
  .custom-plan-form .form-group { min-width: 100%; }
  .custom-plan-container { padding: 20px; }
  .tutorial-block-header { padding: 18px 20px; }
  .tutorial-body { padding: 20px; }
  .site-footer, .footer { margin-top: 40px; padding: 28px 0; }
  .footer-inner, .footer-content { flex-direction: column; text-align: center; gap: 16px; }
  .footer-links { justify-content: center; }
  .checkout-container { grid-template-columns: 1fr; }
  .checkout-card { padding: 24px; }
  .summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .shell.wide > .summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .video-container iframe { height: 220px; }
}

@media (max-width: 640px) {
  .mobile-menu-btn { display: block; }
  .topnav .actions {
    display: none;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 16px;
    gap: 6px;
  }
  .topnav .actions.open { display: flex; }
  .topnav { position: relative; padding: 0 16px; }
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .shell.wide > .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .summary-grid .stat-card { padding: 14px; }
  .stat-value { font-size: 22px; }
  .panel { padding: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .modal { padding: 22px 18px; margin: 12px; max-width: calc(100vw - 24px); }
  .quick-grid { grid-template-columns: 1fr; }
  .profile-card { flex-direction: column; align-items: center; text-align: center; }
  .profile-info { min-width: auto; width: 100%; }
  .profile-actions { justify-content: center; }
}

@media (max-width: 480px) {
  .shell { padding: 0 12px; }
  .hero { margin: 0 -12px; padding: 48px 12px 36px; }
  .features-strip { margin: 0 -12px; grid-template-columns: 1fr; }
  .product-icon { width: 44px; height: 44px; font-size: 22px; }
  .product-title-group h3 { font-size: 16px; }
  .product-title-group p { font-size: 13px; }
  .status-badge { padding: 3px 9px; font-size: 10px; }
  .new-price { font-size: 22px; }
  .tabs { gap: 4px; padding: 4px; }
  .tab-btn { padding: 8px 10px; font-size: 12px; }
  .auth-card { padding: 28px 22px; }
  .auth-header h1 { font-size: 21px; }
}
