/* ═══════════════════════════════════════════════════════════
   LinesUPS Design System — Dual Theme
   Dark (default) · Light
   ═══════════════════════════════════════════════════════════ */

/* ─── Theme tokens ─── */

:root,
[data-theme="dark"] {
  --bg:              #070b12;
  --bg-alt:          #0c1220;
  --surface:         rgba(15, 22, 38, 0.85);
  --surface-raised:  rgba(18, 27, 46, 0.95);
  --surface-hover:   rgba(22, 33, 58, 0.9);
  --border:          rgba(255, 255, 255, 0.07);
  --border-strong:   rgba(255, 255, 255, 0.13);
  --border-focus:    rgba(59, 130, 246, 0.6);

  --text:            #f0f4fa;
  --text-secondary:  #94a3b8;
  --text-muted:      #5a6a80;

  --primary:         #3b82f6;
  --primary-hover:   #2563eb;
  --primary-soft:    rgba(59, 130, 246, 0.12);
  --primary-glow:    rgba(59, 130, 246, 0.22);
  --accent:          #38bdf8;

  --success:         #22c55e;
  --success-soft:    rgba(34, 197, 94, 0.12);
  --warning:         #f59e0b;
  --warning-soft:    rgba(245, 158, 11, 0.12);
  --danger:          #f87171;
  --danger-soft:     rgba(248, 113, 113, 0.12);
  --info:            #38bdf8;
  --info-soft:       rgba(56, 189, 248, 0.12);

  --shadow-sm:       0 1px 4px rgba(0,0,0,0.3);
  --shadow:          0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg:       0 12px 48px rgba(0,0,0,0.55);
  --glow:            0 0 32px rgba(59, 130, 246, 0.18);

  --nav-bg:          rgba(7, 11, 18, 0.8);
  --code-bg:         rgba(10, 16, 28, 0.9);

  --radius-xs:  5px;
  --radius-sm:  9px;
  --radius-md:  13px;
  --radius-lg:  17px;
  --radius-xl:  22px;
  --radius-full: 9999px;

  --transition: 160ms cubic-bezier(0.4, 0, 0.2, 1);

  color-scheme: dark;
}

[data-theme="light"] {
  --bg:              #f1f5f9;
  --bg-alt:          #e8eef6;
  --surface:         rgba(255, 255, 255, 0.92);
  --surface-raised:  rgba(255, 255, 255, 0.98);
  --surface-hover:   rgba(248, 251, 255, 0.95);
  --border:          rgba(0, 0, 0, 0.07);
  --border-strong:   rgba(0, 0, 0, 0.14);
  --border-focus:    rgba(59, 130, 246, 0.5);

  --text:            #0d1525;
  --text-secondary:  #475569;
  --text-muted:      #94a3b8;

  --primary:         #2563eb;
  --primary-hover:   #1d4ed8;
  --primary-soft:    rgba(37, 99, 235, 0.08);
  --primary-glow:    rgba(37, 99, 235, 0.12);
  --accent:          #0284c7;

  --success:         #16a34a;
  --success-soft:    rgba(22, 163, 74, 0.10);
  --warning:         #d97706;
  --warning-soft:    rgba(217, 119, 6, 0.10);
  --danger:          #dc2626;
  --danger-soft:     rgba(220, 38, 38, 0.10);
  --info:            #0284c7;
  --info-soft:       rgba(2, 132, 199, 0.10);

  --shadow-sm:       0 1px 4px rgba(0,0,0,0.07);
  --shadow:          0 4px 20px rgba(0,0,0,0.09);
  --shadow-lg:       0 12px 48px rgba(0,0,0,0.13);
  --glow:            none;

  --nav-bg:          rgba(241, 245, 249, 0.88);
  --code-bg:         rgba(226, 232, 240, 0.8);

  color-scheme: light;
}

/* ─── Reset ─── */

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

html {
  scroll-behavior: smooth;
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 15% -5%, rgba(59,130,246,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 85% 5%, rgba(56,189,248,0.04) 0%, transparent 60%),
    var(--bg);
  transition: background-color var(--transition), color var(--transition);
}

[data-theme="light"] body {
  background:
    radial-gradient(ellipse 80% 40% at 15% -5%, rgba(59,130,246,0.05) 0%, transparent 60%),
    var(--bg);
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
img, svg { display: block; }

/* ─── Layout ─── */

.shell {
  width: min(1160px, calc(100vw - 40px));
  margin: 0 auto;
}

/* ─── Topbar ─── */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 20px;
  margin: 12px auto;
  width: min(1160px, calc(100vw - 40px));
  position: sticky;
  top: 12px;
  z-index: 100;
  backdrop-filter: blur(24px) saturate(1.4);
  background: var(--nav-bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, opacity 0.25s ease, background var(--transition);
}

[data-theme="light"] .topbar {
  box-shadow: var(--shadow-sm);
}

.topbar.is-hidden {
  transform: translateY(-110%);
  opacity: 0;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text);
  text-decoration: none;
}

.brand-icon {
  width: 28px;
  height: 28px;
  background: var(--primary);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--glow);
  flex-shrink: 0;
}

[data-theme="light"] .brand-icon {
  box-shadow: 0 0 14px rgba(37,99,235,0.18);
}

.brand-icon svg {
  width: 16px;
  height: 16px;
  fill: #fff; /* always white on colored bg */
}

.topbar-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: flex-end;
  min-width: 0;
  overflow: hidden;
}

.nav-primary {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex-shrink: 1;
  min-width: 0;
}

.nav-primary::-webkit-scrollbar {
  display: none;
}

.nav-link {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition), background var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text);
  background: var(--surface-hover);
}

.nav-link.is-active {
  color: var(--primary);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 8px;
  border-left: 1px solid var(--border);
  flex-shrink: 0;
}

.user-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}

.user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-role {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ─── Lang Toggle ─── */

.lang-toggle {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: .15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lang-toggle:hover { background: var(--surface-hover); color: var(--text); }

/* ─── Theme Toggle ─── */

.theme-toggle {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* ─── Burger (mobile) ─── */

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 8px;
}

.burger span {
  display: block;
  height: 1.5px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* ─── Buttons ─── */

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 20px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  white-space: nowrap;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.primary-button:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 16px var(--primary-glow);
  transform: translateY(-1px);
}

.primary-button:active { transform: translateY(0); }

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 20px;
  background: var(--surface-raised);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
  white-space: nowrap;
}

.secondary-button:hover {
  background: var(--surface-hover);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  background: none;
  color: var(--text-secondary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
  white-space: nowrap;
}

.ghost-button:hover {
  color: var(--text);
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.logout-button {
  color: var(--text-muted);
  border-color: var(--border);
}

.logout-button:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: var(--danger-soft);
}

/* ─── Cards ─── */

.panel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(12px);
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.panel-card:hover {
  border-color: var(--border-strong);
}

[data-theme="light"] .panel-card {
  box-shadow: var(--shadow-sm);
}

.panel-card h2 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 16px;
  color: var(--text);
}

.panel-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--text);
}

.panel-card p {
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.panel-card p:last-child { margin-bottom: 0; }

/* ─── Status chips ─── */

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1px;
  white-space: nowrap;
}

.status-chip::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.8;
}

.status-active  { background: var(--success-soft); color: var(--success); }
.status-online  { background: var(--success-soft); color: var(--success); }
.status-trial   { background: var(--info-soft);    color: var(--info); }
.status-pending { background: var(--warning-soft); color: var(--warning); }
.status-grace   { background: var(--warning-soft); color: var(--warning); }
.status-expired { background: var(--danger-soft);  color: var(--danger); }
.status-failed  { background: var(--danger-soft);  color: var(--danger); }
.status-offline { background: var(--danger-soft);  color: var(--danger); }
.status-error   { background: var(--danger-soft);  color: var(--danger); }
.status-degraded{ background: var(--warning-soft); color: var(--warning); }
.status-maintenance { background: var(--info-soft); color: var(--info); }
.status-revoked { background: var(--danger-soft);  color: var(--danger); }
.status-paid    { background: var(--success-soft); color: var(--success); }
.status-canceled{ background: var(--danger-soft);  color: var(--danger); }
.status-frozen  { background: var(--info-soft);    color: var(--text-muted); }
.status-refunded{ background: var(--warning-soft); color: var(--warning); }
.status-open    { background: var(--primary-soft); color: var(--primary); }
.status-closed  { background: var(--border); color: var(--text-muted); }
.status-waiting_user    { background: var(--warning-soft); color: var(--warning); }
.status-waiting_support { background: var(--info-soft); color: var(--info); }

/* ─── Messages ─── */

.message {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.5;
  border: 1px solid transparent;
  margin-bottom: 12px;
}

.message.error,   .message.danger  { background: var(--danger-soft);  border-color: rgba(248,113,113,0.2);  color: var(--danger); }
.message.success               { background: var(--success-soft); border-color: rgba(34,197,94,0.2);  color: var(--success); }
.message.warning               { background: var(--warning-soft); border-color: rgba(245,158,11,0.2); color: var(--warning); }
.message.info                  { background: var(--info-soft);    border-color: rgba(56,189,248,0.2); color: var(--info); }

[data-theme="light"] .message.error,
[data-theme="light"] .message.danger  { color: #b91c1c; border-color: rgba(220,38,38,0.25); }
[data-theme="light"] .message.success { color: #15803d; border-color: rgba(22,163,74,0.25); }
[data-theme="light"] .message.warning { color: #92400e; border-color: rgba(217,119,6,0.25); }
[data-theme="light"] .message.info    { color: #075985; border-color: rgba(2,132,199,0.25); }

/* ─── Forms ─── */

label > span {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
textarea,
select {
  width: 100%;
  padding: 9px 13px;
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 14px;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  outline: none;
  appearance: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

input::placeholder, textarea::placeholder { color: var(--text-muted); }

textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.5;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-form label {
  display: flex;
  flex-direction: column;
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.compact-actions { margin-top: 10px; }

.field-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.field-row input { flex: 1; }

.text-input {
  padding: 9px 13px;
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}

.text-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.consent-group { margin-top: 4px; }

.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.consent-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--primary);
  cursor: pointer;
}

.consent-label a { color: var(--primary); }

/* ─── Tables ─── */

.table-shell {
  overflow-x: auto;
  margin: 0 -4px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th {
  text-align: left;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

td {
  padding: 11px 12px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }

tbody tr:hover td {
  background: var(--surface-hover);
  color: var(--text);
}

/* ─── List stack ─── */

.list-stack {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.line-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}

.line-item:last-child { border-bottom: none; }

.line-item > span:first-child { color: var(--text-secondary); }
.line-item > span:last-child  { color: var(--text); font-weight: 500; }

/* ─── Section headers ─── */

.section-header {
  text-align: center;
  padding: 40px 0 32px;
  max-width: 640px;
  margin: 0 auto;
}

.section-header h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 8px 0 12px;
  color: var(--text);
}

.section-header p {
  color: var(--text-secondary);
  font-size: 16px;
  margin: 0;
  line-height: 1.6;
}

.section-header-compact {
  text-align: left;
  max-width: 100%;
  padding: 24px 0 20px;
  margin: 0;
}

.section-inline-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section-inline-header h2 { margin: 0; }

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 8px;
}

.panel-section {
  padding: 24px 0;
}

.muted-copy {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

/* ─── Code field ─── */

.code-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.code-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--code-bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--accent);
  font-family: "SF Mono", "Fira Code", "Fira Mono", monospace;
  font-size: 12px;
  line-height: 1.6;
  resize: none;
  min-height: 72px;
  outline: none;
  transition: border-color var(--transition);
}

.code-textarea:focus { border-color: var(--border-focus); }

/* ─── Code input (single-line variant of code-textarea) ─── */
.code-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--code-bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--accent);
  font-family: "SF Mono", "Fira Code", "Fira Mono", monospace;
  font-size: 12px;
  outline: none;
  transition: border-color var(--transition);
}
.code-input:focus { border-color: var(--border-focus); }

/* ─── Sub URL block in dashboard ─── */
.sub-url-block { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }

/* ─── Connect page ─── */
.connect-page { max-width: 800px; margin: 0 auto; padding: 40px 0 80px; }
.connect-hero { text-align: center; margin-bottom: 12px; }
.connect-hero h1 { font-size: 36px; font-weight: 700; margin-bottom: 8px; }

/* Platform tabs */
.platform-tabs { display: flex; gap: 8px; justify-content: center; margin-bottom: 32px; flex-wrap: wrap; }
.platform-tab {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius-full);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-secondary); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
}
.platform-tab:hover { border-color: var(--border-strong); color: var(--text); }
.platform-tab.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.platform-tab-icon { font-size: 18px; }
.platform-content { display: none; }
.platform-content.is-visible { display: block; }
.platform-intro { margin-bottom: 20px; }
.platform-intro h2 { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.platform-intro p { color: var(--text-secondary); font-size: 15px; }

.connect-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; gap: 16px; margin-bottom: 16px; }
[data-theme="light"] .connect-card { box-shadow: var(--shadow-sm); }
.connect-card h3 { font-size: 17px; font-weight: 700; margin: 0; display: flex; align-items: center; gap: 10px; }
.connect-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: var(--radius-full); }
.connect-badge-rec { background: var(--success-soft); color: var(--success); }
.step-note { display: block; font-size: 13px; color: var(--text-muted); margin-top: 4px; font-style: italic; }
/* (old app icons removed — using text headers now) */
.connect-card h2 { font-size: 17px; font-weight: 600; margin: 0; }
.connect-platforms { font-size: 12px; color: var(--text-muted); }
.connect-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.connect-steps li { font-size: 14px; line-height: 1.5; color: var(--text); }
.connect-tip { font-size: 13px; color: var(--text-muted); background: var(--surface-2); border-left: 3px solid var(--primary); padding: 8px 12px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.connect-code { font-family: "SF Mono", "Fira Code", monospace; font-size: 12px; color: var(--accent); background: var(--code-bg); border: 1px solid var(--border-strong); border-radius: var(--radius-md); padding: 8px 12px; word-break: break-all; }
/* Download grid */
.download-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-bottom: 24px; }
.download-card { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); transition: all var(--transition); text-decoration: none; position: relative; }
.download-card:hover { border-color: var(--primary); background: var(--primary-soft); transform: translateY(-1px); }
.download-name { font-size: 15px; font-weight: 600; color: var(--text); }
.download-source { font-size: 12px; color: var(--text-muted); }
.download-badge { position: absolute; top: 10px; right: 10px; font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: var(--radius-full); }
.download-badge-rec { background: var(--success-soft); color: var(--success); }
[data-theme="light"] .download-card { box-shadow: var(--shadow-sm); }

.connect-faq { max-width: 680px; margin: 0 auto; }
.connect-faq h2 { font-size: 22px; font-weight: 700; margin-bottom: 20px; text-align: center; }
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
[data-theme="light"] .faq-item { box-shadow: var(--shadow-sm); }
.faq-item summary { padding: 16px 20px; cursor: pointer; font-weight: 500; font-size: 15px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 20px; color: var(--primary); transition: transform var(--transition); }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 20px 16px; font-size: 14px; color: var(--text-muted); line-height: 1.6; margin: 0; }
.faq-item p code { background: var(--surface-2); padding: 2px 6px; border-radius: 4px; font-size: 12px; color: var(--accent); }

@media (max-width: 640px) {
  .connect-grid { grid-template-columns: 1fr; }
  .connect-hero h1 { font-size: 26px; }
}

/* ─── Copy button ─── */

.copy-button { font-size: 13px; }

/* ─── Hero section ─── */

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 72px 0 64px;
}

.hero-copy { max-width: 540px; }

.hero-copy h1 {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.15;
  margin: 10px 0 18px;
  color: var(--text);
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="light"] .hero-copy h1 {
  background: linear-gradient(135deg, #0d1525 0%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-copy > p {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0 0 28px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.stats-grid {
  display: flex;
  gap: 20px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.stat-number {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* ─── Hero panel (right side) ─── */

.hero-panel {
  position: relative;
}

.signal-card {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 28px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-lg), var(--glow);
  position: relative;
  overflow: hidden;
}

[data-theme="light"] .signal-card {
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

.signal-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0.5;
}

.signal-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: var(--primary-soft);
  border: 1px solid var(--primary-glow);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 14px;
}

.signal-intro {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 16px;
  line-height: 1.6;
}

.signal-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.signal-list li {
  font-size: 13.5px;
  color: var(--text-secondary);
  padding-left: 20px;
  position: relative;
  line-height: 1.5;
}

.signal-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
  font-size: 12px;
}

/* ─── Feature grid ─── */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.feature-card {
  text-align: center;
  padding: 28px 20px;
}

.feature-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--text);
}

.feature-card p {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.55;
}

/* ─── Pricing ─── */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: stretch;
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  backdrop-filter: blur(12px);
}

.pricing-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

[data-theme="light"] .pricing-card {
  box-shadow: var(--shadow-sm);
}

[data-theme="light"] .pricing-card:hover {
  box-shadow: var(--shadow);
}

.plan-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--primary);
}

.plan-badge--promo {
  color: #f59e0b;
  animation: promo-pulse 2s ease-in-out infinite;
}

@keyframes promo-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.pricing-card--promo {
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.pricing-card--entry {
  border: 1px dashed var(--border-strong);
  opacity: 0.92;
}
.pricing-card--entry:hover {
  opacity: 1;
}

.plan-badge--entry {
  color: var(--text-muted);
  font-weight: 600;
}

.primary-button--outline {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
}
.primary-button--outline:hover {
  background: var(--primary);
  color: #fff;
}

.price-old {
  font-size: 0.6em;
  color: var(--text-muted);
  text-decoration: line-through;
  font-weight: 500;
  margin-right: 8px;
}

.pricing-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
  letter-spacing: -0.3px;
}

.plan-price {
  font-size: 36px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -1px;
  line-height: 1;
}

.plan-price .price-period {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0;
}

.pricing-card > p {
  font-size: 14px;
  color: var(--text);
  margin: 0;
  line-height: 1.5;
  opacity: 0.8;
}

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.check-list li {
  font-size: 13.5px;
  color: var(--text);
  opacity: 0.75;
  padding-left: 22px;
  position: relative;
  line-height: 1.5;
}

.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
  font-size: 12px;
}

.pricing-footer { margin-top: auto; }

.pricing-footer .primary-button,
.pricing-footer .secondary-button { width: 100%; }

/* ─── Node cards ─── */

.node-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.node-grid-after-map {
  margin-top: 20px;
}

.node-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  backdrop-filter: blur(12px);
  transition: border-color var(--transition);
}

.node-card:hover { border-color: var(--border-strong); }

[data-theme="light"] .node-card {
  box-shadow: var(--shadow-sm);
}

.node-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.node-top h3, .node-top h2 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  color: var(--text);
}

.node-card > p, .status-card > p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 14px;
}

.node-meta-grid {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
}

.node-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.meta-label {
  font-size: 11px;
  color: var(--text-muted);
}

.trial-badge {
  font-size: 12px !important;
  color: var(--info) !important;
}

.node-load-bar {
  height: 4px;
  background: var(--border-strong);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.node-load-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.load-low  { background: var(--success); }
.load-mid  { background: var(--warning); }
.load-high { background: var(--danger); }

/* ─── Dashboard ─── */

.dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 40px 0 28px;
}

.dashboard-header h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 4px 0 6px;
  color: var(--text);
}

.dashboard-actions { display: flex; gap: 10px; padding-top: 8px; }

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.dashboard-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.panel-span-2 { grid-column: span 2; }

.billing-plans-section { margin-top: 24px; }

.dashboard-pricing-grid {
  grid-template-columns: repeat(3, 1fr);
}

.pill-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

/* ─── Checkout callout ─── */

.checkout-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 24px;
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--surface), var(--primary-soft));
  margin-top: 16px;
}

.checkout-callout h2 {
  font-size: 16px;
  margin: 4px 0 6px;
}

/* ─── Auth ─── */

.auth-shell {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 0;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-lg);
}

[data-theme="light"] .auth-card {
  box-shadow: var(--shadow-lg);
}

.auth-card h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.4px;
  margin: 4px 0 20px;
  color: var(--text);
}

.auth-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 18px;
  flex-wrap: wrap;
}

.auth-links a {
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

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

/* ─── Billing checkout ─── */

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.promo-section h3,
.payment-methods h3 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin: 0 0 10px;
}

.payment-method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.payment-method-option {
  cursor: pointer;
}

.payment-method-option input[type="radio"] {
  display: none;
}

.payment-method-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  transition: border-color var(--transition), background var(--transition);
  cursor: pointer;
}

.payment-method-option input:checked + .payment-method-card {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.payment-method-card:hover { border-color: var(--primary); }

.pm-icon { font-size: 22px; }

.pm-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.pm-desc {
  font-size: 12px;
  color: var(--text-muted);
}

/* ─── Admin ─── */

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  backdrop-filter: blur(12px);
  transition: border-color var(--transition);
}

.metric-card:hover { border-color: var(--border-strong); }

[data-theme="light"] .metric-card {
  box-shadow: var(--shadow-sm);
}

.metric-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.metric-number {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.admin-panels-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.admin-form-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ─── Bootstrap monitor ─── */

.bootstrap-monitor[hidden] { display: none; }

.bootstrap-monitor {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(7, 11, 18, 0.88);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

[data-theme="light"] .bootstrap-monitor {
  background: rgba(241, 245, 249, 0.88);
}

.bootstrap-monitor__card {
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 28px;
  max-width: 660px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
}

.bootstrap-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.bootstrap-title { font-size: 18px; font-weight: 700; margin: 0 0 4px; color: var(--text); }
.bootstrap-summary { font-size: 13px; color: var(--text-secondary); margin: 0; }

.bootstrap-progress {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.bootstrap-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--border-strong);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.bootstrap-progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.bootstrap-progress-value {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  min-width: 36px;
  text-align: right;
}

.bootstrap-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.bootstrap-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
}

.bootstrap-step.is-done     { border-color: rgba(34,197,94,0.3);  background: var(--success-soft); }
.bootstrap-step.is-running  { border-color: rgba(59,130,246,0.3); background: var(--primary-soft); }
.bootstrap-step.is-failed   { border-color: rgba(248,113,113,0.3);background: var(--danger-soft); }

[data-theme="light"] .bootstrap-step.is-done     { border-color: rgba(22,163,74,0.3); }
[data-theme="light"] .bootstrap-step.is-running  { border-color: rgba(37,99,235,0.3); }
[data-theme="light"] .bootstrap-step.is-failed   { border-color: rgba(220,38,38,0.3); }

.step-name { font-weight: 600; color: var(--text); flex: 1; }
.step-detail { font-size: 12px; color: var(--text-muted); }

.bootstrap-log {
  background: var(--code-bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 12px;
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 11.5px;
  color: var(--accent);
  min-height: 160px;
  max-height: 280px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.5;
  margin-bottom: 16px;
}

/* ─── Status page ─── */

.status-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 8px;
}

.summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  backdrop-filter: blur(12px);
}

[data-theme="light"] .summary-card {
  box-shadow: var(--shadow-sm);
}

.summary-number {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -1px;
}

.summary-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.status-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  backdrop-filter: blur(12px);
}

[data-theme="light"] .status-card {
  box-shadow: var(--shadow-sm);
}

/* ─── Error page ─── */

.error-shell {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 0;
}

.error-card {
  text-align: center;
  max-width: 480px;
}

.error-icon {
  color: var(--primary);
  opacity: 0.5;
  margin-bottom: 16px;
}

.error-icon svg { display: inline-block; }

.error-code {
  font-size: 96px;
  font-weight: 900;
  letter-spacing: -4px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.25;
  line-height: 1;
  margin-bottom: 8px;
}

.error-card h1 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--text);
}

.error-card p {
  color: var(--text-secondary);
  font-size: 15px;
  margin: 0 0 20px;
}

.error-rid {
  font-size: 12px;
  color: var(--text-muted);
}

.error-rid code {
  background: var(--surface);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
}

.error-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

/* ─── Check email ─── */

.info-shell {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 0;
}

.info-card {
  max-width: 440px;
  text-align: center;
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

[data-theme="light"] .info-card {
  box-shadow: var(--shadow);
}

.info-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.info-card h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--text);
}

.info-card p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 20px;
  line-height: 1.6;
}

/* ─── Footer ─── */

.site-footer {
  margin-top: 80px;
  padding: 28px 0 32px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--text); }

/* ─── Legal pages ─── */

.legal-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.legal-card {
  border-radius: 0;
  border-bottom: none;
}

.legal-card:first-child { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.legal-card:last-child  { border-radius: 0 0 var(--radius-lg) var(--radius-lg); border-bottom: 1px solid var(--border); }
.legal-card:only-child  { border-radius: var(--radius-lg); border-bottom: 1px solid var(--border); }

.legal-card h2 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 14px;
  color: var(--text);
}

.legal-card p { margin: 0 0 10px; }
.legal-card p:last-child { margin-bottom: 0; }

.legal-card ul {
  margin: 8px 0 10px;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.legal-card ul li {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.legal-card ul li:last-child { margin-bottom: 0; }

/* ─── Requisites ─── */

.requisites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.requisites-table {
  width: auto;
  border-collapse: collapse;
}

.requisites-table td {
  padding: 5px 0;
  border: none;
  font-size: 14px;
  background: none;
}

.requisites-table tr:hover td { background: none; }

.req-label {
  color: var(--text-muted) !important;
  font-weight: 500;
  padding-right: 20px !important;
  white-space: nowrap;
}

.requisites-table a {
  color: var(--primary);
}

.requisites-table a:hover { text-decoration: underline; }

/* ─── Misc ─── */

.pill-row .status-chip { font-size: 11px; }

.support-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ─── Scrollbar ─── */

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ─── Selection ─── */
::selection { background: var(--primary-soft); color: var(--text); }

/* ─── Hero animations ─── */

@keyframes orb-drift-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(40px, -30px) scale(1.05); }
  66%       { transform: translate(-20px, 20px) scale(0.97); }
}

@keyframes orb-drift-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  40%       { transform: translate(-35px, 25px) scale(1.04); }
  70%       { transform: translate(25px, -15px) scale(0.96); }
}

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

@keyframes cta-pulse {
  0%, 100% { box-shadow: 0 2px 8px var(--primary-glow), 0 0 0 0 var(--primary-glow); }
  50%       { box-shadow: 0 4px 20px var(--primary-glow), 0 0 0 8px transparent; }
}

.hero-bg {
  position: fixed;
  inset: -120px;
  pointer-events: none;
  z-index: 0;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
}

.hero-orb-a {
  width: 700px;
  height: 700px;
  top: -80px;
  left: -60px;
  background: radial-gradient(circle, rgba(37,99,235,0.22) 0%, transparent 70%);
  animation: orb-drift-a 18s ease-in-out infinite;
}

.hero-orb-b {
  width: 600px;
  height: 600px;
  top: 60px;
  right: -40px;
  background: radial-gradient(circle, rgba(56,189,248,0.16) 0%, transparent 70%);
  animation: orb-drift-b 22s ease-in-out infinite;
}

[data-theme="light"] .hero-orb-a {
  background: radial-gradient(circle, rgba(37,99,235,0.08) 0%, transparent 65%);
}
[data-theme="light"] .hero-orb-b {
  background: radial-gradient(circle, rgba(2,132,199,0.06) 0%, transparent 65%);
}

.hero-section-wrap {
  position: relative;
}

.hero-section-wrap .hero {
  position: relative;
  z-index: 1;
}

.lineup-ready .hero-copy > .eyebrow  { animation: fade-up 0.5s ease both; animation-delay: 0.05s; }
.lineup-ready .hero-copy h1          { animation: fade-up 0.5s ease both; animation-delay: 0.15s; }
.lineup-ready .hero-copy > p         { animation: fade-up 0.5s ease both; animation-delay: 0.25s; }
.lineup-ready .hero-actions          { animation: fade-up 0.5s ease both; animation-delay: 0.35s; }
.lineup-ready .stats-grid            { animation: fade-up 0.5s ease both; animation-delay: 0.45s; }

.hero-actions .primary-button {
  animation: cta-pulse 2.8s ease-in-out infinite;
}

/* ─── Feature card hover glow ─── */

.feature-card {
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.feature-card:hover {
  border-color: var(--primary);
  box-shadow: 0 0 24px var(--primary-glow), var(--shadow);
  transform: translateY(-3px);
}

[data-theme="light"] .feature-card:hover {
  box-shadow: 0 0 16px rgba(37,99,235,0.12), var(--shadow);
}

/* featured class kept for backwards compat — no special styling */

/* ─── Location cards ─── */

.locations-country-heading {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 20px 0 10px;
  letter-spacing: -0.2px;
}
.locations-country-heading:first-of-type {
  margin-top: 0;
}

.locations-network {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 8px;
}

.location-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.location-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

[data-theme="light"] .location-card {
  box-shadow: var(--shadow-sm);
}

.location-online { border-left: 3px solid var(--success); }
.location-degraded { border-left: 3px solid var(--warning); }
.location-offline { border-left: 3px solid var(--text-muted); opacity: 0.6; }

.location-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.location-flag { font-size: 22px; line-height: 1; }

.location-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.location-status.dot-online { background: var(--success); box-shadow: 0 0 6px var(--success); }
.location-status.dot-degraded { background: var(--warning); box-shadow: 0 0 6px var(--warning); }
.location-status.dot-offline { background: var(--text-muted); }
.location-status.dot-maintenance { background: #a78bfa; }

[data-theme="light"] .location-status.dot-online { box-shadow: 0 0 5px rgba(22,163,74,0.5); }
[data-theme="light"] .location-status.dot-degraded { box-shadow: 0 0 5px rgba(217,119,6,0.5); }

.location-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1px;
  line-height: 1.3;
}

.location-city {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.location-metrics {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
}

.location-metric { display: flex; flex-direction: column; gap: 0; }
.location-metric-val { font-size: 13px; font-weight: 700; color: var(--text); }
.location-metric-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; }

.location-bar {
  height: 2px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
  opacity: 0.7;
}

.location-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
}
.location-bar-fill.bar-low { background: var(--success); }
.location-bar-fill.bar-mid { background: var(--warning); }
.location-bar-fill.bar-high { background: var(--danger); }

.location-protocols { display: flex; gap: 3px; flex-wrap: wrap; margin-top: 6px; }
.proto-tag { font-size: 9px; font-weight: 600; color: var(--primary); background: rgba(99,102,241,.10); border-radius: 3px; padding: 1px 5px; letter-spacing: 0.2px; line-height: 1.6; }
.proto-tag--new { color: #10b981; background: rgba(16,185,129,.10); }

.status-country-header {
  grid-column: 1 / -1;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  padding: 12px 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.status-country-header:not(:first-child) { margin-top: 8px; }
.country-flag { font-size: 24px; }

/* (map tooltip removed — using location cards now) */

/* ─── Proton-style node cards ─── */

.node-card-v2 {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  backdrop-filter: blur(12px);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.node-card-v2:hover {
  border-color: var(--border-strong);
  box-shadow: 0 0 20px var(--primary-glow), var(--shadow);
  transform: translateY(-3px);
}

[data-theme="light"] .node-card-v2 {
  box-shadow: var(--shadow-sm);
}

.node-card-v2.is-offline {
  opacity: 0.55;
}

.node-card-v2.is-offline:hover {
  box-shadow: none;
  transform: none;
}

[data-theme="light"] .node-card-v2:hover {
  box-shadow: 0 0 14px rgba(37,99,235,0.10), var(--shadow);
}

.node-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.node-flag {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

[data-theme="light"] .node-flag {
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.12));
}

.node-info { flex: 1; min-width: 0; }

.node-country {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.2px;
  line-height: 1.2;
}

.node-city {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.node-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.node-status-dot.dot-online   { background: var(--success); box-shadow: 0 0 6px rgba(34,197,94,0.6); }
.node-status-dot.dot-degraded { background: var(--warning); box-shadow: 0 0 6px rgba(245,158,11,0.6); }
.node-status-dot.dot-offline  { background: var(--text-muted); }
.node-status-dot.dot-maintenance { background: #a78bfa; }

@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 4px rgba(34,197,94,0.5); }
  50%       { box-shadow: 0 0 10px rgba(34,197,94,0.9); }
}

@keyframes dot-pulse-light {
  0%, 100% { box-shadow: 0 0 4px rgba(22,163,74,0.4); }
  50%       { box-shadow: 0 0 8px rgba(22,163,74,0.7); }
}

.node-status-dot.dot-online { animation: dot-pulse 2.5s ease-in-out infinite; }

[data-theme="light"] .node-status-dot.dot-online {
  background: var(--success);
  box-shadow: 0 0 6px rgba(22,163,74,0.5);
  animation: dot-pulse-light 2.5s ease-in-out infinite;
}

[data-theme="light"] .node-status-dot.dot-degraded {
  box-shadow: 0 0 6px rgba(217,119,6,0.5);
}

.node-stats {
  display: flex;
  gap: 16px;
}

.node-stat { display: flex; flex-direction: column; gap: 1px; }

.node-stat-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.2px;
}

.node-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.node-card-bar {
  height: 3px;
  background: var(--border-strong);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.node-card-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
}

.bar-low  { background: linear-gradient(90deg, var(--success), #4ade80); }
.bar-mid  { background: linear-gradient(90deg, var(--warning), #fbbf24); }
.bar-high { background: linear-gradient(90deg, var(--danger), #ef4444); }

[data-theme="light"] .bar-low  { background: linear-gradient(90deg, var(--success), #22c55e); }
[data-theme="light"] .bar-mid  { background: linear-gradient(90deg, var(--warning), #f59e0b); }
[data-theme="light"] .bar-high { background: linear-gradient(90deg, var(--danger), #f87171); }

/* ─── Responsive ─── */

@media (max-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .locations-network { grid-template-columns: repeat(3, 1fr); }
  .metrics-grid { grid-template-columns: repeat(3, 1fr); }
  .admin-panels-grid { grid-template-columns: 1fr; }
  .panel-span-2 { grid-column: span 1; }
}

@media (max-width: 768px) {
  .topbar { padding: 10px 16px; margin: 8px auto; }

  .topbar-controls {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--surface-raised);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 12px;
    box-shadow: var(--shadow-lg);
    gap: 6px;
    backdrop-filter: blur(24px);
  }

  .topbar.is-open .topbar-controls { display: flex; }

  .topbar { position: sticky; flex-wrap: wrap; }

  .burger { display: flex; }

  .nav-primary { flex-direction: column; gap: 2px; align-items: stretch; }
  .nav-link { padding: 10px 12px; }

  .nav-actions { flex-direction: column; gap: 6px; }
  .nav-actions a { text-align: center; }

  .nav-user { flex-direction: column; align-items: flex-start; gap: 8px; padding: 8px 0 0; border-left: none; border-top: 1px solid var(--border); margin-top: 4px; }

  .hero { grid-template-columns: 1fr; gap: 32px; padding: 40px 0 32px; }
  .hero-copy h1 { font-size: 32px; }
  .hero-copy > p { font-size: 15px; }

  .feature-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .locations-network { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-detail-grid { grid-template-columns: 1fr; }
  .panel-span-2 { grid-column: span 1; }
  .dashboard-pricing-grid { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-panels-grid { grid-template-columns: 1fr; }
  .field-grid { grid-template-columns: 1fr; }
  .status-summary { grid-template-columns: 1fr; }
  .payment-method-grid { grid-template-columns: 1fr; }
  .stats-grid { gap: 16px; }

  .hero-panel { display: none; }

  .auth-card { padding: 24px 20px; }
  .section-header h2 { font-size: 22px; }
  .metric-number { font-size: 22px; }
  .plan-price { font-size: 28px; }
  .dashboard-header { flex-direction: column; gap: 12px; padding: 24px 0 16px; }
  .dashboard-header h1 { font-size: 22px; }
  .checkout-callout { flex-direction: column; }

  .footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .footer-links { gap: 14px; }
}

@media (max-width: 480px) {
  .shell { width: calc(100vw - 28px); }
  .hero-copy h1 { font-size: 26px; }
  .auth-card { border-radius: var(--radius-lg); }
  .bootstrap-monitor__card { padding: 20px 16px; }
  .locations-network { grid-template-columns: 1fr; }
}

/* ─── Blog ─── */

.blog-hero {
  padding-top: 32px;
  padding-bottom: 0;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 960px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .blog-grid { grid-template-columns: 1fr; }
}

.blog-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.blog-card-dot { opacity: 0.5; }

.blog-card-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 600;
}

.blog-card-title a {
  color: var(--text);
  text-decoration: none;
  background: none;
}

.blog-card-title a:hover {
  color: var(--primary);
}

.blog-card-desc {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.55;
  flex: 1;
}

.blog-card-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  font-size: 14px;
  margin-top: auto;
}

.blog-card-link:hover { text-decoration: underline; }

.blog-article {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 0 40px;
}

.blog-article-header {
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.blog-article-header h1 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.blog-article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.blog-article-lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}

.blog-article-body {
  font-size: 17px;
  line-height: 1.72;
  color: var(--text);
}

.blog-article-body h1,
.blog-article-body h2,
.blog-article-body h3 {
  margin: 36px 0 14px;
  font-weight: 700;
  line-height: 1.25;
}

.blog-article-body h1 { font-size: 28px; }
.blog-article-body h2 { font-size: 24px; padding-top: 8px; border-top: 1px solid var(--panel-border); padding-top: 28px; }
.blog-article-body h3 { font-size: 20px; }

.blog-article-body p {
  margin: 0 0 20px;
}

.blog-article-body ul,
.blog-article-body ol {
  margin: 0 0 22px;
  padding-left: 22px;
}

.blog-article-body li {
  margin-bottom: 8px;
  line-height: 1.65;
}

.blog-article-body a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.blog-article-body a:hover {
  opacity: 0.85;
}

.blog-article-body code {
  font-family: 'SFMono-Regular', ui-monospace, Menlo, Consolas, monospace;
  background: rgba(125, 125, 125, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.92em;
}

.blog-article-body pre {
  background: rgba(125, 125, 125, 0.12);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  overflow-x: auto;
  margin: 0 0 22px;
  line-height: 1.5;
  font-size: 14px;
}

.blog-article-body pre code {
  background: none;
  padding: 0;
  border-radius: 0;
}

.blog-article-body blockquote {
  border-left: 3px solid var(--primary);
  padding: 4px 16px;
  margin: 0 0 22px;
  color: var(--text-secondary);
  font-style: italic;
}

.blog-article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 22px;
  font-size: 15px;
}

.blog-article-body th,
.blog-article-body td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--panel-border);
  text-align: left;
}

.blog-article-body th {
  font-weight: 600;
  color: var(--text);
  background: rgba(125, 125, 125, 0.08);
}

.blog-article-body hr {
  border: 0;
  border-top: 1px solid var(--panel-border);
  margin: 32px 0;
}

.blog-article-cta {
  margin-top: 36px;
}

/* ─── CTA card (used on blog and landing pages) ─── */

.cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 32px;
}

.cta-card h2 {
  margin: 6px 0 8px;
  font-size: 22px;
  font-weight: 700;
}

.cta-card .primary-button {
  flex-shrink: 0;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .cta-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
  }
  .cta-card .primary-button { width: 100%; text-align: center; }
}

/* ─── Referral banner (dashboard) ─── */

.referral-banner {
  position: relative;
  overflow: hidden;
  padding: 28px 32px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(79, 70, 229, 0.22));
  border: 1px solid rgba(99, 102, 241, 0.28);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.referral-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.18), transparent 55%);
  pointer-events: none;
}

.referral-banner-copy {
  position: relative;
  max-width: 540px;
}

.referral-banner-copy h2 {
  margin: 6px 0 6px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
}

.referral-banner-copy p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

.referral-stats {
  display: flex;
  gap: 14px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  flex-wrap: wrap;
}

.referral-stat {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  min-width: 120px;
}

[data-theme="light"] .referral-stat {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(0, 0, 0, 0.08);
}

.referral-stat-value {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}

.referral-stat-label {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.referral-share-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.referral-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.referral-share-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

[data-theme="light"] .referral-share-btn {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .referral-share-btn:hover {
  background: rgba(0, 0, 0, 0.08);
}

@media (max-width: 720px) {
  .referral-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 22px 20px;
  }
}
