:root {
  --bg:      #0b0810;
  --panel:   rgba(24, 18, 38, 0.62);
  --panel2:  rgba(32, 24, 48, 0.55);
  --stroke:  rgba(168, 130, 255, 0.16);
  --stroke2: rgba(255, 255, 255, 0.08);
  --text:    #f1eef8;
  --dim:     #b7aecb;
  --faint:   #7d7496;
  --accent:  #9a5cff;
  --accent2: #b98cff;
  --radius:  18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", "Inter", system-ui, -apple-system, sans-serif;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  background: var(--bg);
  overflow-x: hidden;
  position: relative;
}

/* электрическая текстура на весь экран */
body::before {
  content: "";
  position: fixed; inset: 0;
  background: url(assets/bg.svg) center/cover no-repeat;
  opacity: 0.9;
  z-index: -2;
}
/* фиолетовые "разряды"-свечения */
body::after {
  content: "";
  position: fixed; inset: 0;
  background:
    radial-gradient(60% 45% at 20% 15%, rgba(154,92,255,.35), transparent 60%),
    radial-gradient(55% 45% at 85% 25%, rgba(196,80,255,.28), transparent 60%),
    radial-gradient(70% 60% at 50% 110%, rgba(90,40,180,.35), transparent 60%),
    linear-gradient(180deg, rgba(11,8,16,.35), rgba(11,8,16,.75));
  z-index: -1;
  pointer-events: none;
}

/* ── плавающий pill-навбар ── */
.nav {
  position: sticky; top: 18px; z-index: 30;
  width: fit-content; margin: 18px auto 0;
  display: flex; align-items: center; gap: 22px;
  padding: 10px 12px 10px 20px;
  background: rgba(18, 13, 28, 0.72);
  backdrop-filter: blur(16px);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  box-shadow: 0 10px 40px rgba(0,0,0,.45);
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 17px; }
.brand img { width: 24px; height: 24px; }
.nav-links { display: flex; gap: 22px; }
.nav-links a { color: var(--dim); text-decoration: none; font-size: 14px; transition: color .2s; }
.nav-links a:hover { color: var(--text); }

/* ── кнопки ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 24px; border-radius: 999px;
  font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap;
  cursor: pointer; border: none; transition: transform .15s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-accent {
  background: linear-gradient(180deg, var(--accent2), var(--accent));
  color: #fff; box-shadow: 0 8px 26px rgba(154,92,255,.4);
}
.btn-accent:hover { box-shadow: 0 12px 34px rgba(154,92,255,.55); }
.btn-ghost { background: rgba(255,255,255,.06); color: var(--text); border: 1px solid var(--stroke); }
.btn-ghost:hover { background: rgba(255,255,255,.1); border-color: var(--accent); }
.btn-lg { padding: 14px 32px; font-size: 15px; }

/* ── герой ── */
.hero { text-align: center; padding: 110px 24px 120px; max-width: 900px; margin: 0 auto; }
.hero h1 {
  font-size: 66px; font-weight: 800; letter-spacing: -1.5px; line-height: 1.08;
  text-shadow: 0 6px 40px rgba(154,92,255,.35);
  margin-bottom: 22px;
}
.hero h1 .grad {
  background: linear-gradient(120deg, #fff 20%, #c9a9ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { font-size: 17px; color: var(--dim); max-width: 620px; margin: 0 auto 34px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── секции ── */
.section { max-width: 1120px; margin: 0 auto; padding: 90px 24px; }
.section h2 { font-size: 42px; font-weight: 800; text-align: center; letter-spacing: -1px; }
.section-sub { text-align: center; color: var(--dim); margin: 12px auto 48px; font-size: 16px; max-width: 560px; }

/* ── bento преимущества ── */
.bento { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: stretch; }
.bento .card { min-height: 0; display: flex; flex-direction: column; justify-content: center; }
.bento .tall { grid-row: auto; min-height: 0; }
.card h3 { font-size: 21px; margin-bottom: 8px; }
.card p { color: var(--dim); font-size: 15px; line-height: 1.55; }
.card {
  position: relative; overflow: hidden;
  background: var(--panel);
  backdrop-filter: blur(10px);
  border: 1px solid var(--stroke2);
  border-radius: var(--radius);
  padding: 30px;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 20px 50px rgba(0,0,0,.4); }
.card-ico {
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center; font-size: 22px; margin-bottom: 18px;
  background: rgba(154,92,255,.16); border: 1px solid rgba(154,92,255,.3);
}
.card.gold .card-ico   { background: rgba(240,190,90,.14);  border-color: rgba(240,190,90,.34); }
.card.red .card-ico    { background: rgba(240,90,110,.14);  border-color: rgba(240,90,110,.34); }
.card.blue .card-ico   { background: rgba(90,150,255,.14);  border-color: rgba(90,150,255,.34); }
.card h3 { font-size: 20px; margin-bottom: 8px; }
.card p { color: var(--dim); font-size: 15px; }
/* цветной "туман" в углу карточки */
.card.gold::after, .card.red::after, .card::after { content:""; position:absolute; right:-40px; top:-40px; width:180px; height:180px; border-radius:50%; filter: blur(50px); opacity:.5; }
.card::after      { background: rgba(154,92,255,.30); }
.card.gold::after { background: rgba(240,190,90,.22); }
.card.red::after  { background: rgba(240,90,110,.24); }

/* ── товары (3 колонки) ── */
.products { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 26px; align-items: start; }
.plan-title { text-align: center; font-size: 22px; font-weight: 800; margin-bottom: 18px; }
.plan.alpha .plan-title { background: linear-gradient(120deg,#c9a9ff,#9a5cff); -webkit-background-clip:text; background-clip:text; color:transparent; }
.plan-list { display: flex; flex-direction: column; gap: 12px; }
.price-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--stroke2);
  backdrop-filter: blur(8px);
  cursor: pointer; transition: transform .15s, border-color .2s, background .2s;
  color: var(--text); text-decoration: none;
}
.price-row:hover { transform: translateY(-2px); border-color: var(--accent); background: var(--panel2); }
.price-row .label { font-weight: 600; }
.price-row .label small { display:block; color: var(--faint); font-weight: 400; font-size: 12px; }
.price-row .val { font-weight: 800; font-size: 17px; }
.plan.alpha .plan-list {
  border-radius: 18px; padding: 8px;
  background: radial-gradient(120% 80% at 50% 0%, rgba(154,92,255,.22), transparent 70%);
  box-shadow: 0 0 0 1px rgba(154,92,255,.25), 0 24px 60px rgba(154,92,255,.15);
}
.plan.alpha .val { color: var(--accent2); }

/* ── CTA-полоса ── */
.cta-band { text-align: center; padding: 80px 24px; }
.cta-band h2 { font-size: 46px; font-weight: 800; }
.cta-band p { color: var(--dim); margin-top: 12px; }
.cta-band .accenttext { color: var(--accent2); font-weight: 700; }

/* ── футер ── */
.footer {
  border-top: 1px solid var(--stroke2);
  padding: 40px 24px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  margin-top: 40px;
}
.footer .brand { justify-content: center; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--dim); text-decoration: none; font-size: 15px; }
.footer-links a:hover { color: var(--text); }
.footer-copy { color: var(--faint); font-size: 13px; }

/* ── страницы аутентификации ── */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card {
  width: 100%; max-width: 420px;
  background: rgba(22, 16, 34, 0.66);
  backdrop-filter: blur(20px);
  border: 1px solid var(--stroke);
  border-radius: 22px;
  padding: 34px;
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
}
.auth-brand { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 22px; font-weight: 700; font-size: 18px; color: var(--text); text-decoration: none; }
.auth-brand img { width: 26px; height: 26px; }
.auth-card h1 { font-size: 28px; font-weight: 800; text-align: center; }
.auth-card .sub { text-align: center; color: var(--dim); font-size: 14px; margin: 8px 0 26px; }
.field-label { display: block; font-size: 12px; letter-spacing: .5px; color: var(--faint); text-transform: uppercase; margin: 16px 0 7px; }
.field {
  position: relative; display: flex; align-items: center;
  background: rgba(255,255,255,.05); border: 1px solid var(--stroke2);
  border-radius: 12px; transition: border-color .2s;
}
.field:focus-within { border-color: var(--accent); }
.field input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-size: 15px; padding: 13px 16px;
}
.field .eye { padding: 0 14px; color: var(--faint); cursor: pointer; user-select: none; background:none;border:none;font-size:16px; }
.auth-card .btn { width: 100%; margin-top: 24px; }
.auth-alt { text-align: center; margin-top: 18px; color: var(--dim); font-size: 14px; }
.auth-alt a { color: var(--accent2); text-decoration: none; font-weight: 600; }
.auth-note { text-align: center; font-size: 12px; color: var(--faint); margin-top: 14px; }
.auth-msg { text-align: center; font-size: 14px; margin-top: 16px; min-height: 20px; }
.auth-msg.err { color: #f06e76; }
.auth-msg.ok  { color: #7ecf8c; }

/* ── модалка заказа ── */
.modal-back {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(6,4,10,.7); backdrop-filter: blur(4px);
  display: none; place-items: center; padding: 24px;
}
.modal-back.open { display: grid; }
.modal {
  width: 100%; max-width: 620px;
  background: rgba(22,16,34,.92); border: 1px solid var(--stroke);
  border-radius: 18px; padding: 28px;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.modal-head h3 { font-size: 20px; }
.modal-close { background: none; border: none; color: var(--dim); font-size: 20px; cursor: pointer; }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.modal .row { display: flex; justify-content: space-between; padding: 8px 0; }
.modal .row .total { color: #7ecf8c; font-weight: 800; }
.promo { display: flex; gap: 8px; margin-top: 14px; }
.promo input { flex:1; background: rgba(255,255,255,.05); border:1px solid var(--stroke2); border-radius:10px; color:var(--text); padding:10px 14px; outline:none; }
.pay-method { display:flex; align-items:center; gap:10px; padding:14px; border:1px solid var(--accent); border-radius:12px; background: rgba(154,92,255,.1); }
.modal-actions { display:flex; justify-content:flex-end; gap:12px; margin-top:26px; }

/* ── личный кабинет (сайдбар + контент) ── */
.cab { display: flex; min-height: 100vh; }
.cab-side {
  width: 260px; flex-shrink: 0;
  padding: 26px 18px; display: flex; flex-direction: column; gap: 6px;
  background: linear-gradient(160deg, rgba(154,92,255,.22), rgba(20,14,32,.5) 60%);
  border-right: 1px solid var(--stroke2);
  backdrop-filter: blur(8px);
}
.cab-side .brand { padding: 6px 10px 22px; font-size: 20px; }
.side-nav { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px;
  color: var(--dim); text-decoration: none; font-weight: 600; font-size: 15px; cursor: pointer;
  border: 1px solid transparent; transition: background .2s, color .2s, border-color .2s; }
.side-nav:hover { background: rgba(255,255,255,.05); color: var(--text); }
.side-nav.active { background: rgba(255,255,255,.07); color: var(--text); border-color: var(--stroke); }
.side-nav .ico { width: 20px; text-align: center; }
.side-foot { margin-top: auto; }
.side-foot .side-nav { color: #f06e76; }
.side-foot .side-nav:hover { background: rgba(240,110,118,.1); }

.cab-main { flex: 1; padding: 44px 48px; }
.cab-page { display: none; }
.cab-page.active { display: block; }
.cab-page h1 { font-size: 30px; font-weight: 800; margin-bottom: 24px; }

.info-card {
  max-width: 720px;
  background: rgba(24,18,38,.55); backdrop-filter: blur(16px);
  border: 1px solid var(--stroke); border-radius: 18px; padding: 10px 26px 20px;
  box-shadow: 0 30px 70px rgba(0,0,0,.4);
}
.info-title { color: var(--faint); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; padding: 20px 0 6px; }
.info-row { display: flex; align-items: center; justify-content: space-between; padding: 15px 0; border-bottom: 1px solid var(--stroke2); }
.info-row:last-child { border-bottom: none; }
.info-row .k { display: flex; align-items: center; gap: 12px; color: var(--dim); font-size: 15px; }
.info-row .k .ico { opacity: .7; }
.info-row .v { font-weight: 700; font-size: 15px; }
.info-row .v.muted { color: var(--faint); font-weight: 500; }

/* формы кабинета/админки */
.panel-card { max-width: 720px; background: rgba(24,18,38,.55); backdrop-filter: blur(16px);
  border: 1px solid var(--stroke); border-radius: 18px; padding: 26px; margin-bottom: 20px; }
.inp { width: 100%; background: rgba(255,255,255,.05); border: 1px solid var(--stroke2);
  border-radius: 12px; color: var(--text); padding: 13px 16px; outline: none; font-size: 15px; }
.inp:focus { border-color: var(--accent); }
.row-inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.msg { min-height: 20px; margin-top: 12px; font-size: 14px; }
.msg.err { color: #f06e76; } .msg.ok { color: #7ecf8c; }

/* таблицы админки */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--stroke2); }
.tbl th { color: var(--faint); font-weight: 600; text-transform: uppercase; font-size: 12px; }
.tbl .mini { padding: 6px 12px; font-size: 12px; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill.on { background: rgba(126,207,140,.16); color: #7ecf8c; }
.pill.off { background: rgba(240,110,118,.16); color: #f06e76; }
.keychip { font-family: monospace; background: rgba(154,92,255,.12); border: 1px solid var(--stroke); padding: 4px 10px; border-radius: 8px; }

/* ── адаптив ── */
@media (max-width: 900px) {
  .bento, .products { grid-template-columns: 1fr; }
  .bento .tall { grid-row: auto; }
  .hero h1 { font-size: 44px; }
  .nav-links { display: none; }
  .modal-grid { grid-template-columns: 1fr; }
  .cab { flex-direction: column; }
  .cab-side { width: auto; flex-direction: row; flex-wrap: wrap; }
  .side-foot { margin: 0; }
  .cab-main { padding: 24px; }
}

/* ── строка статистики на главной ── */
.statline {
  display: flex; gap: 26px; justify-content: center; flex-wrap: wrap;
  margin: 26px auto 0;
}
.statline .stat {
  display: flex; align-items: center; gap: 9px;
  background: var(--panel); border: 1px solid var(--stroke);
  padding: 10px 18px; border-radius: 999px; font-weight: 600;
}
.statline .stat b { color: var(--accent2); font-size: 18px; }
.statline .dot { width: 9px; height: 9px; border-radius: 50%; background: #58c96b; box-shadow: 0 0 10px #58c96b; }

/* ── прогресс/полоски (реф-система, дашборд) ── */
.mini-input { max-width: 88px; }

/* широкие карточки под таблицы админки — во всю ширину контента */
.panel-card.wide { max-width: none; }
#users-tbl { min-width: 1120px; }
#logins-tbl { min-width: 720px; }
#users-tbl td, #users-tbl th { vertical-align: middle; }
#users-tbl .row-inline { gap: 6px; flex-wrap: nowrap; }
#users-tbl td:last-child .row-inline { flex-wrap: wrap; max-width: 320px; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 14px; }
.metric { background: var(--panel); border: 1px solid var(--stroke); border-radius: var(--radius); padding: 18px; }
.metric .num { font-size: 30px; font-weight: 800; color: var(--accent2); }
.metric .lbl { color: var(--dim); font-size: 13px; margin-top: 4px; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 140px; padding-top: 10px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bars .bar .fill { width: 100%; background: linear-gradient(180deg, var(--accent2), var(--accent)); border-radius: 8px 8px 0 0; min-height: 3px; transition: height .4s; }
.bars .bar .cap { font-size: 11px; color: var(--faint); }
.bars .bar .cnt { font-size: 12px; color: var(--text); font-weight: 700; }
.refbox { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.refbox code { font-family: monospace; background: rgba(154,92,255,.12); border: 1px solid var(--stroke); padding: 8px 14px; border-radius: 10px; font-size: 15px; }

/* ── баннер объявления ── */
.announce-bar {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: #fff; text-align: center; font-weight: 600;
  padding: 10px 18px; font-size: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.35);
}
/* ── тикеты (переписка) ── */
.ticket-thread { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; max-height: 420px; overflow-y: auto; }
.tmsg { padding: 10px 14px; border-radius: 12px; max-width: 80%; border: 1px solid var(--stroke); }
.tmsg.user  { align-self: flex-start; background: var(--panel2); }
.tmsg.admin { align-self: flex-end; background: rgba(154,92,255,.18); }
.tmsg .who { font-size: 11px; color: var(--faint); margin-bottom: 3px; }
.expire-banner { background: rgba(240,110,118,.14); border: 1px solid rgba(240,110,118,.4); color: #f7a6ab; padding: 12px 16px; border-radius: var(--radius); margin-bottom: 18px; font-weight: 600; }

/* ── уведомления ── */
.notif-badge { display:inline-block; min-width:18px; height:18px; line-height:18px; text-align:center; padding:0 5px; border-radius:999px; background:#f0566e; color:#fff; font-size:11px; font-weight:700; margin-left:6px; }
.notif-item { padding:12px 14px; border:1px solid var(--stroke2); border-radius:12px; margin-bottom:10px; background:var(--panel2); }
.notif-item.unread { border-color:var(--accent); background:rgba(154,92,255,.10); }
.notif-item .notif-text { font-size:14px; }
.notif-item .notif-time { font-size:11px; color:var(--faint); margin-top:4px; }

/* ник в навбаре (вошедший пользователь) */
.btn-user {
  background: rgba(88,224,138,.14);
  color: #7ce6a0;
  border: 1px solid rgba(88,224,138,.5);
  font-weight: 700;
}
.btn-user:hover { background: rgba(88,224,138,.24); border-color: rgba(88,224,138,.8); }
