/* ═══════════════════════════════════════════
   Socket VPN — Personal Cabinet CSS
   Dark premium theme — mobile-first
═══════════════════════════════════════════ */

/* ─── VARIABLES ─────────────────────────────── */
:root {
  --bg:          #0a0e1a;
  --bg-2:        #0d1220;
  --card:        #111827;
  --card-hover:  #161f30;
  --border:      #1e2a3a;
  --border-2:    #243045;

  --accent:      #3b82f6;
  --accent-dim:  #1d4ed8;
  --accent-glow: rgba(59,130,246,.18);
  --accent-muted:rgba(59,130,246,.12);

  --purple:      #8b5cf6;
  --green:       #10b981;
  --red:         #ef4444;
  --red-dim:     #991b1b;
  --yellow:      #f59e0b;
  --cyan:        #06b6d4;

  --vk:          #0077ff;
  --tg:          #229ed9;

  --text-1:      #f1f5f9;
  --text-2:      #94a3b8;
  --text-3:      #64748b;
  --text-danger: #f87171;

  --radius:      12px;
  --radius-sm:   8px;
  --radius-lg:   16px;

  --sidebar-w:   240px;
  --topbar-h:    60px;
  --bottom-nav-h:64px;

  --transition:  .18s ease;
  --shadow:      0 1px 3px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.3);
  --shadow-lg:   0 8px 32px rgba(0,0,0,.5);
}

/* ─── RESET & BASE ───────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text-1);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg { display: block; }
input, button, select, textarea { font: inherit; }
button { cursor: pointer; border: none; background: none; color: inherit; }

/* ─── UTILITIES ─────────────────────────────── */
.hidden { display: none !important; }
.mt-2  { margin-top: .5rem; }
.mt-3  { margin-top: .75rem; }
.mt-4  { margin-top: 1rem; }
.mt-6  { margin-top: 1.5rem; }
.mb-2  { margin-bottom: .5rem; }
.mb-3  { margin-bottom: .75rem; }
.mb-4  { margin-bottom: 1rem; }
.w-12  { width: 3rem; }
.w-16  { width: 4rem; }
.w-20  { width: 5rem; }
.w-40  { width: 10rem; }
.h-4   { height: 1rem; }
.h-6   { height: 1.5rem; }
.h-10  { height: 2.5rem; }
.h-16  { height: 4rem; }
.w-full { width: 100%; }
.w-3\/4 { width: 75%; }
.text-muted { color: var(--text-2); font-size: .875rem; }
.text-danger { color: var(--text-danger); }
.link { color: var(--accent); font-size: .875rem; }
.link:hover { text-decoration: underline; }

/* ─── SCREEN TOGGLE ─────────────────────────── */
.screen { min-height: 100vh; }

/* ─── SKELETON ──────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -800px 0; }
  100% { background-position:  800px 0; }
}
.skeleton, [class*="skeleton"] {
  background: linear-gradient(90deg, var(--card) 25%, var(--card-hover) 50%, var(--card) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.6s infinite linear;
  border-radius: var(--radius-sm);
}
.skeleton-block { display: flex; flex-direction: column; gap: .5rem; }
.qr-skeleton { width: 200px; height: 200px; border-radius: var(--radius); margin: 0 auto; }
.tariff-card-skeleton { height: 280px; border-radius: var(--radius); }

/* ─── TOAST ─────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + 12px);
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
@media (min-width: 768px) {
  #toast-container { bottom: 20px; }
}
.toast {
  padding: .65rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 500;
  color: #fff;
  pointer-events: all;
  box-shadow: var(--shadow-lg);
  animation: toast-in .22s ease forwards;
  max-width: 320px;
}
.toast-success { background: #065f46; border: 1px solid #10b981; }
.toast-error   { background: #7f1d1d; border: 1px solid #ef4444; }
.toast-info    { background: #1e3a5f; border: 1px solid #3b82f6; }
.toast-out { animation: toast-out .22s ease forwards; }

@keyframes toast-in  { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }
@keyframes toast-out { from { opacity:1; transform:none; } to { opacity:0; transform:translateY(8px); } }

/* ─── MODAL ─────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 8000;
  animation: fade-in .2s ease;
}
@keyframes fade-in { from { opacity:0; } to { opacity:1; } }

.modal-box {
  background: var(--card);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 380px;
  box-shadow: var(--shadow-lg);
  animation: modal-up .22s ease;
}
@keyframes modal-up { from { opacity:0; transform:translateY(16px) scale(.97); } to { opacity:1; transform:none; } }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem 0;
}
.modal-header h3 { font-size: 1rem; font-weight: 600; }
.modal-body { padding: 1.25rem 1.5rem 1.5rem; text-align: center; }
.qr-wrap { margin-bottom: 1rem; }
.qr-wrap img { border-radius: var(--radius-sm); max-width: 200px; margin: 0 auto; }
.qr-hint { font-size: .8125rem; color: var(--text-2); }

/* ─── LOGO ──────────────────────────────────── */
.auth-logo, .sidebar-logo, .topbar-logo {
  display: flex; align-items: center; gap: .6rem;
}
.logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(59,130,246,.35);
}
.logo-icon-sm { width: 30px; height: 30px; border-radius: 8px; }
.logo-text {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -.3px;
  color: var(--text-1);
}

/* ─── AUTH SCREEN ───────────────────────────── */
.auth-container {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  background:
    radial-gradient(ellipse 60% 50% at 50% -10%, rgba(59,130,246,.18) 0%, transparent 70%),
    var(--bg);
}

.auth-card {
  width: 100%; max-width: 420px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 2rem 2.5rem;
  box-shadow: var(--shadow-lg);
}

.auth-logo { justify-content: center; margin-bottom: 2rem; }

/* Tabs */
.auth-tabs {
  display: flex;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 1.75rem;
  position: relative;
}
.auth-tab {
  flex: 1;
  padding: .45rem;
  font-size: .875rem;
  font-weight: 500;
  border-radius: 6px;
  transition: color var(--transition);
  position: relative;
  z-index: 1;
  color: var(--text-2);
}
.auth-tab.active { color: var(--text-1); }
.auth-tab-indicator {
  position: absolute;
  top: 4px; left: 4px;
  height: calc(100% - 8px);
  width: calc(50% - 4px);
  background: var(--card);
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
  transition: transform .22s cubic-bezier(.4,0,.2,1);
}
.auth-tabs[data-active="register"] .auth-tab-indicator {
  transform: translateX(100%);
}

/* ─── FORMS ─────────────────────────────────── */
.auth-form { display: flex; flex-direction: column; gap: 1rem; }

.field-group { display: flex; flex-direction: column; gap: .35rem; }
.field-group-row {
  display: flex; justify-content: flex-end;
  margin-top: -.25rem;
}
.field-label {
  font-size: .8125rem;
  font-weight: 500;
  color: var(--text-2);
}
.field-input {
  width: 100%;
  padding: .625rem .875rem;
  background: var(--bg);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  font-size: .9375rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.field-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.field-input:read-only {
  color: var(--text-2);
  cursor: default;
}
.field-input.error { border-color: var(--red); }
.field-error {
  font-size: .78125rem;
  color: var(--text-danger);
  min-height: 1rem;
}
.field-success {
  font-size: .78125rem;
  color: var(--green);
  min-height: 1rem;
}

.input-wrap { position: relative; }
.input-wrap .field-input { padding-right: 2.75rem; }
.eye-btn {
  position: absolute;
  right: .75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  display: flex;
  transition: color var(--transition);
  padding: 2px;
}
.eye-btn:hover { color: var(--text-2); }

/* ─── BUTTONS ───────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .625rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: .9375rem;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute; inset: 0;
  background: transparent;
  transition: background var(--transition);
}
.btn:hover::after { background: rgba(255,255,255,.06); }
.btn:active::after { background: rgba(0,0,0,.1); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(59,130,246,.3);
}
.btn-primary:hover { background: var(--accent-dim); box-shadow: 0 4px 12px rgba(59,130,246,.4); }

.btn-secondary {
  background: var(--border);
  color: var(--text-1);
  border: 1px solid var(--border-2);
}
.btn-secondary:hover { background: var(--border-2); }

.btn-danger {
  background: var(--red);
  color: #fff;
}
.btn-danger:hover { background: var(--red-dim); }

.btn-vk  { background: var(--vk);  color: #fff; }
.btn-vk:hover  { background: #0060d0; }
.btn-tg  { background: var(--tg);  color: #fff; }
.btn-tg:hover  { background: #1d88bc; }

.btn-full { width: 100%; }
.btn-sm {
  padding: .375rem .75rem;
  font-size: .8125rem;
  border-radius: 6px;
}
.btn-icon {
  padding: .625rem;
  flex-shrink: 0;
}
.btn-sm.btn-icon { padding: .375rem; }
.btn-link {
  padding: 0;
  font-size: .875rem;
  color: var(--accent);
  background: none;
  font-weight: 500;
}
.btn-link:hover { text-decoration: underline; }

.btn-icon svg { display: block; }

/* Spinner inside button */
.btn-spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.btn-icon-wrap { display: flex; align-items: center; gap: .5rem; }
.btn-icon { display: block; }

/* ─── AUTH DIVIDER ──────────────────────────── */
.auth-divider {
  display: flex; align-items: center; gap: .75rem;
  margin: 1.25rem 0;
  color: var(--text-3);
  font-size: .8125rem;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.social-btns { display: flex; flex-direction: column; gap: .75rem; }
.btn-icon { flex-shrink: 0; }

/* ─── APP LAYOUT ────────────────────────────── */
#app-screen {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  display: none;
  flex-direction: column;
  padding: 1.25rem 0;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
  transition: transform .25s cubic-bezier(.4,0,.2,1);
}
@media (min-width: 768px) {
  .sidebar { display: flex; }
  .topbar, .bottom-nav { display: none !important; }
  .main-wrapper { margin-left: var(--sidebar-w); }
}

.sidebar-logo { padding: 0 1.25rem 1.5rem; }

/* Sidebar Nav */
.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 .75rem;
}
.nav-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .625rem .875rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-2);
  transition: all var(--transition);
  width: 100%;
  text-align: left;
}
.nav-item:hover { background: var(--card); color: var(--text-1); }
.nav-item.active {
  background: var(--accent-muted);
  color: var(--accent);
  box-shadow: inset 2px 0 0 var(--accent);
}
.nav-icon { flex-shrink: 0; }

.sidebar-footer {
  display: flex; align-items: center; gap: .5rem;
  padding: 1rem .75rem 0;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.user-info {
  display: flex; align-items: center; gap: .625rem;
  flex: 1; min-width: 0;
}
.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  display: flex; align-items: center; justify-content: center;
  font-size: .8125rem;
  font-weight: 700;
  flex-shrink: 0;
  color: #fff;
}
.user-meta { min-width: 0; }
.user-name {
  display: block;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-email {
  display: block;
  font-size: .71875rem;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logout-btn {
  color: var(--text-3);
  padding: .375rem;
  border-radius: 6px;
  transition: all var(--transition);
}
.logout-btn:hover { color: var(--text-danger); background: rgba(239,68,68,.1); }

/* Mobile Top Bar */
.topbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1rem;
  z-index: 200;
}
.logout-btn-mobile {
  color: var(--text-3);
  padding: .375rem;
  border-radius: 6px;
}
.logout-btn-mobile:hover { color: var(--text-danger); }

/* Mobile nav overlay */
.mobile-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 99;
  animation: fade-in .2s ease;
}
.mobile-overlay.hidden { display: none !important; }

/* Sidebar open on mobile */
.sidebar.open {
  display: flex;
  transform: translateX(0);
}

/* Main wrapper */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Page container */
.page-container {
  flex: 1;
  padding: calc(var(--topbar-h) + 1.25rem) 1rem calc(var(--bottom-nav-h) + 1.25rem);
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}
@media (min-width: 768px) {
  .page-container {
    padding: 2rem 2rem 2rem;
  }
}

/* Pages */
.page {
  animation: page-in .2s ease;
}
@keyframes page-in { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }

.page-header { margin-bottom: 1.5rem; }
.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.4px;
  color: var(--text-1);
}
.page-subtitle {
  font-size: .875rem;
  color: var(--text-2);
  margin-top: .25rem;
}

/* ─── CARDS ─────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem;
}
.card-title {
  font-size: .9375rem;
  font-weight: 600;
  color: var(--text-1);
}
.card-danger {
  border-color: rgba(239,68,68,.3);
  background: rgba(239,68,68,.05);
}

/* ─── SUBSCRIPTION CARD ─────────────────────── */
.subscription-card { margin-bottom: 1rem; }
.sub-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 1rem;
}
.sub-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.sub-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .2rem .6rem;
  border-radius: 100px;
  font-size: .75rem;
  font-weight: 600;
  margin-bottom: .35rem;
}
.sub-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
}
.sub-badge.active   { background: rgba(16,185,129,.15); color: var(--green); }
.sub-badge.active::before { background: var(--green); box-shadow: 0 0 0 2px rgba(16,185,129,.3); }
.sub-badge.expired  { background: rgba(239,68,68,.12); color: var(--red); }
.sub-badge.expired::before { background: var(--red); }
.sub-badge.trial    { background: rgba(245,158,11,.12); color: var(--yellow); }
.sub-badge.trial::before { background: var(--yellow); }

.sub-plan {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-1);
}
.sub-progress-wrap { margin-bottom: 1rem; }
.sub-progress-labels {
  display: flex; justify-content: space-between;
  font-size: .8125rem;
  color: var(--text-2);
  margin-bottom: .4rem;
}
.progress-bar {
  height: 6px;
  background: var(--border-2);
  border-radius: 100px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #60a5fa);
  border-radius: 100px;
  transition: width .8s cubic-bezier(.4,0,.2,1);
}
.sub-url-row { margin-top: .5rem; }

/* ─── COPY ROW ──────────────────────────────── */
.copy-row {
  display: flex; gap: .5rem;
  align-items: center;
}
.copy-input {
  flex: 1;
  font-size: .8125rem;
  color: var(--text-2) !important;
  font-family: 'SFMono-Regular', Consolas, monospace;
}

/* ─── STATS GRID ────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-bottom: 1rem;
}
@media (min-width: 520px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  align-items: flex-start;
  gap: .875rem;
  box-shadow: var(--shadow);
}
.stat-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-icon-blue   { background: rgba(59,130,246,.15);  color: var(--accent); }
.stat-icon-purple { background: rgba(139,92,246,.15);  color: var(--purple); }
.stat-icon-green  { background: rgba(16,185,129,.15);  color: var(--green); }
.stat-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.2;
}
.stat-label {
  font-size: .71875rem;
  color: var(--text-3);
  margin-top: .15rem;
}

/* ─── PAYMENTS TABLE ────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.data-table th {
  text-align: left;
  color: var(--text-3);
  font-size: .75rem;
  font-weight: 600;
  padding: .5rem .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: .75rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--card-hover); }

/* ─── TARIFFS GRID ──────────────────────────── */
.tariffs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 480px) {
  .tariffs-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 800px) {
  .tariffs-grid { grid-template-columns: repeat(3, 1fr); }
}

.tariff-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all var(--transition);
  position: relative;
  box-shadow: var(--shadow);
}
.tariff-card:hover {
  border-color: var(--border-2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.tariff-card.popular {
  border-color: var(--accent);
  background: linear-gradient(160deg, rgba(59,130,246,.07) 0%, var(--card) 60%);
}
.popular-badge {
  position: absolute;
  top: -1px; left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: .71875rem;
  font-weight: 700;
  padding: .2rem .75rem;
  border-radius: 0 0 8px 8px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.tariff-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-1);
}
.tariff-price {
  display: flex;
  align-items: baseline;
  gap: .35rem;
}
.tariff-price-main {
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--text-1);
  letter-spacing: -.5px;
}
.tariff-price-period { font-size: .8125rem; color: var(--text-3); }
.tariff-discount {
  margin-left: .25rem;
  background: rgba(16,185,129,.15);
  color: var(--green);
  font-size: .71875rem;
  font-weight: 700;
  padding: .15rem .45rem;
  border-radius: 4px;
}
.tariff-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  flex: 1;
}
.tariff-features li {
  font-size: .8125rem;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.tariff-features li::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.promo-card {}
.promo-row {
  display: flex; gap: .75rem;
  margin-top: .75rem;
  flex-wrap: wrap;
}
.promo-row .field-input { flex: 1; min-width: 180px; }

/* ─── GUIDES GRID ───────────────────────────── */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
}
@media (min-width: 520px) {
  .guides-grid { grid-template-columns: repeat(3, 1fr); }
}

.guide-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  transition: all var(--transition);
}
.guide-card:hover {
  border-color: var(--border-2);
  background: var(--card-hover);
}
.guide-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2);
  margin-bottom: .25rem;
}
.guide-icon-blue  { background: rgba(59,130,246,.15);  color: var(--accent); }
.guide-icon-green { background: rgba(16,185,129,.15);  color: var(--green); }
.guide-icon-cyan  { background: rgba(6,182,212,.15);   color: var(--cyan); }
.guide-label { font-size: .8125rem; font-weight: 600; color: var(--text-1); }

/* ─── DEVICES ───────────────────────────────── */
.device-limit-badge {
  display: flex; align-items: center; gap: .4rem;
  background: var(--border);
  border-radius: 100px;
  padding: .25rem .75rem;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--text-2);
}
.device-row {
  display: flex; align-items: center; gap: .875rem;
  padding: .875rem 0;
  border-bottom: 1px solid var(--border);
}
.device-row:last-child { border-bottom: none; }
.device-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2);
  flex-shrink: 0;
}
.device-meta { flex: 1; min-width: 0; }
.device-name {
  font-size: .9375rem;
  font-weight: 600;
  color: var(--text-1);
}
.device-detail {
  font-size: .78125rem;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── PROFILE ───────────────────────────────── */
.profile-avatar-row {
  display: flex; align-items: flex-start; gap: 1.25rem;
  flex-wrap: wrap;
}
.profile-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.profile-meta { flex: 1; min-width: 220px; }
.profile-email-row {
  display: flex; align-items: center; gap: .5rem;
  margin-top: .75rem;
  flex-wrap: wrap;
}
.profile-email { font-size: .875rem; color: var(--text-2); }

.input-with-action { display: flex; gap: .5rem; }
.input-with-action .field-input { flex: 1; }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .6rem;
  border-radius: 100px;
  font-size: .71875rem;
  font-weight: 600;
}
.badge-verified   { background: rgba(16,185,129,.15); color: var(--green); }
.badge-unverified { background: rgba(245,158,11,.12); color: var(--yellow); }
.badge-paid       { background: rgba(16,185,129,.15); color: var(--green); }
.badge-pending    { background: rgba(245,158,11,.12); color: var(--yellow); }
.badge-failed     { background: rgba(239,68,68,.12);  color: var(--red); }

/* Linked accounts */
.linked-accounts { display: flex; flex-direction: column; gap: 0; }
.linked-account-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: .875rem 0;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}
.linked-account-row:last-child { border-bottom: none; }
.linked-account-info { display: flex; align-items: center; gap: .75rem; }
.linked-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--border);
  color: var(--text-2);
}
.linked-icon-tg { background: rgba(34,158,217,.15); color: var(--tg); }
.linked-icon-vk { background: rgba(0,119,255,.15);  color: var(--vk); }
.linked-name  { font-size: .875rem; font-weight: 600; color: var(--text-1); }
.linked-status{ font-size: .75rem;  color: var(--text-3); }

/* Toggles */
.toggle-list { display: flex; flex-direction: column; gap: 0; }
.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: .875rem 0;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}
.toggle-row:last-child { border-bottom: none; }
.toggle-label { font-size: .875rem; font-weight: 500; color: var(--text-1); }
.toggle-hint  { font-size: .75rem; color: var(--text-3); margin-top: .15rem; }
.toggle-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--border-2);
  border-radius: 100px;
  transition: background var(--transition);
  cursor: pointer;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  border-radius: 50%;
  background: var(--text-3);
  transition: transform var(--transition), background var(--transition);
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(18px);
  background: #fff;
}

/* Sessions */
.session-list { display: flex; flex-direction: column; gap: 0; }
.session-row {
  display: flex; align-items: center; gap: .75rem;
  padding: .875rem 0;
  border-bottom: 1px solid var(--border);
}
.session-row:last-child { border-bottom: none; }
.session-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2);
  flex-shrink: 0;
}
.session-meta { flex: 1; }
.session-name   { font-size: .875rem; font-weight: 500; color: var(--text-1); }
.session-detail { font-size: .75rem; color: var(--text-3); }

/* ─── EMPTY STATE ───────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  gap: .5rem;
  color: var(--text-3);
  font-size: .875rem;
  text-align: center;
}

/* ─── BOTTOM NAV ────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav-h);
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 200;
}
.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .25rem;
  color: var(--text-3);
  font-size: .625rem;
  font-weight: 500;
  transition: color var(--transition);
  padding: .5rem 0;
}
.bottom-nav-item.active { color: var(--accent); }
.bottom-nav-item:hover  { color: var(--text-2); }
.bottom-nav-item span   { display: block; }

/* ─── ICON BTN ──────────────────────────────── */
.icon-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  transition: all var(--transition);
  flex-shrink: 0;
}
.icon-btn:hover { background: var(--border); color: var(--text-1); }

/* ─── RESPONSIVE TWEAKS ─────────────────────── */
@media (max-width: 400px) {
  .auth-card { padding: 1.5rem 1.25rem 2rem; }
  .sub-header { flex-direction: column; }
  .sub-actions { width: 100%; }
  .sub-actions .btn { flex: 1; justify-content: center; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .data-table th:nth-child(3),
  .data-table td:nth-child(3) { display: none; }
}

@media (max-width: 520px) {
  .guides-grid { grid-template-columns: 1fr 1fr; }
  .tariff-card { padding: 1.25rem; }
}

/* ─── SCROLLBAR ─────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ─── SELECTION ─────────────────────────────── */
::selection { background: var(--accent-glow); color: var(--text-1); }

/* ─── FOCUS VISIBLE ─────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
