:root {
  --bg: #0a0d14;
  --bg-alt: #0d1119;
  --surface: #12161f;
  --surface-2: #171c27;
  --border: #232936;
  --ink: #eef2f8;
  --muted: #8b93a3;
  --accent: #2aabee;
  --accent-ink: #06202e;
  --success: #34c77b;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Arial, sans-serif;
  line-height: 1.5;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.hidden { display: none !important; }
a { color: inherit; text-decoration: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 14px;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, opacity .15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { opacity: .9; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-lg { padding: 14px 26px; font-size: 15px; }
.btn-block { display: flex; width: 100%; }

/* Topbar */
.topbar { position: sticky; top: 0; z-index: 40; background: rgba(10,13,20,.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; }
.brand-mark { width: 30px; height: 30px; object-fit: contain; display: block; }
.topbar-nav { display: flex; gap: 28px; font-size: 14px; color: var(--muted); }
.topbar-nav a:hover { color: var(--ink); }
.auth-area { display: flex; align-items: center; gap: 10px; }
.user-chip { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }

/* Hero */
.hero { padding: 88px 0 64px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; top: -180px; right: -120px; width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(42,171,238,.25), transparent 70%); pointer-events: none;
}
.hero-inner { position: relative; max-width: 720px; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: 18px; }
.hero h1 { font-size: 44px; line-height: 1.15; margin: 0 0 18px; letter-spacing: -0.02em; }
.hero .accent { color: var(--accent); }
.hero-desc { font-size: 17px; color: var(--muted); margin: 0 0 32px; max-width: 560px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* Calculator */
.calc-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; }
.calc-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px; margin: 22px 0 6px; }
.calc-field { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 600; }
.calc-field input {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; color: var(--ink); font-size: 15px; font-family: inherit;
}
.calc-field input:focus { outline: none; border-color: var(--accent); }
.calc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.calc-chip {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px;
  padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--muted);
}
.calc-chip:hover { border-color: var(--accent); color: var(--ink); }
.calc-chip.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.calc-result {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border);
}
.calc-result-label { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.calc-result-price { font-size: 28px; font-weight: 800; color: var(--accent); }
.calc-error { margin-top: 14px; font-size: 13px; color: #ff6b6b; }

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

/* Dashboard */
.dashboard { padding: 0 0 40px; }
.dash-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.dash-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 20px; }
.dash-label { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.dash-balance { font-size: 30px; font-weight: 800; }
.dash-actions { display: flex; gap: 10px; }
.dash-orders { border-top: 1px solid var(--border); padding-top: 16px; }
.dash-orders-empty { color: var(--muted); font-size: 14px; }
.order-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.order-row:last-child { border-bottom: none; }
.order-channel { font-weight: 600; }
.order-meta { color: var(--muted); font-size: 13px; }
.order-status { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }
.order-status.active { background: rgba(52,199,123,.15); color: var(--success); }
.order-status.expired, .order-status.done { background: rgba(139,147,163,.15); color: var(--muted); }
.order-status.pending { background: rgba(42,171,238,.15); color: var(--accent); }

/* Sections */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-title { font-size: 28px; margin: 0 0 8px; letter-spacing: -0.01em; }
.section-sub { color: var(--muted); margin: 0 0 32px; max-width: 560px; }
.grid { display: grid; gap: 18px; }

/* Services */
.grid-services { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.service-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.service-tag { display: inline-block; font-size: 12px; font-weight: 700; color: var(--accent); margin-bottom: 10px; text-transform: uppercase; letter-spacing: .03em; }
.service-title { font-size: 19px; font-weight: 700; margin: 0 0 8px; }
.service-desc { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.service-price { font-size: 20px; font-weight: 800; }
.service-price small { font-size: 13px; color: var(--muted); font-weight: 500; }

/* Tariffs */
.grid-tariffs { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.tariff-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 18px; text-align: center; transition: border-color .15s; }
.tariff-card:hover { border-color: var(--accent); }
.tariff-days { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.tariff-label { font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.tariff-price { font-size: 22px; font-weight: 800; color: var(--accent); }

/* Partners */
.grid-partners { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.partner-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: flex; align-items: center; gap: 14px; }
.partner-avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--surface-2); }
.partner-initials { width: 52px; height: 52px; border-radius: 50%; background: var(--surface-2); color: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; }
.partner-name { font-weight: 700; font-size: 15px; }
.partner-role { color: var(--muted); font-size: 13px; margin: 2px 0 6px; }
.partner-tg { font-size: 13px; color: var(--accent); }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 32px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-hours { color: var(--muted); font-size: 13px; margin: 6px 0 0; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4,6,10,.7); backdrop-filter: blur(3px); }
.modal-box { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; width: 90%; max-width: 380px; text-align: center; }
.modal-close { position: absolute; top: 12px; right: 14px; background: none; border: none; color: var(--muted); font-size: 22px; cursor: pointer; line-height: 1; }
.modal-box h3 { margin: 0 0 10px; font-size: 19px; }
.modal-hint { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.modal-status { margin-top: 16px; font-size: 13px; color: var(--muted); }
.modal-status.ok { color: var(--success); font-weight: 600; }

@media (max-width: 640px) {
  .topbar-nav { display: none; }
  .hero h1 { font-size: 32px; }
  .hero { padding: 56px 0 40px; }
}
