@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --ink: #0f172a;
  --muted: #64748b;
  --line: #dbeafe;
  --panel: #ffffff;
  --soft: #f8fafc;
  --brand: #0891b2;
  --brand-2: #22c55e;
  --accent: #4f46e5;
  --danger: #dc2626;
  --ok: #047857;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #ecfeff 0%, #f8fafc 38%, #eef2ff 100%);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 800;
  font-size: 1.1rem;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 999px;
}

nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.8rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.nav-name {
  color: var(--ink);
}

main {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.button,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.75rem 1.1rem;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(8, 145, 178, 0.22);
}

.button.large {
  min-height: 50px;
  padding-inline: 1.4rem;
}

.button.ghost {
  background: #fff;
  color: var(--brand);
  border: 1px solid var(--line);
  box-shadow: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 2rem;
  align-items: center;
  min-height: 70vh;
}

.eyebrow {
  display: inline-flex;
  margin: 0 0 1rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid #a7f3d0;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(2.4rem, 7vw, 5.4rem);
  line-height: 1;
  letter-spacing: 0;
}

h2,
h3 {
  margin: 0 0 0.75rem;
}

.lead {
  max-width: 660px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.7;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.panel,
.auth-card,
.feature-grid article,
.bundle-card,
.stats-panel {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.stats-panel {
  display: grid;
  gap: 1rem;
  padding: 1.2rem;
}

.stats-panel div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-radius: 8px;
  background: linear-gradient(135deg, #f0f9ff, #ecfdf5);
}

.stats-panel strong {
  font-size: 2rem;
  color: var(--accent);
}

.stats-panel span {
  color: var(--muted);
  font-weight: 800;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.feature-grid article,
.panel,
.auth-card {
  padding: 1.4rem;
}

.feature-grid p,
.page-head p,
.auth-card p {
  color: var(--muted);
  line-height: 1.65;
}

.page-head {
  margin-bottom: 1.2rem;
}

.page-head h1 {
  font-size: clamp(2rem, 5vw, 3.8rem);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0 1.4rem;
}

.tabs a {
  padding: 0.7rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-weight: 800;
}

.tabs a.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.bundle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.bundle-card {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  text-align: center;
}

.bundle-card span {
  justify-self: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.72rem;
  font-weight: 900;
}

.bundle-card strong {
  font-size: 2rem;
}

.bundle-card b {
  color: var(--accent);
  font-size: 1.25rem;
}

.auth-card {
  width: min(520px, 100%);
  margin: 2rem auto;
}

form {
  display: grid;
  gap: 1rem;
}

label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

input {
  width: 100%;
  min-height: 48px;
  padding: 0.85rem 0.95rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

select {
  min-height: 42px;
  padding: 0.65rem 0.8rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.button.compact {
  min-height: 38px;
  padding: 0.55rem 0.8rem;
  box-shadow: none;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-stats article {
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #fff, #eff6ff);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.admin-stats span {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-stats strong {
  display: block;
  font-size: clamp(1.4rem, 2vw, 2rem);
}

.admin-section {
  margin-top: 1rem;
}

.inline-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.small-input {
  width: 92px;
  min-height: 42px;
}

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

dialog {
  width: min(520px, calc(100% - 2rem));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.62);
}

.modal-form {
  padding: 1.4rem;
}

.flash {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border-radius: 8px;
  font-weight: 800;
}

.flash.success {
  background: #dcfce7;
  color: var(--ok);
}

.flash.error {
  background: #fee2e2;
  color: var(--danger);
}

.table-wrap {
  overflow-x: auto;
}

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

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

th {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.status {
  display: inline-flex;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--accent);
  font-weight: 900;
  font-size: 0.78rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem clamp(1rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 820px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    justify-content: flex-start;
  }

  .hero,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .admin-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .inline-form {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .admin-stats {
    grid-template-columns: 1fr;
  }
}
