/* CloudSync VPN — Main Styles */
/* Дизайн-система: тёмный фон, зелёные акценты, минимализм */

:root {
  --bg: #0a0a0a;
  --bg-card: #111111;
  --bg-elevated: #161616;
  --border: #222222;
  --border-subtle: #1a1a1a;
  --green: #22c55e;
  --green-dim: rgba(34, 197, 94, 0.1);
  --green-hover: #16a34a;
  --text: #f1f5f9;
  --text-muted: #64748b;
  --text-dim: #334155;
  --danger: #ef4444;
  --warning: #f59e0b;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --transition: 0.2s ease;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ===== УТИЛИТЫ ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.text-green { color: var(--green); }
.green { color: var(--green); }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 20px;
}
.navbar .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 24px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-icon { flex-shrink: 0; }
.logo-text { font-weight: 700; font-size: 18px; color: var(--text); }
.logo-accent { color: var(--green); }

.nav-links { display: flex; gap: 24px; }
.nav-link {
  color: var(--text-muted); text-decoration: none; font-size: 14px; font-weight: 500;
  transition: color var(--transition);
}
.nav-link:hover { color: var(--text); }

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

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: none;
  cursor: pointer; padding: 4px;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column; position: fixed;
    top: 64px; left: 0; right: 0; background: var(--bg-card);
    padding: 20px; border-bottom: 1px solid var(--border); gap: 16px;
  }
}

/* ===== КНОПКИ ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 14px; cursor: pointer;
  border: none; text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--green); color: #000;
}
.btn-primary:hover { background: var(--green-hover); }
.btn-outline {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--green); color: var(--green); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.btn-telegram { background: #229ED9; color: white; }
.btn-telegram:hover { background: #1a85b8; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; }

.btn-lg { padding: 14px 28px; font-size: 15px; border-radius: var(--radius); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-xs { padding: 4px 10px; font-size: 12px; border-radius: 6px; }
.btn-full { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== HERO ===== */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  padding: 120px 20px 80px; position: relative; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--border-subtle) 1px, transparent 1px),
                    linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.4;
}
.hero-glow {
  position: absolute; top: -20%; left: 50%; transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(34,197,94,0.12) 0%, transparent 70%);
}

.hero .container { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; position: relative; }
@media (max-width: 900px) { .hero .container { grid-template-columns: 1fr; } .hero-visual { display: none; } }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--green-dim); color: var(--green);
  padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 500;
  border: 1px solid rgba(34,197,94,0.2); margin-bottom: 24px;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.hero-title {
  font-size: clamp(36px, 5vw, 56px); font-weight: 800;
  line-height: 1.15; margin-bottom: 20px; letter-spacing: -1px;
}
.hero-subtitle { font-size: 17px; color: var(--text-muted); max-width: 480px; margin-bottom: 36px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 48px; }

.hero-stats { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.stat { text-align: center; }
.stat-num { font-size: 20px; font-weight: 700; color: var(--green); }
.stat-label { font-size: 12px; color: var(--text-muted); }
.stat-divider { width: 1px; height: 40px; background: var(--border); }

/* Phone mockup */
.phone-mockup {
  width: 280px; height: 500px; border-radius: 32px;
  background: var(--bg-card); border: 2px solid var(--border);
  padding: 20px; box-shadow: 0 20px 80px rgba(0,0,0,0.6);
  margin: 0 auto; position: relative; overflow: hidden;
}
.phone-screen { height: 100%; display: flex; flex-direction: column; gap: 16px; }
.vpn-status { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--green-dim); border-radius: var(--radius-sm); border: 1px solid rgba(34,197,94,0.2); }
.status-title { font-weight: 600; color: var(--green); }
.status-sub { font-size: 11px; color: var(--text-muted); }
.vpn-toggle { width: 64px; height: 32px; background: var(--green); border-radius: 16px; margin: 4px auto; position: relative; }
.vpn-toggle::after { content: ''; position: absolute; right: 4px; top: 4px; width: 24px; height: 24px; background: #000; border-radius: 50%; }
.vpn-info { display: flex; flex-direction: column; gap: 8px; }
.info-row { display: flex; justify-content: space-between; font-size: 12px; padding: 8px 0; border-bottom: 1px solid var(--border-subtle); }

/* ===== СЕКЦИИ ===== */
.section { padding: 100px 0; }
.section-dark { background: var(--bg-card); }
.section-header { text-align: center; margin-bottom: 60px; }
.section-title { font-size: clamp(28px, 4vw, 42px); font-weight: 800; margin-bottom: 12px; letter-spacing: -0.5px; }
.section-sub { font-size: 16px; color: var(--text-muted); max-width: 480px; margin: 0 auto; }

/* ===== FEATURES ===== */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.feature-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  transition: border-color var(--transition), transform var(--transition);
}
.feature-card:hover { border-color: rgba(34,197,94,0.3); transform: translateY(-2px); }
.feature-icon { width: 48px; height: 48px; background: var(--green-dim); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.feature-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--text-muted); }

/* ===== PRICING ===== */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; max-width: 960px; margin: 0 auto 24px; }
.pricing-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px;
  position: relative; transition: border-color var(--transition);
}
.pricing-card.featured { border-color: var(--green); background: var(--bg-elevated); }
.pricing-badge { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 20px; }
.featured-badge { color: var(--green); }
.pricing-price { display: flex; align-items: baseline; gap: 4px; margin-bottom: 8px; }
.price-num { font-size: 42px; font-weight: 800; }
.price-currency { font-size: 20px; font-weight: 600; color: var(--text-muted); }
.price-period { font-size: 14px; color: var(--text-muted); }
.pricing-desc { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }
.pricing-features { list-style: none; margin-bottom: 28px; display: flex; flex-direction: column; gap: 8px; }
.pricing-features li { font-size: 14px; color: var(--text-muted); }
.pricing-note { text-align: center; font-size: 14px; color: var(--text-muted); }

/* ===== FAQ ===== */
.faq-list { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq-question {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px; cursor: pointer; font-weight: 500;
  transition: background var(--transition);
}
.faq-question:hover { background: rgba(255,255,255,0.02); }
.faq-arrow { transition: transform var(--transition); flex-shrink: 0; }
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-answer { padding: 0 24px 20px; color: var(--text-muted); font-size: 14px; display: none; }
.faq-item.open .faq-answer { display: block; }

/* ===== CTA ===== */
.cta-section { padding: 80px 0; }
.cta-card {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-elevated) 100%);
  border: 1px solid rgba(34,197,94,0.2); border-radius: 24px;
  padding: 60px; text-align: center;
}
.cta-card h2 { font-size: 36px; font-weight: 800; margin-bottom: 12px; }
.cta-card p { color: var(--text-muted); margin-bottom: 32px; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ===== FOOTER ===== */
.footer { background: var(--bg-card); border-top: 1px solid var(--border); padding: 60px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-brand .footer-desc { color: var(--text-muted); font-size: 14px; margin-top: 12px; max-width: 240px; }
.footer-links h4 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 16px; }
.footer-links a { display: block; color: var(--text-muted); text-decoration: none; font-size: 14px; margin-bottom: 8px; transition: color var(--transition); }
.footer-links a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; display: flex; justify-content: space-between; }
.footer-note { font-size: 13px; color: var(--text-dim); }
.footer-bottom p { font-size: 13px; color: var(--text-dim); }

/* ===== AUTH ===== */
.auth-section { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 80px 20px; }
.auth-container { width: 100%; max-width: 420px; }
.auth-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 20px; padding: 40px;
}
.auth-logo { display: flex; justify-content: center; margin-bottom: 24px; }
.auth-title { font-size: 24px; font-weight: 700; text-align: center; margin-bottom: 8px; }
.auth-sub { color: var(--text-muted); text-align: center; font-size: 14px; margin-bottom: 28px; }
.auth-divider { display: flex; align-items: center; gap: 16px; margin: 20px 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-divider span { color: var(--text-muted); font-size: 13px; }
.auth-footer { text-align: center; font-size: 14px; color: var(--text-muted); margin-top: 20px; }
.auth-footer a { color: var(--green); text-decoration: none; }
.auth-terms { text-align: center; font-size: 12px; color: var(--text-dim); margin-top: 16px; }
.referral-badge {
  display: flex; align-items: center; gap: 6px;
  background: var(--green-dim); color: var(--green);
  padding: 8px 12px; border-radius: var(--radius-sm);
  font-size: 13px; margin-bottom: 16px; border: 1px solid rgba(34,197,94,0.2);
}

/* ===== ФОРМЫ ===== */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 500; color: var(--text-muted); margin-bottom: 6px; }
.form-input {
  width: 100%; background: var(--bg); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--radius-sm);
  padding: 10px 14px; font-size: 14px; transition: border-color var(--transition);
  font-family: inherit;
}
.form-input:focus { outline: none; border-color: var(--green); }
.form-input:disabled { opacity: 0.5; cursor: not-allowed; }
.form-input-sm { padding: 8px 12px; font-size: 13px; }
.input-wrapper { position: relative; }
.input-wrapper .form-input { padding-right: 40px; }
.input-toggle {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--text-muted);
  padding: 4px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.form-actions { display: flex; gap: 12px; margin-top: 16px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.checkbox-label input { width: auto; accent-color: var(--green); }

/* ===== АЛЕРТЫ ===== */
.alert {
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 14px; margin-bottom: 16px;
}
.alert-success { background: rgba(34,197,94,0.1); color: var(--green); border: 1px solid rgba(34,197,94,0.2); }
.alert-error { background: rgba(239,68,68,0.1); color: #ef4444; border: 1px solid rgba(239,68,68,0.2); }
.alert-warning { background: rgba(245,158,11,0.1); color: #f59e0b; border: 1px solid rgba(245,158,11,0.2); }

/* ===== DASHBOARD ===== */
.dashboard-section { padding: 100px 0 60px; min-height: 100vh; }
.dashboard-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 32px; flex-wrap: wrap; gap: 16px; }
.dashboard-title { font-size: 28px; font-weight: 700; }
.dashboard-sub { color: var(--text-muted); font-size: 14px; margin-top: 4px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 900px) { .dashboard-grid { grid-template-columns: 1fr; } }

.dash-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.span-2 { grid-column: span 2; }
@media (max-width: 900px) { .span-2 { grid-column: span 1; } }

.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-header h3 { font-size: 15px; font-weight: 600; }

/* Badges */
.badge { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-success { background: rgba(34,197,94,0.1); color: var(--green); }
.badge-muted { background: rgba(100,116,139,0.1); color: var(--text-muted); }
.badge-warning { background: rgba(245,158,11,0.1); color: var(--warning); }
.badge-error { background: rgba(239,68,68,0.1); color: var(--danger); }

/* Прогресс-бар подписки */
.progress-bar-wrap { margin-bottom: 20px; }
.progress-bar-bg { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: var(--green); border-radius: 3px; transition: width 0.5s ease; }
.progress-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.sub-details { display: flex; gap: 24px; flex-wrap: wrap; }
.sub-stat { text-align: center; }
.sub-stat-num { font-size: 24px; font-weight: 700; }
.sub-stat-label { font-size: 12px; color: var(--text-muted); }
.no-sub-text { color: var(--text-muted); margin-bottom: 12px; }

/* Баланс */
.balance-display { display: flex; align-items: baseline; gap: 4px; margin-bottom: 4px; }
.balance-num { font-size: 36px; font-weight: 700; color: var(--green); }
.balance-currency { font-size: 18px; color: var(--text-muted); }
.balance-note { color: var(--green); font-size: 13px; margin-bottom: 4px; }
.balance-hint { color: var(--text-muted); font-size: 12px; }

/* Token */
.token-hint { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.token-display {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px; font-family: monospace;
}
.token-display code { flex: 1; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.token-copy-btn { background: none; border: none; cursor: pointer; color: var(--text-muted); transition: color var(--transition); padding: 2px; }
.token-copy-btn:hover { color: var(--green); }

/* Сессии */
.session-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border-subtle); gap: 12px; flex-wrap: wrap; }
.session-item:last-child { border-bottom: none; }
.session-device { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; }
.session-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.session-dot { width: 8px; height: 8px; border-radius: 50%; }
.session-dot.online { background: var(--green); box-shadow: 0 0 6px var(--green); }
.session-dot.offline { background: var(--text-dim); }

/* Промокод */
.promo-form { display: flex; gap: 8px; }
.promo-form .form-input { flex: 1; }

/* Реферальная */
.referral-stats { display: flex; gap: 32px; margin-bottom: 16px; }
.ref-stat { text-align: center; }
.ref-stat-num { font-size: 28px; font-weight: 700; }
.ref-stat-label { font-size: 12px; color: var(--text-muted); }
.referral-link-wrap { display: flex; gap: 8px; margin-bottom: 8px; }
.ref-hint { font-size: 12px; color: var(--text-muted); }

/* ===== SUBSCRIPTION PAGE ===== */
.pricing-grid-small { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.pricing-card-small {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.pricing-name { font-weight: 600; margin-bottom: 8px; }
.pricing-price-small { display: flex; align-items: baseline; gap: 4px; margin-bottom: 4px; }
.price-old { font-size: 14px; color: var(--text-dim); text-decoration: line-through; }
.price-new { font-size: 28px; font-weight: 700; color: var(--text); }
.price-per { font-size: 13px; color: var(--text-muted); }
.pricing-devices { font-size: 12px; color: var(--text-muted); margin-bottom: 16px; }
.price-tag { font-size: 13px; font-weight: 600; color: var(--green); }
.section-title-small { font-size: 18px; font-weight: 700; }

/* Таблица платежей */
.payments-table-wrap { overflow-x: auto; }
.payments-table {
  width: 100%; border-collapse: collapse;
  background: var(--bg-card); border-radius: var(--radius); overflow: hidden;
}
.payments-table th {
  text-align: left; padding: 12px 16px;
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-muted); border-bottom: 1px solid var(--border);
}
.payments-table td { padding: 12px 16px; font-size: 14px; border-bottom: 1px solid var(--border-subtle); }
.payments-table tr:last-child td { border-bottom: none; }
.payments-table tr:hover td { background: rgba(255,255,255,0.02); }

/* ===== ADMIN ===== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.stat-card .stat-num { font-size: 28px; font-weight: 700; }
.stat-card .stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.admin-tabs { display: flex; gap: 4px; margin-bottom: 24px; background: var(--bg-card); border-radius: var(--radius-sm); padding: 4px; width: fit-content; }
.tab-btn { padding: 8px 20px; border-radius: 6px; border: none; background: none; color: var(--text-muted); font-weight: 500; font-size: 14px; cursor: pointer; transition: all var(--transition); }
.tab-btn.active { background: var(--bg-elevated); color: var(--text); }
.tab-content { display: block; }

/* ===== МОДАЛЬНОЕ ОКНО ===== */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center; z-index: 200;
  backdrop-filter: blur(4px);
}
.modal-content {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 20px; padding: 32px; max-width: 480px; width: 90%;
}
.modal-content h3 { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.modal-content p { color: var(--text-muted); font-size: 14px; margin-bottom: 16px; }
.modal-code { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px; display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.modal-code code { flex: 1; font-size: 12px; font-family: monospace; word-break: break-all; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ===== СКЕЛЕТОН ===== */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton-line {
  height: 16px; border-radius: 8px;
  background: linear-gradient(90deg, var(--border) 25%, var(--bg-elevated) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  margin-bottom: 8px;
}
.skeleton-line.short { width: 60%; }
.skeleton-card { height: 160px; border-radius: var(--radius); background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-elevated) 50%, var(--bg-card) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }

/* ===== СПИННЕР ===== */
.spinner {
  width: 18px; height: 18px; border: 2px solid rgba(0,0,0,0.3);
  border-top-color: #000; border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto;
}
.spinner-large {
  width: 48px; height: 48px; border: 3px solid var(--border);
  border-top-color: var(--green); border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 24px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== УВЕДОМЛЕНИЯ ===== */
.notification {
  position: fixed; bottom: 24px; right: 24px; z-index: 300;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 20px;
  font-size: 14px; animation: slideIn 0.3s ease;
  box-shadow: var(--shadow);
}
.notification.success { border-color: rgba(34,197,94,0.3); color: var(--green); }
.notification.error { border-color: rgba(239,68,68,0.3); color: var(--danger); }
.notification.warning { border-color: rgba(245,158,11,0.3); color: var(--warning); }
@keyframes slideIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ===== ПУСТЫЕ СОСТОЯНИЯ ===== */
.empty-state { text-align: center; color: var(--text-muted); padding: 24px; font-size: 14px; }
.hint-text { font-size: 13px; color: var(--text-muted); }

/* ===== МОБИЛЬНАЯ АДАПТАЦИЯ ===== */
@media (max-width: 768px) {
  /* Навигация */
  .nav-links { display: none; }
  .nav-actions .btn-ghost { display: none; }
  .navbar { padding: 12px 16px; }

  /* Контейнер */
  .container { padding: 0 16px; }

  /* Hero секция */
  .hero { padding: 40px 0; }
  .hero h1 { font-size: 28px; line-height: 1.3; }
  .hero-sub { font-size: 15px; }
  .hero-actions { flex-direction: column; gap: 12px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-stats { gap: 16px; flex-wrap: wrap; }
  .hero-stats .stat { min-width: 80px; }

  /* Секции */
  .section { padding: 40px 0; }
  .section-title { font-size: 24px; }

  /* Карточки фич */
  .features-grid { grid-template-columns: 1fr; gap: 16px; }
  .feature-card { padding: 20px; }

  /* Тарифы */
  .pricing-grid { grid-template-columns: 1fr; gap: 16px; }
  .pricing-card { padding: 24px 20px; }
  .price-num { font-size: 40px; }

  /* Дашборд */
  .dashboard-grid { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .card-header { flex-direction: column; align-items: flex-start; gap: 8px; }

  /* App Token */
  .modal-code code { font-size: 10px; word-break: break-all; }
  .token-display { font-size: 11px; word-break: break-all; }

  /* Кнопки */
  .btn-lg { padding: 12px 20px; font-size: 15px; }
  .btn-full { width: 100%; }

  /* Форма */
  .form-row { grid-template-columns: 1fr; }
  .form-group input, .form-group select { font-size: 16px; } /* Предотвращает зум на iOS */

  /* Модальное окно */
  .modal-content { margin: 16px; padding: 24px 20px; width: calc(100% - 32px); }
  .modal-actions { flex-direction: column; }
  .modal-actions .btn { width: 100%; }

  /* Футер */
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer { padding: 40px 0 24px; }

  /* Уведомления */
  .notification { bottom: 16px; right: 16px; left: 16px; text-align: center; }

  /* Таблицы */
  .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 500px; }

  /* Промо баннер */
  .promo-banner { padding: 24px 16px; }

  /* Скрываем лишнее на мобиле */
  .hide-mobile { display: none !important; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 24px; }
  .section-title { font-size: 20px; }
  .price-num { font-size: 36px; }
  .btn-lg { font-size: 14px; padding: 11px 18px; }

  /* Фикс зума при фокусе на input (iOS) */
  input, select, textarea {
    font-size: 16px !important;
  }
}
