:root {
  --bg: #f3f6fb;
  --panel: #ffffff;
  --ink: #07111f;
  --muted: #62728a;
  --line: #dce4ef;
  --blue: #3578f6;
  --blue-dark: #0f1b2f;
  --green: #0aa678;
  --red: #ef4444;
  --amber: #f0a000;
  --violet: #8b5cf6;
  --shadow: 0 12px 28px rgba(15, 27, 47, .08);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
}

a {
  color: inherit;
  text-decoration: none;
}

.public {
  background: #090f20;
  color: #f8fbff;
}

.public-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(18px, 5vw, 72px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(9,15,32,.93);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: .2px;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #15d4ff, #8b5cf6);
  color: #04111f;
  font-weight: 900;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #d8e1ef;
  font-weight: 700;
}

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

.hero {
  min-height: 76vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 44px;
  align-items: center;
  padding: 72px clamp(18px, 6vw, 96px) 44px;
}

.hero h1 {
  max-width: 780px;
  margin: 0 0 18px;
  font-size: clamp(40px, 7vw, 82px);
  line-height: .98;
  letter-spacing: 0;
}

.hero p {
  max-width: 660px;
  color: #aab8cf;
  font-size: 20px;
  line-height: 1.6;
}

.hero-panel {
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
  background: rgba(255,255,255,.05);
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,.28);
}

.step {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 18px;
  padding: 18px 0;
}

.step-no {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 999px;
  background: #16d8f4;
  color: #06101f;
  font-weight: 900;
}

.step:nth-child(2) .step-no {
  background: #8b5cf6;
  color: #fff;
}

.step:nth-child(3) .step-no {
  background: #d946ef;
  color: #fff;
}

.step h3 {
  margin: 0 0 6px;
  font-size: 22px;
}

.step p {
  margin: 0;
  color: #aab8cf;
  line-height: 1.5;
}

.section {
  padding: 56px clamp(18px, 6vw, 96px);
}

.section h2 {
  margin: 0 0 16px;
  font-size: 34px;
}

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

.public-card,
.admin-card,
.auth-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.public-card {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.12);
  padding: 24px;
  color: #f8fbff;
}

.public-card p {
  color: #aab8cf;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  padding: 10px 16px;
}

.btn.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.btn.danger {
  border-color: #fecaca;
  color: var(--red);
}

.btn.ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.2);
}

.btn.purple {
  background: linear-gradient(135deg, #8b5cf6, #d946ef);
  border: 0;
  color: #fff;
}

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

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

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 264px 1fr;
}

.sidebar {
  background: #0f1b2f;
  color: #eaf1fb;
  padding: 24px 0;
}

.sidebar .brand {
  padding: 0 22px 24px;
}

.side-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  color: #dbe7f6;
  font-weight: 800;
}

.side-link.active,
.side-link:hover {
  background: rgba(255,255,255,.08);
  border-left: 4px solid var(--blue);
  padding-left: 20px;
}

.side-link.logout {
  margin-top: 44px;
  color: #ff7474;
}

.main {
  padding: 36px 44px;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.page-head h1 {
  margin: 0 0 6px;
  font-size: 34px;
}

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

.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 26px;
}

.stat {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px;
}

.stat-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
}

.stat strong {
  display: block;
  font-size: 32px;
}

.stat span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .3px;
  text-transform: uppercase;
}

.admin-card {
  padding: 26px;
  margin-bottom: 26px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  background: #f5f7fb;
  color: #5f7088;
  font-size: 13px;
  letter-spacing: .4px;
  text-align: left;
  text-transform: uppercase;
}

.table th,
.table td {
  border-bottom: 1px solid var(--line);
  padding: 14px 12px;
  vertical-align: middle;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
}

.badge.green {
  background: #d1fae5;
  color: #047857;
}

.badge.red {
  background: #fee2e2;
  color: #b91c1c;
}

.badge.blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge.amber {
  background: #fef3c7;
  color: #92400e;
}

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

.form-grid.five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field label {
  color: #5f7088;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .3px;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 12px 14px;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

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

.flash {
  border-radius: 8px;
  margin-bottom: 18px;
  padding: 12px 14px;
  font-weight: 800;
}

.flash.success {
  background: #d1fae5;
  color: #047857;
}

.flash.error {
  background: #fee2e2;
  color: #b91c1c;
}

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

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

.plan-card {
  padding: 24px;
}

.plan-price {
  color: var(--blue);
  font-size: 38px;
  font-weight: 900;
}

.inline-form {
  display: inline;
}

@media (max-width: 1100px) {
  .hero,
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
  }
  .stats,
  .plans,
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .public-nav,
  .nav-links,
  .nav-actions,
  .page-head,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .hero {
    padding-top: 42px;
  }
  .main {
    padding: 24px 16px;
  }
  .stats,
  .plans,
  .grid,
  .form-grid,
  .form-grid.five {
    grid-template-columns: 1fr;
  }
  .table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
