:root {
  --bg: #070c1d;
  --bg-soft: #0f1731;
  --panel: rgba(19, 33, 73, 0.65);
  --panel-solid: #121f45;
  --panel-admin: #1c1c1f;
  --line: rgba(113, 166, 255, 0.28);
  --line-soft: rgba(255, 255, 255, 0.12);
  --text: #eef4ff;
  --muted: #9eb0d7;
  --primary: #35c2ff;
  --primary-2: #4c6bff;
  --success: #40dd97;
  --danger: #ff6e78;
  --warning: #ffb257;
  --radius: 18px;
  --shadow: 0 20px 48px rgba(3, 8, 24, 0.42);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 900px at 100% -20%, rgba(61, 131, 255, 0.26) 0%, rgba(61, 131, 255, 0) 52%),
    radial-gradient(900px 600px at -10% 110%, rgba(0, 214, 255, 0.22) 0%, rgba(0, 214, 255, 0) 55%),
    linear-gradient(180deg, #060b1a, #08102a 40%, #070d20);
}

a {
  color: inherit;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
}

.logo {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.logo span {
  color: var(--primary);
}

.logo-center {
  display: inline-block;
  margin: 0 auto 8px;
}

.admin-logo span {
  color: #ffc447;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(4, 8, 21, 0.62);
  backdrop-filter: blur(14px);
}

.site-nav.compact {
  position: static;
  border-bottom: none;
  background: transparent;
  padding: 8px 0 20px;
}

.top-links {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 14px;
}

.top-links a {
  text-decoration: none;
  color: var(--muted);
}

.top-links a:hover {
  color: var(--text);
}

.burger {
  display: none;
  border: none;
  background: transparent;
  padding: 0;
}

.burger span {
  width: 22px;
  height: 2px;
  background: var(--text);
  display: block;
  margin: 4px 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  text-decoration: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 14px;
  transition: 0.2s ease;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-sm {
  font-size: 12px;
  padding: 8px 12px;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-primary {
  color: #071224;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border-color: rgba(180, 223, 255, 0.8);
}

.btn-primary:hover {
  filter: brightness(1.07);
}

.btn-outline {
  border-color: rgba(140, 190, 255, 0.55);
  color: #d8ebff;
  background: rgba(19, 35, 72, 0.35);
}

.btn-outline:hover {
  border-color: rgba(175, 211, 255, 0.9);
}

.container {
  width: min(1150px, calc(100% - 32px));
  margin: 0 auto;
}

.page {
  padding-bottom: 60px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 78vh;
  display: grid;
  place-items: center;
  padding: 88px 24px 40px;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(880px, 100%);
  text-align: center;
}

.hero h1 {
  margin: 8px 0 12px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(36px, 7vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.hero h1 span {
  color: #78d6ff;
}

.hero-sub {
  margin: 0 auto;
  width: min(650px, 100%);
  font-size: 18px;
  color: var(--muted);
}

.hero-badge {
  display: inline-flex;
  padding: 7px 14px;
  border-radius: 99px;
  background: rgba(67, 136, 255, 0.18);
  border: 1px solid rgba(145, 197, 255, 0.45);
  font-size: 13px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 26px 0;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.hero-stats article {
  border: 1px solid var(--line);
  background: rgba(18, 32, 67, 0.46);
  border-radius: 12px;
  padding: 14px 10px;
}

.hero-stats strong {
  display: block;
  font-size: 22px;
}

.hero-stats span {
  color: var(--muted);
  font-size: 13px;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
}

.hero-glow-a {
  width: 430px;
  height: 430px;
  left: -130px;
  top: 10%;
  background: rgba(58, 203, 255, 0.34);
}

.hero-glow-b {
  width: 560px;
  height: 560px;
  right: -160px;
  top: -120px;
  background: rgba(101, 89, 255, 0.28);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at center, #000 32%, transparent 100%);
}

.section {
  padding: 74px 0;
}

.section-dark {
  background: rgba(8, 15, 33, 0.45);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.section-head {
  width: min(740px, 100%);
  margin: 0 auto 26px;
  text-align: center;
}

.section-head h2 {
  margin: 0 0 10px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(27px, 4vw, 40px);
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.feature-grid,
.apps-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  width: min(1150px, calc(100% - 32px));
  margin: 0 auto;
}

.tariff-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  width: min(1150px, calc(100% - 32px));
  margin: 0 auto;
}

.tariff-grid.small {
  width: 100%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background: var(--panel);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.feature-card,
.app-card {
  padding: 18px;
}

.feature-card h3,
.app-card strong {
  margin: 0 0 10px;
  font-size: 18px;
}

.feature-card p,
.app-card span {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.app-card {
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.app-card:hover {
  transform: translateY(-3px);
  border-color: rgba(137, 188, 255, 0.68);
}

.tariff-card {
  position: relative;
  padding: 18px;
}

.tariff-card h3 {
  margin: 4px 0 6px;
  font-size: 20px;
}

.tariff-card .old {
  margin: 0;
  text-decoration: line-through;
  color: #89a1cb;
  font-size: 13px;
}

.tariff-card .price {
  margin: 5px 0 12px;
  font-size: 33px;
  font-family: "Space Grotesk", sans-serif;
}

.tariff-card .price small {
  font-size: 17px;
}

.tariff-card ul {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.tariff-card ul li {
  color: var(--muted);
  font-size: 13px;
  margin: 4px 0;
}

.tariff-hot {
  border-color: rgba(126, 209, 255, 0.78);
}

.chip {
  position: absolute;
  top: -11px;
  right: 12px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11px;
  background: #4be0ff;
  color: #022136;
  font-weight: 800;
}

.chip-gold {
  background: #ffd271;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  padding: 20px 16px 34px;
}

.site-footer a {
  color: #bdd5ff;
  margin-left: 10px;
  text-decoration: none;
}

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px 16px;
}

.auth-card {
  width: min(460px, 100%);
  padding: 30px;
}

.auth-card h1 {
  margin: 6px 0 6px;
  font-size: 27px;
}

.field {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.field span {
  color: var(--muted);
  font-size: 13px;
}

input,
select {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(168, 196, 255, 0.33);
  background: rgba(15, 28, 62, 0.72);
  color: var(--text);
  padding: 12px;
  font-size: 15px;
}

input:focus,
select:focus {
  outline: 2px solid rgba(76, 174, 255, 0.38);
}

.phone-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.phone-row i {
  font-style: normal;
  color: #7fbbff;
  font-weight: 800;
}

.hint {
  margin: 6px 0;
  font-size: 13px;
  color: #d8c8ff;
}

.error {
  margin: 9px 0 0;
  display: none;
  color: var(--danger);
  font-size: 14px;
}

.auth-bottom {
  margin-top: 14px;
  text-align: center;
}

.auth-bottom a {
  color: #b4d2ff;
  text-decoration: none;
  font-size: 13px;
}

.panel {
  padding: 22px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.panel h1,
.panel h2,
.panel h3 {
  margin: 0 0 8px;
}

.balance-box {
  border: 1px solid rgba(97, 196, 255, 0.5);
  border-radius: 14px;
  padding: 12px 16px;
  background: rgba(31, 67, 125, 0.5);
}

.balance-box span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.balance-box strong {
  font-size: 30px;
  font-family: "Space Grotesk", sans-serif;
}

.section-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.sub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.sub-card {
  padding: 16px;
}

.sub-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.sub-links {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.status {
  border-radius: 99px;
  padding: 4px 10px;
  font-size: 11px;
  border: 1px solid transparent;
}

.status-active {
  color: var(--success);
  border-color: rgba(82, 245, 172, 0.5);
}

.status-expired {
  color: var(--danger);
  border-color: rgba(255, 110, 120, 0.52);
}

.status-revoked {
  color: var(--warning);
  border-color: rgba(255, 178, 87, 0.56);
}

.empty-box {
  border: 1px dashed rgba(188, 208, 255, 0.4);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
}

.tariff-card-mini {
  padding: 14px;
}

.tariff-card-mini .old {
  color: #8ca2cb;
  margin: 0;
  text-decoration: line-through;
  font-size: 12px;
}

.tariff-card-mini .price {
  margin: 6px 0 12px;
  font-size: 26px;
  font-family: "Space Grotesk", sans-serif;
}

.row-2,
.row-3,
.row-actions {
  display: grid;
  gap: 8px;
}

.row-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.row-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.row-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.table-wrap {
  overflow: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 730px;
  font-size: 14px;
}

.table thead th {
  text-align: left;
  color: var(--muted);
  font-weight: 600;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.table tbody td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pay-panel {
  width: min(760px, 100%);
  margin: 0 auto;
}

.pay-amount {
  margin: 4px 0 20px;
  font-size: 40px;
  font-family: "Space Grotesk", sans-serif;
}

.pay-method {
  padding: 14px;
  margin-bottom: 10px;
}

.copy-box {
  width: 100%;
  border: 1px solid rgba(145, 184, 255, 0.5);
  border-radius: 12px;
  padding: 10px;
  background: rgba(14, 30, 69, 0.66);
  color: #d8ebff;
  font-size: 16px;
  font-family: "Space Grotesk", sans-serif;
  cursor: pointer;
}

.admin-page {
  background:
    radial-gradient(900px 700px at 120% -10%, rgba(255, 185, 74, 0.12), transparent 56%),
    radial-gradient(900px 600px at -20% 120%, rgba(255, 116, 68, 0.14), transparent 56%),
    linear-gradient(180deg, #101015, #171720 42%, #15151d);
}

.admin-page .panel {
  background: rgba(33, 33, 40, 0.9);
  border-color: rgba(255, 255, 255, 0.09);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.stat-box {
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.stat-box span {
  color: var(--muted);
  font-size: 12px;
}

.stat-box strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
  font-family: "Space Grotesk", sans-serif;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

.tab {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.02);
  color: #d6d6dc;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
}

.tab.active {
  border-color: rgba(255, 200, 108, 0.6);
  color: #ffd07f;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 14px;
  background: rgba(3, 3, 8, 0.67);
  z-index: 80;
}

.modal-overlay.open {
  display: grid;
}

.modal {
  width: min(560px, 100%);
  padding: 18px;
}

.checkline {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}

.checkline input {
  width: auto;
}

.toast-wrap {
  position: fixed;
  right: 12px;
  top: 12px;
  display: grid;
  gap: 8px;
  z-index: 120;
}

.toast {
  border-radius: 10px;
  padding: 10px 13px;
  font-weight: 700;
  color: #050b1d;
}

.toast.info {
  background: #89c3ff;
}

.toast.success {
  background: #60f2b5;
}

.toast.error {
  background: #ff8c95;
}

.install-fab {
  position: fixed;
  left: 12px;
  bottom: 14px;
  z-index: 60;
  border: 1px solid rgba(180, 218, 255, 0.8);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 800;
  background: linear-gradient(135deg, #7ce0ff, #90a3ff);
  color: #071229;
  box-shadow: 0 16px 30px rgba(6, 9, 26, 0.4);
}

@media (max-width: 1000px) {
  .feature-grid,
  .apps-grid,
  .tariff-grid,
  .tariff-grid.small,
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sub-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .burger {
    display: block;
  }

  .top-links {
    display: none;
  }

  .top-links.open {
    display: grid;
    position: absolute;
    right: 10px;
    top: 64px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(17, 30, 68, 0.95);
    border: 1px solid rgba(151, 197, 255, 0.33);
  }

  .hero-stats,
  .feature-grid,
  .apps-grid,
  .tariff-grid,
  .tariff-grid.small,
  .row-2,
  .row-3,
  .row-actions,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 16px;
  }

  .site-footer {
    justify-content: center;
    text-align: center;
  }
}
