/* ═══════════════════════════════════════════════════════
   DELTRA DESIGN SYSTEM v2
   Premium dark theme · Glassmorphism · System fonts
   ═══════════════════════════════════════════════════════ */

:root {
  /* ── Palette ──────────────────────────────── */
  --bg-color: #0a0b0f;
  --bg-gradient: radial-gradient(ellipse 80% 50% at 50% -10%, #181b2e 0%, #0a0b0f 70%);

  --surface-color: rgba(255, 255, 255, 0.03);
  --surface-blur: blur(16px);
  --surface-border: rgba(255, 255, 255, 0.07);

  --card-bg: rgba(17, 19, 28, 0.65);
  --card-bg-solid: rgba(17, 19, 28, 0.85);
  --card-hover: rgba(24, 27, 40, 0.85);

  --text-primary: #f0f1f4;
  --text-secondary: #8b8d9a;
  --text-muted: #63657a;

  --primary-color: #4f8ff7;
  --primary-glow: rgba(79, 143, 247, 0.35);
  --primary-hover: #3a7ae8;
  --primary-subtle: rgba(79, 143, 247, 0.08);

  --success-color: #34d399;
  --success-bg: rgba(52, 211, 153, 0.1);
  --warning-color: #fbbf24;
  --warning-bg: rgba(251, 191, 36, 0.1);
  --danger-color: #f87171;
  --danger-bg: rgba(248, 113, 113, 0.08);

  /* ── Spacing ─────────────────────────────── */
  --sp-xs:  4px;
  --sp-sm:  8px;
  --sp-md:  16px;
  --sp-lg:  24px;
  --sp-xl:  32px;
  --sp-2xl: 48px;
  --sp-3xl: 64px;

  /* ── Radii ──────────────────────────────── */
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-full: 9999px;

  /* ── Shadows ─────────────────────────────── */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.25);
  --shadow-glow: 0 0 24px var(--primary-glow);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  background-color: var(--bg-color);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ═══ LAYOUT PRIMITIVES ══════════════════════════════ */

.container {
  max-width: 960px;
  margin: 0 auto;
  padding-left: var(--sp-lg);
  padding-right: var(--sp-lg);
}

main {
  flex: 1;
  width: 100%;
  padding-top: clamp(32px, 6vw, 72px);
  padding-bottom: clamp(48px, 7vw, 88px);
}

/* page-level vertical breathing room */
.page-section {
  margin-bottom: var(--sp-2xl);
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-xl);
  flex-wrap: wrap;
  gap: var(--sp-md);
}

.page-header h1,
.page-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Centered form/page layout — used on login, apply, profile_edit, device_new */
.centered-page {
  max-width: 480px;
  margin: 0 auto;
  padding-top: var(--sp-lg);
}

.centered-page-wide {
  max-width: 580px;
  margin: 0 auto;
}

.centered-header {
  text-align: center;
  margin-bottom: var(--sp-xl);
}

.centered-header .logo-mark {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  box-shadow: 0 0 20px rgba(255,255,255,0.06);
  margin-bottom: var(--sp-md);
}

.centered-header h1 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 var(--sp-sm);
}

.centered-header .subtitle {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0;
}

/* Section headings inside cards/forms */
.section-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: var(--sp-lg) 0 var(--sp-md);
  padding-bottom: var(--sp-sm);
  border-bottom: 1px solid var(--surface-border);
}

.section-label:first-child {
  margin-top: 0;
}

/* ═══ HEADER & NAVIGATION ═══════════════════════════ */

header {
  background: rgba(10, 11, 15, 0.75);
  backdrop-filter: var(--surface-blur);
  -webkit-backdrop-filter: var(--surface-blur);
  border-bottom: 1px solid var(--surface-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 56px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.brand-logo img {
  height: 26px;
  width: auto;
  border-radius: 5px;
}

.brand-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

nav {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

nav a {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

nav a:hover {
  color: var(--text-primary);
  background: var(--surface-color);
}

/* ═══ LINKS ══════════════════════════════════════════ */

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #7eb3fa;
}

/* ═══ CARDS ══════════════════════════════════════════ */

.card {
  background: var(--card-bg-solid);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-lg);
  margin-bottom: var(--sp-lg);
}

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

.card-title {
  margin: 0 0 var(--sp-md);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-md);
}

.card-header .card-title {
  margin: 0;
}

/* ═══ FORMS & INPUTS ════════════════════════════════ */

.form-group {
  margin-bottom: var(--sp-lg);
}

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

input, select, textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--surface-border);
  background-color: rgba(0, 0, 0, 0.25);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: all 0.2s ease;
  font-family: inherit;
  line-height: 1.5;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79, 143, 247, 0.12);
  background-color: rgba(0, 0, 0, 0.35);
}

input:disabled, select:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

.help-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.4;
}

.required-star {
  color: var(--danger-color);
}

/* Checkbox layout — side by side, not stacked */
.checkbox-group {
  display: flex;
  gap: var(--sp-sm);
  align-items: flex-start;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin-top: 2px;
  accent-color: var(--primary-color);
  cursor: pointer;
}

.checkbox-group label {
  margin-bottom: 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  cursor: pointer;
}

/* 2-column form grid */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 var(--sp-md);
}

/* ═══ BUTTONS ═══════════════════════════════════════ */

.btn, button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
}

.btn:hover, button[type="submit"]:hover {
  background-color: var(--primary-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
  color: #fff;
}

.btn:active, button[type="submit"]:active {
  transform: translateY(0);
}

/* ── Button variants ── */
.btn-ghost {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--surface-border);
  box-shadow: none;
}

.btn-ghost:hover {
  background-color: rgba(255,255,255,0.04);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: none;
  transform: none;
  color: var(--text-primary);
}

.btn-danger {
  background: transparent;
  color: var(--danger-color);
  border: 1px solid rgba(248, 113, 113, 0.2);
  box-shadow: none;
}

.btn-danger:hover {
  background-color: var(--danger-bg);
  border-color: rgba(248, 113, 113, 0.35);
  box-shadow: none;
  transform: none;
  color: var(--danger-color);
}

.btn-success {
  background-color: var(--success-color);
  color: #0a0b0f;
}

/* ── Button sizes ── */
.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 12px 28px;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
}

.btn-full {
  width: 100%;
}

/* ── Button row — consistent action grouping ── */
.btn-row {
  display: flex;
  gap: var(--sp-sm);
  flex-wrap: wrap;
}

.btn-row-stretch .btn,
.btn-row-stretch button {
  flex: 1;
  min-width: 0;
}

/* legacy compat */
.btn.ghost { background-color: transparent; color: var(--text-primary); border: 1px solid var(--surface-border); box-shadow: none; }
.btn.ghost:hover { background-color: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.15); box-shadow: none; transform: none; }
.btn.ghost.danger { color: var(--danger-color); border-color: rgba(248,113,113,0.2); }
.btn.ghost.danger:hover { background-color: var(--danger-bg); border-color: rgba(248,113,113,0.35); }
.btn.danger { background-color: transparent; color: var(--danger-color); border: 1px solid rgba(248,113,113,0.2); box-shadow: none; }
.btn.danger:hover { background-color: var(--danger-bg); box-shadow: none; transform: none; }
.btn.success { background-color: var(--success-color); color: #0a0b0f; box-shadow: none; }
.btn-sm, .btn.btn-sm { padding: 6px 12px; font-size: 0.8rem; }

/* ═══ ALERTS / FLASH MESSAGES ══════════════════════ */

.msg {
  background: var(--primary-subtle);
  border-left: 3px solid var(--primary-color);
  color: #bfdbfe;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: var(--sp-lg);
  font-size: 0.875rem;
  line-height: 1.5;
}

.msg.error {
  background: var(--danger-bg);
  border-left-color: var(--danger-color);
  color: #fca5a5;
}

.msg.success {
  background: var(--success-bg);
  border-left-color: var(--success-color);
  color: #86efac;
}

.msg.warning {
  background: var(--warning-bg);
  border-left-color: var(--warning-color);
  color: #fde68a;
}

/* ═══ BADGES ═══════════════════════════════════════ */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge.approved, .badge.active { background: var(--success-bg); color: var(--success-color); }
.badge.pending { background: var(--warning-bg); color: var(--warning-color); }
.badge.blocked { background: var(--danger-bg); color: var(--danger-color); }
.badge.access_removed, .badge.disabled { background: rgba(255,255,255,0.06); color: var(--text-secondary); }

.server-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 500;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--surface-border);
  color: var(--text-secondary);
}

/* ═══ GRIDS ════════════════════════════════════════ */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-lg);
}

/* ═══ DASHBOARD GRID ═══════════════════════════════ */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--sp-lg);
  margin-bottom: var(--sp-2xl);
}

.dashboard-card {
  background: var(--card-bg-solid);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-lg);
  display: flex;
  flex-direction: column;
  min-height: 190px;
}

.dashboard-card-header {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-md);
  color: var(--text-secondary);
}

.dashboard-card-icon {
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-sm);
}

.dashboard-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dashboard-card-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--sp-sm);
  letter-spacing: -0.02em;
}

.dashboard-card-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: var(--sp-md);
}

.dashboard-card-footer {
  margin-top: auto;
}

/* ═══ INFO LIST ══════════════════════════════════════ */

.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.info-list li {
  display: flex;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.9rem;
}

.info-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.info-list li:first-child {
  padding-top: 0;
}

.info-key {
  color: var(--text-secondary);
  min-width: 130px;
  font-size: 0.82rem;
  font-weight: 500;
  flex-shrink: 0;
}

/* ═══ HERO SECTION ═══════════════════════════════════ */

.hero {
  text-align: center;
  padding: var(--sp-3xl) var(--sp-lg) var(--sp-2xl);
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 300px;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  filter: blur(80px);
  z-index: -1;
  opacity: 0.6;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary-color);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--sp-lg);
  padding: 5px 14px;
  background: var(--primary-subtle);
  border: 1px solid rgba(79, 143, 247, 0.15);
  border-radius: var(--radius-full);
}

.hero-logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.06);
  margin-bottom: var(--sp-lg);
}

.hero-title {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 0 0 var(--sp-md);
  background: linear-gradient(135deg, #fff 0%, #9ca3af 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 440px;
  margin: 0 auto var(--sp-xl);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: var(--sp-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* ═══ SECTION HEADERS (landing) ════════════════════ */

.section-header {
  text-align: center;
  margin-bottom: var(--sp-xl);
}

.section-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 var(--sp-sm);
  letter-spacing: -0.02em;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

/* ═══ FEATURE CARDS ════════════════════════════════ */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-lg);
  margin-bottom: var(--sp-2xl);
}

.feature-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-xl) var(--sp-lg);
  text-align: center;
  transition: all 0.25s ease;
}

.feature-card:hover {
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.035);
  transform: translateY(-3px);
}

.feature-icon {
  font-size: 1.75rem;
  margin-bottom: var(--sp-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-md);
}

.feature-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0 0 6px;
  color: var(--text-primary);
}

.feature-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* ═══ STEPS (Как это работает) ════════════════════ */

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-lg);
  margin-bottom: var(--sp-2xl);
  counter-reset: step-counter;
}

.step-card {
  position: relative;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-xl) var(--sp-lg) var(--sp-lg);
  text-align: left;
  transition: all 0.25s ease;
  counter-increment: step-counter;
}

.step-card:hover {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(79, 143, 247, 0.2);
  transform: translateY(-3px);
}

.step-number {
  position: absolute;
  top: -10px;
  left: var(--sp-lg);
  width: 28px;
  height: 28px;
  background: var(--primary-color);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 8px rgba(79, 143, 247, 0.35);
}

.step-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin: var(--sp-sm) 0 6px;
  color: var(--text-primary);
}

.step-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* ═══ PRIVACY/CTA BANNER ══════════════════════════ */

.cta-banner {
  background: var(--card-bg-solid);
  border: 1px solid rgba(79, 143, 247, 0.15);
  border-radius: var(--radius-lg);
  padding: var(--sp-xl);
  text-align: center;
}

.cta-banner .icon {
  font-size: 1.5rem;
  margin-bottom: var(--sp-sm);
}

.cta-banner h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 var(--sp-sm);
}

.cta-banner p {
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.6;
  max-width: 440px;
  margin: 0 auto var(--sp-md);
}

/* ═══ DIVIDER ══════════════════════════════════════ */

.divider {
  border: none;
  border-top: 1px solid var(--surface-border);
  margin: var(--sp-2xl) 0;
}

/* ═══ LOGIN METHOD CARDS ═════════════════════════ */

.method-cards {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.method-card {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  padding: 14px 16px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  text-align: left;
  color: var(--text-primary);
}

.method-card:hover:not([disabled]) {
  border-color: var(--primary-color);
  background: var(--primary-subtle);
}

.method-card[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

.method-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-sm);
}

.method-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.method-title {
  font-weight: 600;
  font-size: 0.9rem;
}

.method-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.method-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ═══ DEVICE CARDS ══════════════════════════════════ */

.device-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--sp-lg);
}

.device-card {
  background: var(--card-bg-solid);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-lg);
  display: flex;
  flex-direction: column;
}

.device-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-sm);
}

.device-card-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.device-card-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: var(--sp-md);
}

.device-card-actions {
  display: flex;
  gap: var(--sp-sm);
  margin-top: auto;
}

.device-card-actions .btn,
.device-card-actions button {
  flex: 1;
  min-width: 0;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: var(--sp-2xl) var(--sp-lg);
  background: var(--card-bg-solid);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
}

.empty-state p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0 0 var(--sp-lg);
}

/* ═══ ADMIN CARDS ═══════════════════════════════════ */

.category-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--sp-lg);
  margin-bottom: var(--sp-xl);
}

.category-card {
  background: var(--card-bg-solid);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-lg);
  text-align: center;
  text-decoration: none;
  transition: all 0.2s ease;
  display: block;
  color: var(--text-primary);
}

.category-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
  color: var(--text-primary);
}

.category-count {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1;
}

.category-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ═══ TABLE ════════════════════════════════════════ */

.table-container {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--surface-border);
  background: var(--card-bg-solid);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

th {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(0,0,0,0.15);
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }

/* ═══ QR CONTAINER ═══════════════════════════════ */

.qr-container {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: var(--sp-lg);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin-bottom: var(--sp-lg);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

/* ═══ LINK BOX ═══════════════════════════════════ */

.link-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-all;
  white-space: pre-wrap;
  margin-bottom: var(--sp-md);
  line-height: 1.5;
}

/* ═══ WARNING BOX ════════════════════════════════ */

.warning-box {
  background: var(--warning-bg);
  border: 1px solid rgba(251, 191, 36, 0.15);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.82rem;
  color: #fde68a;
  line-height: 1.5;
}

/* ═══ FOOTER ═══════════════════════════════════════ */

.site-footer {
  margin-top: auto;
  padding: var(--sp-2xl) 0 var(--sp-xl);
  border-top: 1px solid var(--surface-border);
  background: rgba(10, 11, 15, 0.6);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-xl);
}

.footer-brand-block {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.footer-brand {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1rem;
}

.footer-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
  max-width: 280px;
  line-height: 1.5;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.82rem;
  text-decoration: none;
  transition: color 0.2s;
}

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

.footer-copy {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: var(--sp-xl);
  padding-top: var(--sp-md);
  border-top: 1px solid rgba(255,255,255,0.04);
}

/* ═══ UTILS / HELPERS ════════════════════════════ */

.text-center { text-align: center; }
.text-muted { color: var(--text-secondary); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--sp-sm); }
.mb-2 { margin-bottom: var(--sp-md); }
.mb-3 { margin-bottom: var(--sp-lg); }
.mb-4 { margin-bottom: var(--sp-xl); }
.mt-2 { margin-top: var(--sp-md); }
.mt-3 { margin-top: var(--sp-lg); }

.actions {
  display: flex;
  gap: var(--sp-sm);
  flex-wrap: wrap;
}

/* ═══ RESPONSIVE ═══════════════════════════════════ */

@media (max-width: 768px) {
  :root {
    --sp-2xl: 32px;
    --sp-3xl: 48px;
  }

  .container { padding: 0 var(--sp-md); }

  .header-inner {
    height: 52px;
    padding: 0 var(--sp-md);
  }

  nav { gap: 4px; }
  nav a { padding: 6px 8px; font-size: 0.8rem; }

  .hero { padding: var(--sp-2xl) var(--sp-md) var(--sp-xl); }
  .hero-title { font-size: 2rem; }
  .hero-sub { font-size: 0.95rem; }

  .grid-2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: 1fr; }
  .device-grid { grid-template-columns: 1fr; }
  .category-cards { grid-template-columns: repeat(2, 1fr); }

  .info-list li { flex-direction: column; align-items: flex-start; gap: 2px; }
  .info-key { min-width: auto; }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-brand-block { align-items: center; }
  .footer-desc { text-align: center; }
  .footer-links { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: var(--sp-md); }
}

@media (max-width: 480px) {
  .features-grid { grid-template-columns: 1fr; }
  .category-cards { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: 100%; max-width: 280px; }

  .device-card-actions {
    flex-direction: column;
  }
}

/* ═══ LANDING-SPECIFIC: no main container padding ════ */
.landing-main {
  padding: 0 0 var(--sp-3xl);
}
