:root {
  --bg: #08101f;
  --panel: rgba(11, 23, 42, 0.72);
  --card: #101c33;
  --text: #f2f7ff;
  --muted: #b0bdd3;
  --line: rgba(214, 230, 255, 0.15);
  --brand: #2ed8a7;
  --brand-strong: #14b88a;
  --accent: #4ba3ff;
  --danger: #ff6f84;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(circle at 15% 10%, #17386c 0%, rgba(23, 56, 108, 0) 40%),
    radial-gradient(circle at 85% 90%, #0f7a67 0%, rgba(15, 122, 103, 0) 42%),
    var(--bg);
  color: var(--text);
  font-family: "Manrope", sans-serif;
  min-height: 100vh;
  position: relative;
}

.bg-glow {
  position: fixed;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.4;
  pointer-events: none;
  z-index: -2;
}

.bg-glow-1 {
  width: 320px;
  height: 320px;
  background: #3a6cf2;
  top: 0;
  right: 8%;
}

.bg-glow-2 {
  width: 380px;
  height: 380px;
  background: #1cc3a4;
  bottom: -80px;
  left: 3%;
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.site-header {
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  background: rgba(8, 16, 31, 0.65);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-wrap {
  min-height: 74px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.brand {
  font-family: "Sora", sans-serif;
  font-size: 1.04rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-links a {
  color: var(--text);
  opacity: 0.86;
  text-decoration: none;
  font-weight: 600;
}

.nav-links form {
  margin: 0;
}

.page-content {
  padding: 40px 0 64px;
}

.hero {
  padding-top: 26px;
  display: grid;
  gap: 24px;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
}

.kicker {
  color: var(--brand);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0 0 12px;
  text-transform: uppercase;
  font-size: 0.78rem;
}

h1,
h2,
h3 {
  font-family: "Sora", sans-serif;
  margin: 0;
}

.hero h1 {
  font-size: clamp(1.9rem, 2.9vw, 3.1rem);
  line-height: 1.1;
}

.hero-text {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.65;
  margin: 16px 0 26px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.glass {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  backdrop-filter: blur(8px);
}

.hero-card {
  padding: 26px;
}

.hero-card h2 {
  font-size: 1.2rem;
  margin-bottom: 14px;
}

.hero-card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.9;
}

.plans-section {
  margin-top: 50px;
}

.section-head h2 {
  font-size: 1.45rem;
}

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

.plans-grid {
  margin-top: 18px;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.plan-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  background: linear-gradient(145deg, rgba(16, 28, 51, 0.96), rgba(8, 16, 31, 0.95));
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan-featured {
  border-color: rgba(46, 216, 167, 0.6);
  box-shadow: 0 0 0 1px rgba(46, 216, 167, 0.2), 0 24px 36px -28px rgba(46, 216, 167, 0.7);
}

.plan-name {
  margin: 0;
  font-weight: 700;
  color: #d9e7ff;
}

.plan-data {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: 1.5rem;
}

.plan-price {
  margin: 0;
  font-weight: 700;
  color: var(--brand);
}

.plan-duration,
.plan-description {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.btn {
  border: none;
  border-radius: 12px;
  font-weight: 700;
  background: linear-gradient(120deg, var(--brand) 0%, var(--brand-strong) 100%);
  color: #05261f;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 11px 18px;
  transition: transform 0.2s ease, filter 0.2s ease;
}

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

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-small {
  padding: 8px 13px;
  font-size: 0.92rem;
}

.btn-full {
  width: 100%;
  margin-top: auto;
}

.auth-wrap {
  min-height: calc(100vh - 220px);
  display: grid;
  place-items: center;
}

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

.auth-card h1 {
  font-size: 1.62rem;
}

.auth-sub {
  color: var(--muted);
  margin: 10px 0 18px;
}

.alert-error {
  border-radius: 12px;
  background: rgba(255, 111, 132, 0.1);
  border: 1px solid rgba(255, 111, 132, 0.4);
  color: #ffc6d0;
  padding: 10px 12px;
  margin-bottom: 14px;
}

.alert {
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.alert-success {
  background: rgba(46, 216, 167, 0.12);
  border: 1px solid rgba(46, 216, 167, 0.45);
  color: #bbffe7;
}

.auth-form {
  display: grid;
  gap: 10px;
}

label {
  font-weight: 600;
  font-size: 0.95rem;
}

input {
  background: rgba(7, 14, 27, 0.95);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  font-size: 0.96rem;
}

input:focus {
  outline: none;
  border-color: rgba(75, 163, 255, 0.6);
  box-shadow: 0 0 0 2px rgba(75, 163, 255, 0.2);
}

.auth-alt {
  color: var(--muted);
  margin-top: 14px;
}

.auth-alt a {
  color: var(--accent);
}

.dashboard-wrap {
  display: grid;
  gap: 20px;
}

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

.usage-card {
  padding: 18px;
}

.usage-label {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.usage-card h3 {
  margin-top: 8px;
  font-size: 1.6rem;
}

.usage-card small {
  color: var(--muted);
}

.charts-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1.8fr;
}

.chart-card {
  padding: 20px;
}

.uri-card {
  padding: 20px;
}

.uri-text {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: rgba(5, 10, 20, 0.8);
  overflow-wrap: anywhere;
  color: #b9d9ff;
}

.plan-actions {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.redeem-form {
  display: grid;
  gap: 8px;
}

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

.admin-card {
  padding: 22px;
}

.admin-form {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

select {
  background: rgba(7, 14, 27, 0.95);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  font-size: 0.96rem;
}

.dashboard-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 24px;
}

.dashboard-head p {
  color: var(--muted);
  margin: 10px 0 0;
}

.active-badge {
  min-width: 260px;
  background: rgba(13, 31, 58, 0.85);
  border: 1px solid rgba(46, 216, 167, 0.4);
  border-radius: 16px;
  padding: 14px;
  display: grid;
  gap: 4px;
}

.active-badge span {
  color: var(--brand);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.active-badge.inactive {
  border-color: var(--line);
}

.history {
  margin-top: 4px;
  padding: 22px;
}

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

.table-wrap {
  overflow-x: auto;
  margin-top: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

th,
td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

th {
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #d5e1f5;
}

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

@media (max-width: 1080px) {
  .plans-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .charts-grid {
    grid-template-columns: 1fr;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }
}

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

  .site-header {
    position: static;
  }
}

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

  .usage-grid {
    grid-template-columns: 1fr;
  }

  .nav-wrap {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 0;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
  }

  .page-content {
    padding-top: 24px;
  }

  .auth-card,
  .dashboard-head,
  .history {
    padding: 18px;
  }

  .chart-card,
  .uri-card,
  .admin-card {
    padding: 18px;
  }
}
