/* NOXEL Cabinet — design system (v2 ember) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #0C0D10;
  --surface: #14161C;
  --surface-raised: #1A1D24;
  --border: rgba(244, 241, 234, 0.1);
  --border-subtle: rgba(244, 241, 234, 0.06);
  --text: #f4f1ea;
  --text-secondary: #9a968c;
  --text-tertiary: #6f6b62;
  --accent: #C45F32;
  --accent-2: #C9974A;
  --accent-soft: rgba(196, 95, 50, 0.18);
  --success: #3ee0a5;
  --success-soft: rgba(62, 224, 165, 0.12);
  --danger: #ff5c5c;
  --telegram: #2aabee;

  /* Type scale — 1.25 ratio, base 16px */
  --text-xs: 0.75rem;    /* 12 */
  --text-sm: 0.875rem;   /* 14 */
  --text-base: 1rem;     /* 16 */
  --text-lg: 1.125rem;   /* 18 */
  --text-xl: 1.25rem;    /* 20 */
  --text-2xl: 1.5rem;    /* 24 */

  /* Spacing — 4px grid */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, 'Cascadia Code', 'Segoe UI Mono', monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  max-width: 100%;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  max-width: 100%;
  overflow-x: clip;
  overscroll-behavior-x: none;
  -webkit-font-smoothing: antialiased;
}

a, button, .btn, input, select, textarea, label {
  touch-action: manipulation;
}

body.page-glow {
  background:
    radial-gradient(ellipse 90% 50% at 12% -8%, rgba(196, 95, 50, 0.16), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(201, 151, 74, 0.08), transparent 50%),
    linear-gradient(180deg, #0C0D10 0%, #101218 100%);
}

a { color: var(--accent); text-decoration: none; }

/* ── Layout ── */
.page-center {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}

.container {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-5) var(--space-10);
}

/* ── Typography ── */
.t-page-title {
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.3;
  margin-bottom: var(--space-5);
}

.t-card-title {
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.t-body {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.55;
}

.t-caption {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.t-label {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.3;
}

.t-price {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-top: var(--space-4);
}

.t-price span {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
}

/* ── Icons ── */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.icon svg { display: block; }

/* ── Header ── */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  min-height: 40px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: inherit;
  text-decoration: none;
}

.header-brand .brand-name {
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.user-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}

.user-bar .user-email {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-bar .btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}
.user-bar .btn-icon:hover {
  background: var(--surface-raised);
  color: var(--text);
}

/* ── Status bar ── */
.status-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-3) var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-5);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  align-self: start;
  margin-top: 6px;
}
.status-dot.inactive { background: var(--text-tertiary); }

.status-bar .meta { min-width: 0; }

.status-bar .value {
  font-size: var(--text-base);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: var(--space-1);
}

.status-bar .hint {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: var(--space-1);
}

.status-bar .status-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Steps ── */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.step {
  padding: var(--space-3) var(--space-2);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  text-align: center;
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  line-height: 1.35;
}

.step-num {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: 2px;
}

.step.active {
  color: var(--text);
  background: var(--accent-soft);
  border-color: rgba(99, 102, 241, 0.3);
}

.step.done { color: var(--success); }

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  margin-bottom: var(--space-3);
}

.card.featured {
  border-color: rgba(99, 102, 241, 0.45);
  background: linear-gradient(165deg, var(--accent-soft) 0%, var(--surface) 50%);
}

.card + .card { margin-top: var(--space-3); }

.card .sub { margin-top: var(--space-1); }

.card .btn { margin-top: var(--space-5); }

.card .btn + .btn { margin-top: var(--space-2); }

/* ── Tariff row ── */
.tariff-head {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}

.tariff-head .icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── Device hero (connect / download) ── */
.device-hero {
  text-align: center;
  padding: var(--space-2) 0 var(--space-4);
}

.device-hero .icon-lg {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.device-hero .icon-lg.icon-success {
  background: var(--success-soft);
  border-color: rgba(34, 197, 94, 0.25);
  color: var(--success);
}

.device-hero .t-card-title { margin-bottom: var(--space-2); }

.device-hero .sub { margin-top: 0; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  min-height: 48px;
  padding: 0 var(--space-5);
  border-radius: var(--radius-sm);
  border: none;
  font-family: inherit;
  font-size: var(--text-base);
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  color: #fff;
}
.btn:hover { opacity: 0.92; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #C8763A 55%, var(--accent-2));
  color: #140c08;
  box-shadow: 0 14px 34px rgba(196, 95, 50, 0.28);
}
.btn-success {
  background: linear-gradient(135deg, #1fbf84, var(--success));
  color: #062218;
}
.btn-secondary {
  background: var(--surface-raised);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-telegram { background: var(--telegram); }

.btn-sm {
  min-height: 40px;
  padding: 0 var(--space-4);
  font-size: var(--text-sm);
}

.btn-row {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.btn-row .btn { flex: 1; }

/* ── Link box ── */
.link-box {
  margin-top: var(--space-5);
  padding: var(--space-4);
  background: var(--bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.link-box .link-url {
  margin-top: var(--space-2);
  padding: var(--space-3);
  background: var(--surface-raised);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  line-height: 1.5;
  word-break: break-all;
  max-height: 72px;
  overflow-y: auto;
}

.link-box .link-url-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: none;
  outline: none;
  cursor: text;
  max-height: none;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
}

/* ── QR ── */
.qr-section { margin-top: var(--space-5); text-align: center; }
.qr-section .t-body { margin-bottom: var(--space-3); }

.qr-wrap {
  display: inline-block;
  padding: var(--space-3);
  background: #fff;
  border-radius: var(--radius-sm);
}
.qr-wrap img { display: block; width: 176px; height: 176px; }

/* ── Devices list ── */
.devices-list {
  margin-top: var(--space-6);
}

.devices-list .t-label {
  margin-bottom: var(--space-3);
  display: block;
}

.device-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
}

.device-item .name {
  flex: 1;
  font-weight: 500;
  color: var(--text);
}

.device-item .ip {
  font-family: var(--mono);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

/* ── Auth pages ── */
.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: max(var(--space-4), env(safe-area-inset-top)) var(--space-5) max(var(--space-6), env(safe-area-inset-bottom));
}
.auth-page.one-screen {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  justify-content: flex-start;
  padding: max(8px, env(safe-area-inset-top)) var(--space-4) max(12px, env(safe-area-inset-bottom));
  gap: 12px;
}
.auth-header {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  margin-bottom: var(--space-6);
  flex-shrink: 0;
}
.one-screen .auth-header {
  margin-bottom: 0;
}
.auth-back {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 1.1rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.auth-back:hover {
  background: var(--surface);
  color: var(--text);
}
.auth-header .auth-logo {
  justify-self: center;
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 6px 18px rgba(99,102,241,0.4));
}
.one-screen .auth-header .auth-logo {
  width: 36px;
  height: 36px;
}
.auth-header-spacer { width: 36px; }
.auth-hero {
  text-align: center;
  margin-bottom: var(--space-6);
  flex-shrink: 0;
}
.one-screen .auth-hero {
  margin-bottom: 0;
}
.auth-hero h1 {
  font-size: clamp(1.5rem, 6vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  background: linear-gradient(135deg, #fff 0%, #e0e7ff 50%, #c4b5fd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: var(--space-1);
}
.one-screen .auth-hero h1 {
  font-size: clamp(1.25rem, 5.5vw, 1.5rem);
}
.auth-hero p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.4;
  max-width: 300px;
  margin: 0 auto;
}
.one-screen .auth-hero p {
  font-size: var(--text-xs);
}
.auth-form {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.one-screen .auth-form {
  flex: 0 0 auto;
  gap: 8px;
}
.field {
  margin-bottom: var(--space-4);
}
.field label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-2);
}
.field input[type=email],
.field input[type=password],
.auth-form input[type=email],
.auth-form input[type=password] {
  width: 100%;
  height: 52px;
  padding: 0 var(--space-4);
  margin-bottom: 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(18,18,26,0.6);
  color: var(--text);
  font-family: inherit;
  font-size: var(--text-base);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.one-screen .auth-form input[type=email],
.one-screen .auth-form input[type=password] {
  height: 44px;
  font-size: 16px; /* Safari iOS: <16px → auto-zoom on focus */
  border-radius: var(--radius-sm);
}
.field input:focus,
.auth-form input:focus {
  outline: none;
  border-color: rgba(99,102,241,0.6);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.auth-actions {
  margin-top: 0;
  padding-top: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 0;
  flex-shrink: 0;
}
.one-screen .auth-actions {
  margin-top: 4px;
  padding-top: 0;
  gap: 0;
}
.auth-actions .btn-hero {
  margin-bottom: var(--space-4);
}
.one-screen .auth-actions .btn-hero {
  margin-bottom: 8px;
  min-height: 44px;
  font-size: var(--text-base);
  box-shadow: 0 6px 20px rgba(99,102,241,0.3);
}
.btn-compact {
  min-height: 42px !important;
  font-size: var(--text-sm) !important;
}
.divider-tight {
  margin: 6px 0 !important;
}
.auth-hint {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  text-align: center;
  margin-top: var(--space-3);
}
.auth-link-tight {
  margin-top: 12px !important;
  padding: 10px 12px;
  font-size: var(--text-sm) !important;
  font-weight: 600 !important;
  color: var(--accent-2) !important;
  background: rgba(196, 95, 50, 0.12);
  border: 1px solid rgba(201, 151, 74, 0.35);
  border-radius: 12px;
}
.one-screen .err {
  min-height: 0;
  margin-bottom: var(--space-1);
  font-size: var(--text-xs);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  padding: var(--space-8) var(--space-6);
}

.auth-logo {
  text-align: center;
  margin-bottom: var(--space-8);
}

.auth-logo .icon-lg { margin: 0 auto var(--space-4); }

.auth-logo h1 {
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.auth-logo p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: var(--space-2);
}

label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

input[type=email],
input[type=password] {
  width: 100%;
  height: 48px;
  padding: 0 var(--space-4);
  margin-bottom: var(--space-4);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: var(--text-base);
}
input:focus {
  outline: none;
  border-color: var(--accent);
}

.err {
  font-size: var(--text-sm);
  color: var(--danger);
  margin-bottom: var(--space-3);
  min-height: 20px;
}

.divider {
  text-align: center;
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin: var(--space-5) 0;
  position: relative;
}
.divider::before,
.divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border);
}
.divider::before { left: 0; }
.divider::after { right: 0; }

.auth-link {
  display: block;
  text-align: center;
  margin-top: var(--space-5);
  font-size: var(--text-sm);
  font-weight: 600;
  color: #c4b5fd;
  text-decoration: none;
  transition: color 0.15s ease;
}
.auth-link:hover {
  color: #e9d5ff;
}

.auth-soon {
  margin: 0;
  padding: 10px 16px;
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  user-select: none;
}

/* ── Landing (fastaccess redesign) ── */
.fa-page {
  --fa-bg: #0b0c0e;
  --fa-surface: rgba(255, 255, 255, 0.03);
  --fa-border: rgba(255, 255, 255, 0.08);
  --fa-text-primary: #f4f1ea;
  --fa-text-secondary: rgba(244, 241, 234, 0.55);
  --fa-accent-purple: #ff6b2c;
  --fa-accent-blue: #ffb020;
  --fa-accent-cyan: #3ee0a5;
  --fa-glass: rgba(255, 255, 255, 0.06);
  font-family: var(--font);
  background: var(--fa-bg);
  color: var(--fa-text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.fa-page ::-webkit-scrollbar { display: none; }

.fa-bg-blobs {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.fa-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  animation: faBlobFloat 12s ease-in-out infinite;
}
.fa-blob-1 {
  width: 300px;
  height: 300px;
  background: var(--fa-accent-purple);
  top: -80px;
  left: -60px;
}
.fa-blob-2 {
  width: 250px;
  height: 250px;
  background: var(--fa-accent-blue);
  bottom: 10%;
  right: -80px;
  animation-delay: -4s;
}
.fa-blob-3 {
  width: 200px;
  height: 200px;
  background: var(--fa-accent-cyan);
  top: 40%;
  left: 50%;
  transform: translateX(-50%);
  animation-delay: -8s;
  opacity: 0.2;
}
@keyframes faBlobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}
.fa-noise {
  position: fixed;
  inset: 0;
  z-index: 1;
  opacity: 0.03;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px;
}
.fa-app-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(48px, env(safe-area-inset-top)) 24px max(32px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}
.fa-logo-wrapper {
  position: relative;
  margin-bottom: 8px;
}
.fa-brand-name {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  color: var(--fa-text-primary);
}
.fa-logo-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, rgba(255,107,44,0.4) 0%, transparent 70%);
  border-radius: 50%;
  opacity: 0.85;
}
.fa-logo {
  width: 72px;
  height: 72px;
  background: linear-gradient(145deg, #ff6b2c 0%, #ff8a3d 55%, #ffb020 100%);
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 8px 32px rgba(255, 107, 44, 0.35), inset 0 1px 0 rgba(255,255,255,0.25);
}
.fa-logo svg {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}
.fa-logo svg path,
.fa-logo svg circle {
  stroke: #140c08;
  fill: none;
}
.fa-logo svg circle {
  fill: #140c08;
  stroke: none;
}
.fa-hero {
  text-align: center;
  margin-top: 32px;
  margin-bottom: 8px;
}
.fa-hero-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--fa-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  background: var(--fa-glass);
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid var(--fa-border);
  backdrop-filter: blur(10px);
}
.fa-hero-label::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 8px #22c55e;
  animation: faStatusBlink 2s ease-in-out infinite;
}
@keyframes faStatusBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.fa-hero-title {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.fa-gradient-text {
  background: linear-gradient(105deg, #fff 10%, #ffb020 55%, #ff6b2c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.fa-hero-subtitle {
  font-size: 15px;
  color: var(--fa-text-secondary);
  line-height: 1.5;
  max-width: 280px;
  margin: 0 auto;
}
.fa-social-showcase {
  display: flex;
  gap: 12px;
  margin: 28px 0;
  padding: 16px 20px;
  background: var(--fa-glass);
  border: 1px solid var(--fa-border);
  border-radius: 20px;
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}
.fa-social-showcase::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}
.fa-social-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.fa-social-icon:active { transform: scale(0.92); }
.fa-social-icon.fa-instagram { background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.fa-social-icon.fa-youtube { background: #ff0000; }
.fa-social-icon.fa-telegram { background: #0088cc; }
.fa-social-icon.fa-whatsapp { background: #25d366; }
.fa-social-icon svg { width: 24px; height: 24px; fill: white; }
.fa-platforms {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  margin-bottom: 32px;
}
.fa-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--fa-surface);
  border: 1px solid var(--fa-border);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--fa-text-secondary);
}
.fa-chip.fa-active {
  background: rgba(196, 95, 50, 0.15);
  border-color: rgba(201, 151, 74, 0.35);
  color: var(--accent-2);
}
.fa-chip svg { width: 14px; height: 14px; opacity: 0.7; }
.fa-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
}
.fa-btn {
  width: 100%;
  padding: 16px 24px;
  border-radius: 16px;
  border: none;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  -webkit-user-select: none;
  text-decoration: none;
}
.fa-btn:active { transform: scale(0.97); }
.fa-btn-primary {
  background: linear-gradient(135deg, #ff6b2c 0%, #ff8a3d 60%, #ffb020 100%);
  color: #140c08;
  box-shadow: 0 4px 20px rgba(255, 107, 44, 0.35), inset 0 1px 0 rgba(255,255,255,0.2);
}
.fa-btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}
.fa-btn-primary:active::after { transform: translateX(100%); }
.fa-btn-secondary {
  background: var(--fa-surface);
  color: var(--fa-text-primary);
  border: 1px solid var(--fa-border);
  backdrop-filter: blur(10px);
}
.fa-btn-telegram {
  background: linear-gradient(135deg, #0088cc 0%, #00a8e8 100%);
  color: white;
  box-shadow: 0 4px 20px rgba(0, 136, 204, 0.3);
}
.fa-btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.fa-home-indicator {
  width: 120px;
  height: 5px;
  background: rgba(255,255,255,0.15);
  border-radius: 100px;
  margin: 20px auto 0;
}
.fa-fade-up {
  opacity: 0;
  transform: translateY(20px);
  animation: faFadeUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.fa-delay-1 { animation-delay: 0.1s; }
.fa-delay-2 { animation-delay: 0.2s; }
.fa-delay-3 { animation-delay: 0.3s; }
.fa-delay-4 { animation-delay: 0.4s; }
.fa-delay-5 { animation-delay: 0.5s; }
.fa-delay-6 { animation-delay: 0.6s; }
@keyframes faFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ── Landing (legacy) ── */
.landing {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  padding: max(var(--space-6), env(safe-area-inset-top)) var(--space-5) max(var(--space-8), env(safe-area-inset-bottom));
  text-align: center;
  position: relative;
  overflow: hidden;
  max-width: 440px;
  margin: 0 auto;
}
.landing.one-screen {
  height: 100dvh;
  max-height: 100dvh;
  justify-content: space-between;
  padding: max(12px, env(safe-area-inset-top)) var(--space-4) max(14px, env(safe-area-inset-bottom));
}
.landing::before {
  content: '';
  position: absolute;
  width: 120%;
  height: 55%;
  top: -8%;
  left: 50%;
  transform: translateX(-50%);
  background:
    radial-gradient(ellipse at 30% 20%, rgba(225,48,108,0.14), transparent 55%),
    radial-gradient(ellipse at 70% 15%, rgba(99,102,241,0.2), transparent 50%),
    radial-gradient(ellipse at 50% 40%, rgba(37,211,102,0.08), transparent 60%);
  pointer-events: none;
}
.landing-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-8);
  flex-shrink: 0;
}
.one-screen.landing .landing-top {
  margin-bottom: 0;
}
.landing-logo {
  width: 56px;
  height: 56px;
  filter: drop-shadow(0 8px 24px rgba(99,102,241,0.45));
}
.one-screen .landing-logo {
  width: 48px;
  height: 48px;
}
.landing-hero {
  position: relative;
  margin-bottom: var(--space-8);
  flex-shrink: 0;
}
.one-screen .landing-hero {
  margin-bottom: 0;
}
.hero-eyebrow {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
  margin-bottom: var(--space-2);
}
.one-screen .hero-eyebrow {
  font-size: var(--text-xs);
  margin-bottom: var(--space-1);
}
.hero-title {
  font-size: clamp(1.65rem, 7vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  background: linear-gradient(135deg, #fff 0%, #e0e7ff 45%, #c4b5fd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: var(--space-3);
}
.one-screen .hero-title {
  font-size: clamp(1.35rem, 6vw, 1.65rem);
  margin-bottom: 0;
  line-height: 1.2;
}
.hero-sub {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 300px;
  margin: 0 auto;
}
.device-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  flex-shrink: 0;
}
.one-screen .device-strip {
  margin-bottom: 0;
  gap: 6px;
}
.device-strip span {
  font-size: 11px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 99px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.one-screen .device-strip span {
  font-size: 10px;
  padding: 4px 10px;
}
.device-strip span.muted {
  opacity: 0.55;
  border-style: dashed;
}
.landing .actions {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex-shrink: 0;
}
.one-screen .actions {
  gap: var(--space-2);
}
.btn-hero {
  min-height: 54px;
  font-size: var(--text-lg);
  font-weight: 600;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 28px rgba(99,102,241,0.35);
}
.one-screen .btn-hero {
  min-height: 46px;
  font-size: var(--text-base);
}
@media (min-width: 480px) {
  .landing:not(.one-screen) {
    justify-content: center;
    padding-top: var(--space-10);
  }
  .landing:not(.one-screen) .landing-top { margin-bottom: var(--space-10); }
}
@media (max-height: 640px) {
  .one-screen .auth-hero h1,
  .one-screen .hero-title { font-size: 1.2rem; }
  .one-screen .auth-form input { height: 40px; }
  .one-screen .btn-hero { min-height: 42px; }
  .one-screen .btn-compact { min-height: 38px !important; }
}

/* ── Site footer (legal + support) ── */
.site-footer {
  flex-shrink: 0;
  width: 100%;
  padding: 12px 16px max(16px, env(safe-area-inset-bottom));
  text-align: center;
}
.one-screen .site-footer {
  margin-top: auto;
  padding-top: 8px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
}
.dash-page .site-footer {
  padding-top: 6px;
  padding-bottom: 0;
}
.site-footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 10px;
  font-size: 11px;
  line-height: 1.4;
}
.site-footer-nav a {
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.15s ease;
}
.site-footer-nav a:hover {
  color: #ffb020;
  text-decoration: underline;
}
.site-footer-sep {
  color: rgba(255, 255, 255, 0.2);
  user-select: none;
}
.fa-app-container .site-footer {
  padding-left: 0;
  padding-right: 0;
  margin-top: 12px;
}

/* ── Legal document pages ── */
.legal-page {
  min-height: 100dvh;
}
.legal-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
.legal-top {
  margin-bottom: 20px;
  flex-shrink: 0;
}
.legal-back {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
}
.legal-back:hover {
  color: #ffb020;
}
.legal-doc {
  flex: 1;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px 20px;
  margin-bottom: 16px;
}
.legal-doc h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.legal-meta {
  font-size: 12px;
  color: var(--text-tertiary);
  margin: 0 0 20px;
}
.legal-prose h2 {
  font-size: 1rem;
  font-weight: 600;
  margin: 20px 0 8px;
  color: #e2e8f0;
}
.legal-prose p,
.legal-prose li {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0 0 10px;
}
.legal-prose ul {
  margin: 0 0 12px;
  padding-left: 20px;
}
.legal-prose a {
  color: #ffb020;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Utilities ── */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }

#toast {
  position: fixed;
  top: var(--space-4);
  right: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: var(--text-sm);
  z-index: 10000;
  max-width: calc(100vw - 32px);
}

#loader {
  position: fixed;
  inset: 0;
  background: rgba(9, 9, 15, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
#loader.on { display: flex; }

.spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Auth split layout ── */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .auth-shell { grid-template-columns: 1fr 1fr; }
}
.auth-side {
  display: none;
  padding: var(--space-10);
  background: linear-gradient(145deg, rgba(99,102,241,0.18) 0%, rgba(139,92,246,0.08) 50%, transparent 100%);
  border-right: 1px solid var(--border-subtle);
  flex-direction: column;
  justify-content: center;
}
@media (min-width: 900px) {
  .auth-side { display: flex; }
}
.auth-side h2 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  max-width: 360px;
}
.auth-side p {
  margin-top: var(--space-4);
  color: var(--text-secondary);
  max-width: 340px;
  font-size: var(--text-base);
}
.auth-side .features {
  margin-top: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.auth-side .feat {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.auth-side .feat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}
.auth-card.glass {
  background: rgba(18, 18, 26, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 48px rgba(0,0,0,0.35);
}

/* ── Device picker ── */
.device-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.device-tile {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-3);
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
  text-align: left;
  font-family: inherit;
  color: var(--text);
  width: 100%;
}
.device-tile:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--surface-raised);
  transform: translateY(-2px);
}
.device-tile.selected {
  border-color: rgba(255, 176, 32, 0.55);
  background: linear-gradient(180deg, rgba(255, 107, 44, 0.12), rgba(255, 255, 255, 0.03));
  box-shadow: inset 0 0 0 1px rgba(255, 176, 32, 0.15);
}
.device-tile:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.device-tile .tile-name {
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: -0.02em;
  display: block;
}
.device-tile .tile-desc {
  display: block;
  margin-top: 4px;
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.35;
}
.device-tile .tile-badge {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(255,255,255,0.08);
  color: var(--text-tertiary);
}
.device-tile .icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-2);
  flex-shrink: 0;
}
.device-tile[data-platform="android"] .icon-wrap { color: #a4c639; }
.device-tile[data-platform="ios"] .icon-wrap { color: #5ac8fa; }
.device-tile[data-platform="windows"] .icon-wrap { color: #38bdf8; }
.device-tile .tile-meta { flex: 1; min-width: 0; }
.device-tile .tile-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #140c08;
}
.device-tile.selected .tile-check {
  background: var(--accent);
  border-color: var(--accent);
}
.device-tile .tile-check svg { width: 12px; height: 12px; opacity: 0; }
.device-tile.selected .tile-check svg { opacity: 1; }

/* ── Home dashboard ── */
.home-hero {
  text-align: center;
  padding: var(--space-2) 0 var(--space-6);
}
.conn-ring {
  width: 88px;
  height: 88px;
  margin: 0 auto var(--space-5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--success-soft);
  border: 2px solid rgba(34,197,94,0.35);
  color: var(--success);
  position: relative;
}
.conn-ring::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(34,197,94,0.15);
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.15); opacity: 0; }
}
.conn-status {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--success);
  margin-bottom: var(--space-2);
}
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin: var(--space-5) 0;
}
.stat-card {
  padding: var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border-subtle);
  text-align: left;
}
.stat-card.full { grid-column: 1 / -1; }
.stat-card .stat-label {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.stat-card .stat-value {
  margin-top: var(--space-1);
  font-size: var(--text-base);
  font-weight: 600;
  font-family: var(--mono);
  color: var(--text);
}
.stat-card .stat-value.accent { color: var(--accent); font-family: var(--font); }
.speed-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: var(--space-2);
}
.speed-item {
  flex: 1;
  text-align: center;
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
}
.speed-item .dir {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}
.speed-item .val {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-top: 2px;
  font-family: var(--mono);
}
.btn-connect {
  min-height: 56px;
  font-size: var(--text-lg);
  font-weight: 700;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 28px rgba(196, 95, 50, 0.28);
}
.connect-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: var(--space-4);
}
.btn-copy-link {
  min-height: 48px;
  font-size: var(--text-base);
  font-weight: 600;
  border-radius: var(--radius-md);
  background: rgba(18, 20, 26, 0.72);
  border: 1px solid rgba(201, 151, 74, 0.28);
  color: var(--text);
}
.btn-copy-link:hover {
  border-color: rgba(201, 151, 74, 0.55);
  color: #fff;
}
.download-hint {
  margin-top: var(--space-4);
  text-align: left;
}
.download-hint > a:not(.setup-action):not(.btn-setup) {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.download-hint > a:not(.setup-action):not(.btn-setup):hover { color: var(--accent); }

.container.wide { max-width: 480px; }

/* ── Dashboard scroll (mobile) ── */
html.dash-scroll,
body.dash-scroll {
  height: auto !important;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
body.dash-scroll #loader {
  position: fixed;
}
body.dash-scroll .dash-page,
body.dash-scroll .dash-page.one-screen {
  min-height: 100dvh;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  display: flex;
  flex-direction: column;
  padding: max(12px, env(safe-area-inset-top)) var(--space-4) max(20px, env(safe-area-inset-bottom));
  background:
    radial-gradient(ellipse 90% 50% at 12% -8%, rgba(196, 95, 50, 0.14), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(201, 151, 74, 0.07), transparent 50%);
}
body.dash-scroll .dash-body,
body.dash-scroll .dash-body.dash-body-home,
body.dash-scroll .dash-body.dash-body-scroll {
  overflow: visible !important;
  flex: 1 1 auto;
  min-height: auto;
}

/* ── Dashboard one-screen (legacy class; scroll preferred) ── */
.dash-page.one-screen {
  min-height: 100dvh;
  height: auto;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  display: flex;
  flex-direction: column;
  padding: max(12px, env(safe-area-inset-top)) var(--space-4) max(14px, env(safe-area-inset-bottom));
  background:
    radial-gradient(ellipse 90% 50% at 12% -8%, rgba(196, 95, 50, 0.14), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(201, 151, 74, 0.07), transparent 50%);
}
.dash-header {
  margin-bottom: var(--space-3) !important;
  min-height: 48px !important;
  padding: 4px 0 8px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.dash-header .header-brand {
  gap: 10px;
}
.dash-brand-name {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 10%, var(--accent-2) 55%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.dash-header .user-email {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  max-width: 160px;
}
.dash-header .btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.dash-steps {
  margin-bottom: var(--space-3) !important;
  flex-shrink: 0;
  gap: 8px;
  position: relative;
  z-index: 2;
}
.dash-steps .step {
  padding: 12px 8px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.25;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}
.dash-steps .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 0;
  margin-right: 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  vertical-align: middle;
}
.dash-steps .step.active {
  color: #fff;
  font-weight: 700;
  background: linear-gradient(145deg, rgba(196, 95, 50, 0.28) 0%, rgba(201, 151, 74, 0.12) 100%);
  border-color: rgba(201, 151, 74, 0.45);
  box-shadow: 0 4px 16px rgba(196, 95, 50, 0.2);
}
.dash-steps .step.active .step-num {
  background: rgba(201, 151, 74, 0.35);
  color: #fff;
}
.dash-steps .step.done {
  color: var(--accent-2);
  border-color: rgba(201, 151, 74, 0.28);
}
.dash-steps .step.done .step-num {
  background: rgba(196, 95, 50, 0.22);
  color: var(--accent-2);
}
.dash-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: visible;
  padding: 0 0 8px;
}
.dash-body.dash-body-scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.dash-body.dash-body-scroll::-webkit-scrollbar {
  width: 4px;
}
.dash-body.dash-body-center {
  justify-content: center;
}
.dash-body.dash-body-home {
  justify-content: flex-start;
  padding-top: 4px;
  overflow: visible;
  flex: 1 1 auto;
}
.dash-screen-tariff .dash-title {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.2rem;
}
.tariffs-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
.tariff-card-item {
  border: 1px solid rgba(201, 151, 74, 0.22);
  border-radius: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
}
.tariff-card-item.featured {
  border-color: rgba(201, 151, 74, 0.5);
  background: linear-gradient(145deg, rgba(196, 95, 50, 0.18) 0%, rgba(201, 151, 74, 0.08) 100%);
}
.tariff-card-item.tariff-card-family {
  border-color: rgba(196, 95, 50, 0.55);
  box-shadow: inset 0 0 0 1px rgba(201, 151, 74, 0.28);
  background: linear-gradient(160deg, rgba(196, 95, 50, 0.14) 0%, var(--ember-card, rgba(255, 255, 255, 0.04)) 55%);
}
.tariff-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.tariff-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  line-height: 1.2;
}
.tariff-badge-family {
  color: #fff;
  background: rgba(196, 95, 50, 0.85);
  border: 1px solid rgba(201, 151, 74, 0.5);
}
.tariff-perks {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
}
.tariff-perks li::before {
  content: "• ";
  color: var(--accent-2, #C9974A);
}
.tariff-price-note {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 2px;
}
.tariff-card-item .tariff-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent-2);
  margin: 8px 0 10px;
}
.tariff-card-item .tariff-meta {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 10px;
}
.tariff-empty {
  padding: 16px;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
}
#userStatus .progress-bar {
  height: 6px;
  background: #1e293b;
  border-radius: 3px;
  margin-top: 8px;
  overflow: hidden;
}
#userStatus #trafficProgress {
  height: 100%;
  width: 0;
  background: #22c55e;
  border-radius: 3px;
  transition: width 0.3s ease;
}
.dash-screen {
  flex: 0 0 auto;
  width: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.dash-screen-home {
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
}
.dash-screen-home .dash-card {
  flex: 0 0 auto;
}
.dash-screen-home #userStatus {
  margin-top: 0 !important;
}
.dash-screen.hidden { display: none !important; }
.dash-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fafafa;
  margin-bottom: 12px;
  flex-shrink: 0;
}
.device-grid-compact {
  flex: 0 0 auto;
  margin-bottom: 12px;
  gap: 10px;
  align-content: start;
  grid-auto-rows: auto;
  grid-template-columns: 1fr;
}
.device-grid-compact .device-tile {
  padding: 16px;
  gap: 14px;
  min-height: 0;
  height: auto;
  align-self: start;
  flex-direction: row;
  text-align: left;
  border-color: rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
}
.device-grid-compact .device-tile .tile-name {
  font-size: 15px;
  font-weight: 700;
  color: #fafafa;
}
.device-grid-compact .device-tile.selected {
  border-color: rgba(255, 176, 32, 0.55);
  background: linear-gradient(180deg, rgba(255, 107, 44, 0.12), rgba(255, 255, 255, 0.03));
  box-shadow: inset 0 0 0 1px rgba(255, 176, 32, 0.15);
}
.device-grid-compact .device-tile.selected .tile-name {
  color: #fff;
}
.device-grid-compact .icon-wrap {
  width: 48px;
  height: 48px;
  color: var(--accent-2);
}
.device-grid-compact .device-tile .tile-badge {
  font-size: 9px;
  padding: 3px 7px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
}

/* Setup strip — premium install CTA (NOXEL) */
.download-hint {
  margin-top: 2px;
  text-align: left;
}
.setup-card,
.setup-row {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr;
  grid-template-areas:
    "mark copy"
    "action action";
  align-items: center;
  column-gap: 12px;
  row-gap: 14px;
  padding: 15px 15px 15px 16px;
  border-radius: 14px;
  border: 1px solid rgba(201, 151, 74, 0.2);
  background:
    linear-gradient(125deg, rgba(196, 95, 50, 0.13) 0%, rgba(18, 20, 26, 0.72) 38%, #111318 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 10px 24px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}
.setup-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}
.setup-mark {
  grid-area: mark;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #F0D4A0;
  background: rgba(196, 95, 50, 0.2);
  border: 1px solid rgba(201, 151, 74, 0.26);
}
.setup-mark svg {
  width: 20px;
  height: 20px;
  display: block;
}
.setup-copy {
  grid-area: copy;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}
.setup-kicker,
.setup-badge {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent-2);
  line-height: 1.2;
  background: none;
  padding: 0;
  margin: 0;
  border-radius: 0;
}
.setup-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  letter-spacing: -0.02em;
}
.setup-action,
.btn-setup {
  grid-area: action;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  border: 0;
  background: linear-gradient(135deg, var(--accent) 0%, #C8763A 50%, var(--accent-2) 100%);
  color: #120e0a !important;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(196, 95, 50, 0.28);
  transition: transform 0.15s var(--ease), filter 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.setup-action:hover,
.btn-setup:hover {
  filter: brightness(1.04);
  color: #120e0a !important;
  box-shadow: 0 10px 26px rgba(196, 95, 50, 0.34);
}
.setup-action:active,
.btn-setup:active {
  transform: translateY(1px);
}

@media (min-width: 520px) {
  .setup-card,
  .setup-row {
    grid-template-columns: 48px 1fr auto;
    grid-template-areas: "mark copy action";
    column-gap: 14px;
    row-gap: 0;
    padding: 16px 16px 16px 18px;
  }
  .setup-mark {
    width: 48px;
    height: 48px;
    border-radius: 13px;
  }
  .setup-mark svg {
    width: 22px;
    height: 22px;
  }
  .setup-title {
    font-size: 15px;
    max-width: 28ch;
  }
  .setup-action,
  .btn-setup {
    width: auto;
    min-width: 128px;
    min-height: 44px;
    padding: 0 22px;
  }
}


.home-facts {
  margin: 0 0 4px;
  display: grid;
  grid-template-columns: 1fr 1fr 1.15fr;
  gap: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.home-facts .fact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-radius: 10px;
  background: #0E1014;
  border: 1px solid rgba(244, 241, 234, 0.1);
}
.home-facts .fact-traffic {
  gap: 6px;
}
.home-facts .f-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(244, 241, 234, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.home-facts .f-val {
  font-size: 14px;
  font-weight: 650;
  color: var(--text);
  line-height: 1.25;
  word-break: break-word;
}
.home-facts .bar {
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 2px;
}
.home-facts .bar-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
@media (max-width: 420px) {
  .home-facts {
    grid-template-columns: 1fr 1fr;
  }
  .home-facts .fact-traffic {
    grid-column: 1 / -1;
  }
}
/* legacy howto removed from UI */
.setup-panel,
.howto { display: none !important; }

.link-box {
  display: flex;
  gap: 8px;
  margin: 10px 0 0;
}
.link-box input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  background: #0e1014;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-family: var(--mono);
}
.setup-actions {
  display: grid;
  gap: 8px;
}
#deviceScreen .btn-hero {
  flex-shrink: 0;
  margin-top: 4px;
  min-height: 50px;
  font-size: 16px;
  font-weight: 600;
}
#deviceScreen .btn-hero:disabled {
  opacity: 0.45;
}
.card-compact {
  padding: var(--space-4) !important;
  margin-bottom: var(--space-2) !important;
}
.card-compact .btn { margin-top: var(--space-3) !important; }
.tariff-head-compact .icon-wrap {
  width: 36px !important;
  height: 36px !important;
}
.tariff-head-compact .t-card-title {
  font-size: var(--text-sm) !important;
}
.tariff-head-compact .sub {
  font-size: 11px !important;
  margin-top: 0 !important;
}
.t-price-compact {
  font-size: var(--text-xl) !important;
  margin-top: var(--space-2) !important;
}

/* Home dashboard compact — warm NOXEL palette (same as landing) */
.dash-card {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 16px;
  background: var(--surface);
  border: 1px solid rgba(244, 241, 234, 0.1);
  border-radius: 14px;
  box-shadow: none;
}
.dash-status {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 0;
  flex-shrink: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(244, 241, 234, 0.08);
}
.status-pulse {
  width: 10px;
  height: 10px;
  margin-top: 8px;
  border-radius: 50%;
  background: rgba(244, 241, 234, 0.35);
  box-shadow: none;
  animation: none;
  flex-shrink: 0;
}
.dash-card.is-ok .status-pulse,
.dash-card[data-state="connected"] .status-pulse {
  background: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(201, 151, 74, 0.18);
}
.dash-card.is-warn .status-pulse,
.dash-card[data-state="error"] .status-pulse {
  background: var(--accent);
}
@keyframes statusPulse {
  0% { box-shadow: 0 0 0 0 rgba(196, 95, 50, 0.35); }
  70% { box-shadow: 0 0 0 8px rgba(196, 95, 50, 0); }
  100% { box-shadow: 0 0 0 0 rgba(196, 95, 50, 0); }
}
.dash-status-title {
  font-size: 1.25rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.15;
}
.dash-status-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.35;
  font-weight: 500;
}
.dash-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 0;
  flex-shrink: 0;
}
.metric {
  padding: 12px;
  border-radius: 10px;
  background: #0E1014;
  border: 1px solid rgba(244, 241, 234, 0.1);
}
.metric-node {
  background: #0E1014;
  border-color: rgba(244, 241, 234, 0.1);
}
.metric-wide { grid-column: 1 / -1; }
.metric-speed {
  display: flex;
  gap: 8px;
  padding: 0;
  background: transparent;
  border: none;
}
.speed-pill {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  padding: 12px;
  border-radius: 10px;
  background: #0E1014;
  border: 1px solid rgba(244, 241, 234, 0.1);
}
.m-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(244, 241, 234, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 4px;
}
.metric-speed .m-label {
  display: block;
  margin-bottom: 4px;
}
.m-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fafafa;
  line-height: 1.3;
  word-break: break-word;
}
.m-val.mono { font-family: var(--mono); font-size: 1rem; }
.metric-wide .m-val {
  font-size: 1.1rem;
  color: #d8b4fe;
  font-weight: 800;
}
.metric-speed .m-val {
  font-size: 1.05rem;
}
.btn-connect {
  min-height: 54px;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(34, 197, 94, 0.28);
  margin-top: 4px;
  flex-shrink: 0;
}
.dash-card .download-hint {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
  text-align: left;
}
.dash-card .download-hint > a:not(.setup-action):not(.btn-setup) {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-2);
}
.dash-hint-text {
  margin: 8px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
  line-height: 1.4;
}
@media (max-height: 680px) {
  .dash-status-title { font-size: var(--text-base); }
  .dash-metrics { gap: 4px; margin-bottom: var(--space-2); }
  .metric { padding: 6px 8px; }
  .btn-connect { min-height: 44px; font-size: var(--text-sm); }
  .dash-card { padding: var(--space-3); }
}
@media (max-width: 480px) {
  .dash-page.one-screen {
    padding-left: 12px;
    padding-right: 12px;
  }
  .dash-steps .step {
    padding: 10px 4px;
    font-size: 11px;
  }
  .dash-steps .step-num {
    width: 18px;
    height: 18px;
    font-size: 10px;
    margin-right: 4px;
  }
  .dash-body.dash-body-home {
    padding-top: 2px;
  }
  .dash-status {
    margin-bottom: 12px;
    padding-bottom: 10px;
  }
  .dash-status-title {
    font-size: 1.05rem;
  }
  .dash-status-sub {
    font-size: 12px;
  }
  .dash-card {
    padding: 14px 12px;
  }
  .dash-metrics {
    gap: 8px;
    margin-bottom: 12px;
  }
  .metric {
    padding: 10px;
  }
  .btn-connect {
    min-height: 48px;
    font-size: 0.95rem;
  }
  .dash-header .user-email {
    max-width: 120px;
    font-size: 12px;
  }
}

/* ══ Home v3 — glow-орб + ember-карточка (главный экран кабинета) ══ */
:root {
  --pill-bg: linear-gradient(180deg, #262220 0%, #171514 100%);
  --pill-line: rgba(255, 255, 255, 0.07);
  --ember-card: linear-gradient(160deg, #D9A05B 0%, #C4813C 100%);
  --ember-ink: #2A1806;
  --sand-card: linear-gradient(160deg, #EAE0D1 0%, #DBCDB7 100%);
  --sand-ink: #1F1810;
}

/* Шапка и шаги — тёмные pill-и */
.dash-header .header-brand {
  padding: 6px 14px 6px 7px;
  border-radius: 999px;
  background: var(--pill-bg);
  border: 1px solid var(--pill-line);
}
.dash-header .user-email {
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--pill-bg);
  border: 1px solid var(--pill-line);
  font-size: 12px;
}
.dash-header .btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--pill-bg);
  border: 1px solid var(--pill-line);
}
.dash-steps .step {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--pill-bg);
  border: 1px solid var(--pill-line);
  font-size: 12.5px;
  color: var(--text-tertiary);
}
.dash-steps .step-num {
  width: 18px;
  height: 18px;
  margin-right: 0;
  border-radius: 50%;
  font-size: 10.5px;
}
.dash-steps .step.done { color: var(--accent-2); }
.dash-steps button.step {
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.dash-steps button.step:hover:not(.active) {
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--text-secondary);
}
.dash-steps .step.active {
  background: var(--ember-card);
  border-color: transparent;
  color: #231405;
  box-shadow: 0 8px 20px rgba(196, 95, 50, 0.22);
}
.dash-steps .step.active .step-num { background: rgba(35, 20, 5, 0.18); color: #231405; }

/* Карточка соединения */
.dash-screen-home { gap: 12px; }
#connCard.dash-card {
  gap: 18px;
  padding: 20px 18px;
  border-radius: 24px;
  background: linear-gradient(175deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.012) 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.conn-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 4px;
}
#homeScreen .conn-hero-web {
  padding-top: 0;
  gap: 0;
}
#homeScreen .conn-hero-web .conn-since {
  margin-bottom: 12px;
  min-height: 0;
  border-radius: 16px;
  max-width: 280px;
  width: 100%;
}
#homeScreen .conn-hero-web .conn-chip {
  margin-top: 0;
}
.orb-wrap {
  position: relative;
  width: 168px;
  height: 168px;
  display: grid;
  place-items: center;
}
.orb-halo {
  position: absolute;
  inset: -30px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.2;
  background: radial-gradient(circle,
    rgba(255, 255, 255, 0.85) 0%,
    rgba(240, 186, 122, 0.34) 28%,
    rgba(196, 95, 50, 0.14) 54%,
    transparent 74%);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.orb {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 108px;
  height: 108px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--text-secondary);
  background: radial-gradient(circle at 50% 34%, #3A322C 0%, #221D19 62%, #14100E 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 20px 44px rgba(0, 0, 0, 0.5);
  transition: background 0.45s var(--ease), color 0.35s var(--ease), box-shadow 0.45s var(--ease), transform 0.18s var(--ease);
}
.orb:hover { filter: brightness(1.06); }
.orb:active { transform: scale(0.97); }
.orb-ico { width: 42px; height: 42px; }
.orb-ico-warn { display: none; }
[data-conn="connected"] .orb {
  color: #2A1806;
  background: radial-gradient(circle at 50% 32%, #F6D8B0 0%, #D98F4E 46%, #B4552A 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 22px 50px rgba(196, 95, 50, 0.45);
}
[data-conn="connected"] .orb-halo { opacity: 1; animation: orbBreathe 4.5s ease-in-out infinite; }
[data-conn="error"] .orb { color: var(--accent-2); }
[data-conn="error"] .orb-halo { opacity: 0.38; }
[data-conn="error"] .orb-ico-power { display: none; }
[data-conn="error"] .orb-ico-warn { display: block; }
@keyframes orbBreathe {
  0%, 100% { opacity: 0.82; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}
.conn-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--pill-bg);
  border: 1px solid var(--pill-line);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.conn-chip i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-tertiary);
  flex-shrink: 0;
}
[data-conn="connected"] .conn-chip { color: #E8C79E; border-color: rgba(201, 151, 74, 0.35); }
[data-conn="connected"] .conn-chip i { background: var(--success); box-shadow: 0 0 8px rgba(62, 224, 165, 0.7); }
[data-conn="error"] .conn-chip i { background: var(--accent); }
#connCard .dash-status-title {
  margin-top: 12px;
  font-size: 1.5rem;
  font-weight: 750;
  letter-spacing: -0.035em;
  text-align: center;
}
#connCard .dash-status-sub {
  margin-top: 5px;
  font-size: 13.5px;
  text-align: center;
}

/* Кнопки главного экрана */
#homeScreen .connect-actions { margin-top: 0; gap: 9px; }
#homeScreen .conn-since {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 54px;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
#homeScreen .conn-since-label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.02em;
}
#homeScreen .conn-since-date {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}
#homeScreen .conn-since.hidden { display: none; }
#homeScreen .btn-connect {
  min-height: 54px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  margin-top: 0;
  box-shadow: 0 16px 34px rgba(196, 95, 50, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
#homeScreen .btn-connect:hover { filter: brightness(1.05); opacity: 1; }
#homeScreen .btn-copy-link {
  min-height: 50px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  background: var(--pill-bg);
  border: 1px solid var(--pill-line);
}
#homeScreen .btn-copy-link:hover { border-color: rgba(255, 255, 255, 0.18); opacity: 1; }
#homeScreen .btn:focus-visible,
#homeScreen .setup-action:focus-visible,
#homeScreen .orb:focus-visible,
.dash-header .btn-icon:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

/* Ember-карточка: тариф и трафик */
.plan-card {
  padding: 18px;
  border-radius: 24px;
  background: var(--ember-card);
  color: var(--ember-ink);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.34);
}
.plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.plan-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.plan-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(42, 24, 6, 0.15);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
.plan-pill svg { width: 13px; height: 13px; flex-shrink: 0; }
.plan-note {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(42, 24, 6, 0.15);
  font-size: 12.5px;
  font-weight: 600;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.plan-tiles {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.plan-tile {
  padding: 12px 12px 11px;
  border-radius: 18px;
  background: rgba(42, 24, 6, 0.09);
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.plan-val {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.plan-lab {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(42, 24, 6, 0.62);
}
.plan-track {
  margin-top: 13px;
  height: 5px;
  border-radius: 4px;
  background: rgba(42, 24, 6, 0.16);
  overflow: hidden;
}
.plan-fill,
#userStatus #trafficProgress {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--ember-ink);
  transition: width 0.3s ease;
}

.extra-device-card {
  margin-top: 12px;
}
.extra-device-buy {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.extra-device-add {
  width: 100%;
  margin-top: 12px;
  min-height: 44px;
}
.extra-qty {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(42, 24, 6, 0.12);
}
.extra-qty-btn {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(42, 24, 6, 0.12);
  color: var(--ember-ink);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.extra-qty-btn:hover { background: rgba(42, 24, 6, 0.2); }
.extra-qty-val {
  min-width: 1.4em;
  text-align: center;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.extra-device-pay {
  flex: 1;
  min-width: 180px;
}

/* Песочная карточка установки */
#homeScreen .download-hint {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.ios-client-chooser {
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid rgba(242, 204, 164, 0.14);
  border-radius: 22px;
  background: rgba(16, 12, 9, 0.56);
}
.ios-client-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 0 2px 10px;
}
.ios-client-head > span {
  color: #F2D2B0;
  font-size: 13px;
  font-weight: 800;
}
.ios-client-head small {
  color: rgba(242, 204, 164, 0.78);
  font-size: 11px;
}
.ios-client-grid {
  display: grid;
  gap: 9px;
}
.ios-alt-client {
  padding-top: 2px;
}
.ios-alt-client summary {
  padding: 7px 4px;
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}
.ios-alt-client[open] summary {
  color: var(--ember-ink);
}
.ios-alt-client .ios-client-card {
  margin-top: 5px;
}
.ios-client-card {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 68px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.ios-client-card:hover {
  transform: translateY(-1px);
  border-color: rgba(242, 204, 164, 0.28);
}
.ios-client-card.selected {
  border-color: rgba(242, 204, 164, 0.56);
  background: linear-gradient(135deg, rgba(242, 204, 164, 0.14), rgba(255, 107, 44, 0.08));
}
.ios-client-card.is-inactive,
.ios-client-card.is-inactive:hover {
  opacity: 0.42;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}
.ios-client-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.ios-app-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
}
.ios-app-icon svg { width: 30px; height: 30px; }
.ios-app-icon-v2rage,
.ios-app-icon-anywhere,
.ios-app-icon-incy {
  color: #d8e9ff;
  background: linear-gradient(145deg, #283448, #111722);
}
.ios-client-copy { min-width: 0; }
.ios-client-title {
  display: block;
  font-size: 13px;
  font-weight: 850;
}
.ios-client-desc {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 10.5px;
  line-height: 1.3;
}
.ios-client-badge {
  align-self: start;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--sand-card);
  color: var(--sand-ink);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .02em;
}
.ios-client-check {
  display: none;
  color: var(--ember-ink);
  font-size: 14px;
  font-weight: 900;
}
.ios-client-card.selected .ios-client-check { display: block; }
.ios-client-card.selected .ios-client-badge + .ios-client-check { display: none; }
#homeScreen .setup-card {
  padding: 18px;
  border-radius: 24px;
  border: 0;
  background: var(--sand-card);
  color: var(--sand-ink);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
  column-gap: 13px;
  row-gap: 14px;
  /* Всегда: иконка+текст сверху, кнопка снизу на всю ширину.
     В правой колонке десктопа «Скачать NOXEL для Windows» не влезает в ряд. */
  grid-template-columns: 46px 1fr;
  grid-template-areas:
    "mark copy"
    "action action";
}
#homeScreen .setup-card::before { content: none; }
#homeScreen .setup-mark {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: rgba(31, 24, 16, 0.1);
  border: 0;
  color: var(--sand-ink);
}
#homeScreen .setup-kicker {
  font-size: 10.5px;
  letter-spacing: 0.09em;
  font-weight: 800;
  color: rgba(31, 24, 16, 0.55);
}
#homeScreen .setup-title {
  font-size: 14px;
  font-weight: 650;
  color: var(--sand-ink);
  max-width: none;
}
#homeScreen .setup-action {
  border-radius: 999px;
  min-height: 46px;
  width: 100%;
  min-width: 0;
  padding: 0 16px;
  white-space: normal;
  text-align: center;
  line-height: 1.25;
}
#homeScreen .link-box { margin-top: 10px; }

@media (min-width: 520px) {
  /* Не возвращать кнопку в ряд — правая колонка узкая */
  #homeScreen .setup-card {
    grid-template-columns: 48px 1fr;
    grid-template-areas:
      "mark copy"
      "action action";
  }
}

/* Desktop — две колонки */
@media (min-width: 760px) {
  .container.wide { max-width: 900px; }
  #homeScreen.dash-screen-home {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    grid-template-areas:
      "conn plan"
      "conn setup"
      "conn devices";
    align-content: start;
    gap: 14px;
  }
  #connCard { grid-area: conn; padding: 26px 24px; }
  #homeScreen #userStatus { grid-area: plan; }
  #homeScreen .download-hint { grid-area: setup; }
  #homeScreen #devicesBlock { grid-area: devices; }
  .orb-wrap { width: 190px; height: 190px; }
  .orb { width: 124px; height: 124px; }
  .orb-ico { width: 48px; height: 48px; }
  #connCard .dash-status-title { font-size: 1.7rem; }
}

/* Низкие экраны — компактнее */
@media (max-height: 700px) {
  .orb-wrap { width: 132px; height: 132px; }
  .orb { width: 88px; height: 88px; }
  .orb-ico { width: 34px; height: 34px; }
  #connCard .dash-status-title { font-size: 1.3rem; margin-top: 10px; }
  #connCard.dash-card { gap: 14px; padding: 16px; }
}

@media (max-width: 480px) {
  #connCard.dash-card { padding: 18px 14px; }
  .plan-card, #homeScreen .setup-card { padding: 16px 14px; border-radius: 22px; }
  .ios-client-chooser { padding: 12px; }
  .ios-client-card { grid-template-columns: 40px minmax(0, 1fr) auto; padding: 9px 10px; }
  .ios-client-badge { font-size: 8px; padding: 4px 6px; }
  .dash-steps .step { font-size: 11.5px; min-height: 38px; }
}

@media (max-width: 340px) {
  .plan-tiles { grid-template-columns: 1fr; }
}

/* ══ Шаг «Устройство» — тот же язык, что у «Связь» ══ */
#deviceScreen .dash-title {
  font-size: 1.55rem;
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 6px;
}
#deviceScreen .dash-lead {
  margin: 0 0 16px;
  font-size: 13.5px;
  color: var(--text-secondary);
  max-width: 34ch;
  line-height: 1.45;
}
#deviceScreen .device-slot-hint {
  margin-top: -8px;
  max-width: none;
  color: var(--text-tertiary);
}
#deviceScreen .device-grid-compact {
  gap: 9px;
  margin-bottom: 12px;
}
#deviceScreen .device-tile {
  display: grid;
  grid-template-columns: 52px 1fr 24px;
  align-items: center;
  gap: 13px;
  padding: 14px 16px;
  border-radius: 22px;
  border: 1px solid var(--pill-line);
  background: var(--pill-bg);
  transform: none;
  box-shadow: none;
}
#deviceScreen .device-tile:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.16);
  background: var(--pill-bg);
  transform: translateY(-1px);
}
#deviceScreen .device-tile.selected {
  background: linear-gradient(160deg, rgba(217, 160, 91, 0.22) 0%, rgba(196, 129, 60, 0.08) 100%);
  border-color: rgba(201, 151, 74, 0.5);
  box-shadow: 0 14px 32px rgba(196, 95, 50, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
#deviceScreen .device-tile .icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
#deviceScreen .device-tile[data-platform="android"] .icon-wrap { color: #B5D15A; }
#deviceScreen .device-tile[data-platform="android_tv"] .icon-wrap { color: #E8C79E; }
#deviceScreen .device-tile[data-platform="ios"] .icon-wrap { color: #7ED0F5; }
#deviceScreen .device-tile[data-platform="windows"] .icon-wrap { color: #6EC8F4; }
#deviceScreen .device-tile[data-platform="game"] .icon-wrap { color: #D7A6F0; }
#deviceScreen .device-tile[data-platform="router"] .icon-wrap { color: #7EC8A8; }
#deviceScreen .device-tile[data-platform="macos"] .icon-wrap { color: #C8C8C8; }
#deviceScreen .device-tile[data-platform="linux"] .icon-wrap { color: #E8C45A; }
#deviceScreen .device-tile.selected .icon-wrap {
  background: var(--ember-card);
  border-color: transparent;
  color: var(--ember-ink);
}
#deviceScreen .device-tile .tile-name {
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.02em;
}
#deviceScreen .device-tile .tile-used {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  vertical-align: middle;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.82);
}
#deviceScreen .device-tile.selected .tile-used {
  background: #F3E6D4;
  color: #2A1806;
}
#deviceScreen .device-tile .tile-desc {
  margin-top: 3px;
  font-size: 12.5px;
  font-weight: 500;
}
#deviceScreen .device-tile.selected .tile-desc { color: #E8C79E; }
#deviceScreen .device-tile .tile-check {
  width: 24px;
  height: 24px;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
}
#deviceScreen .device-tile.selected .tile-check {
  background: var(--ember-card);
  border-color: transparent;
  color: #140C08;
}
#deviceScreen .device-tile:disabled {
  grid-template-columns: 52px 1fr;
  padding-right: 72px;
  opacity: 0.48;
}
#deviceScreen .device-tile:disabled .tile-check { display: none; }
#deviceScreen .device-tile .tile-meta {
  text-align: left;
  justify-self: stretch;
  min-width: 0;
}
#deviceScreen .device-tile .tile-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-tertiary);
}
#deviceScreen .btn-hero {
  min-height: 54px;
  margin-top: 6px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 16px 34px rgba(196, 95, 50, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
#deviceScreen .btn-secondary.btn-hero {
  box-shadow: none;
  margin-top: 8px;
}
#deviceScreen .btn-hero:disabled { opacity: 0.38; box-shadow: none; }
#deviceScreen .btn-hero:not(:disabled):hover { filter: brightness(1.05); opacity: 1; }
#deviceScreen .device-tile:focus-visible,
#deviceScreen .btn-hero:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

@media (min-width: 720px) {
  #deviceScreen .dash-title { font-size: 1.75rem; }
  #deviceScreen .device-grid-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  #deviceScreen .device-tile[data-platform="tv"] { grid-column: 1 / -1; }
  #deviceScreen .device-tile[data-platform="android_tv"] { grid-column: auto; }
}
