:root {
  --bg: #0f1412;
  --bg-2: #1a2420;
  --surface: #f4f7f5;
  --ink: #122018;
  --muted: #5c6b63;
  --line: #d5e0da;
  --accent: #c6a15b;
  --accent-2: #e8c97a;
  --brand: #1f6b4a;
  --brand-dark: #0f3d2b;
  --danger: #b42318;
  --ok: #067647;
  --warn: #b54708;
  --shadow: 0 18px 50px rgba(15, 20, 18, 0.18);
  --radius: 18px;
  --font: "DM Sans", sans-serif;
  --display: "Bebas Neue", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(198, 161, 91, 0.18), transparent 55%),
    radial-gradient(900px 400px at 90% 0%, rgba(31, 107, 74, 0.12), transparent 50%),
    linear-gradient(180deg, #f7faf8 0%, #eef3f0 100%);
  min-height: 100vh;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
img { max-width: 100%; display: block; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: #eef5f0;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(247, 250, 248, 0.85);
  border-bottom: 1px solid rgba(213, 224, 218, 0.8);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--brand), var(--brand-dark));
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-family: var(--display);
  font-size: 1.45rem;
  letter-spacing: 0.04em;
}

.brand-text small {
  color: var(--muted);
  font-size: 0.78rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.nav a { color: var(--ink); font-weight: 500; }
.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  font-size: 1.4rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.9rem; }
.btn-block { width: 100%; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1a1408;
  box-shadow: 0 10px 24px rgba(198, 161, 91, 0.28);
}
.btn-ghost {
  background: transparent;
  border-color: rgba(18, 32, 24, 0.18);
  color: var(--ink);
}
.btn-danger {
  background: #fff1f0;
  color: var(--danger);
  border-color: #ffd4d1;
}

.hero {
  position: relative;
  min-height: calc(100vh - 72px);
  display: grid;
  align-items: center;
  overflow: hidden;
  color: #f6f3ea;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(15, 61, 43, 0.92), rgba(15, 20, 18, 0.78)),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c6a15b' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
    radial-gradient(circle at 70% 40%, #2f8f66, #0f1412 55%);
  animation: heroPulse 12s ease-in-out infinite alternate;
}

@keyframes heroPulse {
  from { filter: saturate(1); transform: scale(1); }
  to { filter: saturate(1.08); transform: scale(1.03); }
}

.hero-content {
  position: relative;
  padding: 4.5rem 0 5rem;
  max-width: 760px;
  animation: riseIn 0.8s ease both;
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--accent-2);
  margin: 0 0 1rem;
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(3.4rem, 9vw, 6.4rem);
  line-height: 0.92;
  margin: 0;
  letter-spacing: 0.03em;
}

.hero h1 span { color: var(--accent-2); }
.lead {
  max-width: 52ch;
  font-size: 1.08rem;
  line-height: 1.65;
  color: rgba(246, 243, 234, 0.86);
  margin: 1.25rem 0 1.75rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,0.35); }

.section { padding: 4.5rem 0; }
.section-alt { background: rgba(255,255,255,0.45); }
.section-title {
  font-family: var(--display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  letter-spacing: 0.04em;
  margin: 0 0 0.4rem;
}
.section-sub { color: var(--muted); margin: 0 0 2rem; max-width: 50ch; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.feature-grid article,
.panel {
  background: rgba(255,255,255,0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow);
}

.feature-grid h3 { margin: 0 0 0.5rem; }
.feature-grid p { margin: 0; color: var(--muted); line-height: 1.55; }

.product-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
}

.product-strip div {
  background: var(--bg-2);
  color: #f4f7f5;
  border-radius: 14px;
  padding: 1.4rem 1rem;
  text-align: center;
  font-weight: 600;
  animation: fadeUp 0.7s ease both;
}

.product-strip div:nth-child(2) { animation-delay: 0.08s; }
.product-strip div:nth-child(3) { animation-delay: 0.16s; }
.product-strip div:nth-child(4) { animation-delay: 0.24s; }
.product-strip div:nth-child(5) { animation-delay: 0.32s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.cta-band .cta-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, var(--brand-dark), #184f38);
  color: #fff;
  border-radius: 24px;
  padding: 2rem;
}

.cta-band h2 { margin: 0 0 0.4rem; font-family: var(--display); letter-spacing: 0.04em; font-size: 2.4rem; }
.cta-band p { margin: 0; color: rgba(255,255,255,0.8); }

.site-footer {
  margin-top: 2rem;
  background: var(--bg);
  color: #dce6e0;
  padding: 2.5rem 0 1.5rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.footer-links a { color: #fff; }
.copyright { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 1rem; color: #8a9a92; font-size: 0.9rem; }

.flash {
  padding: 0.85rem 0;
  font-weight: 500;
}
.flash-success { background: #e8f8ef; color: var(--ok); }
.flash-error { background: #fff1f0; color: var(--danger); }

.auth-section { min-height: calc(100vh - 180px); display: grid; align-items: center; }
.auth-wrap { display: grid; place-items: center; }
.auth-card {
  width: min(440px, 100%);
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: var(--shadow);
  animation: riseIn 0.55s ease both;
}
.auth-card h1 { margin: 0 0 0.35rem; font-size: 1.8rem; }
.muted { color: var(--muted); }
.hint { font-size: 0.85rem; color: var(--muted); margin-top: 1rem; }
.auth-footer { margin-top: 1.25rem; text-align: center; }

.form { display: grid; gap: 0.9rem; margin-top: 1.25rem; }
.form label { display: grid; gap: 0.35rem; font-weight: 600; font-size: 0.92rem; }
.form input, .form select, .search-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  font: inherit;
  background: #fff;
}
.form input:focus, .form select:focus {
  outline: 2px solid rgba(31, 107, 74, 0.25);
  border-color: var(--brand);
}

.auth-step { display: none; }
.auth-step.is-active { display: block; }
.otp-hint {
  min-height: 1.4rem;
  color: var(--brand-dark);
  font-weight: 600;
  margin: 0;
}
.link-btn {
  border: 0;
  background: transparent;
  color: var(--brand);
  cursor: pointer;
  font: inherit;
  padding: 0.4rem;
}

.alert { padding: 0.75rem 0.9rem; border-radius: 12px; margin-top: 1rem; }
.alert-error { background: #fff1f0; color: var(--danger); }

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.page-head h1 { margin: 0; }

.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 1rem;
}

.kv { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.kv li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 0.55rem;
}
.kv span { color: var(--muted); }

.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
th, td {
  text-align: left;
  padding: 0.75rem 0.55rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
th { color: var(--muted); font-weight: 600; }

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: capitalize;
}
.badge-active, .badge-success { background: #e8f8ef; color: var(--ok); }
.badge-inactive { background: #fff7e8; color: var(--warn); }
.badge-blocked, .badge-failed { background: #fff1f0; color: var(--danger); }

/* Admin */
.admin-body {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
  background: #eef3f0;
}
.admin-sidebar {
  background: linear-gradient(180deg, #10261c, #0f1412);
  color: #fff;
  padding: 1.25rem 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
}
.admin-brand { margin-bottom: 1.5rem; color: #fff; }
.admin-brand .brand-text small { color: rgba(255,255,255,0.65); }
.admin-sidebar nav { display: grid; gap: 0.35rem; }
.admin-sidebar a {
  color: rgba(255,255,255,0.82);
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  font-weight: 500;
}
.admin-sidebar a:hover,
.admin-sidebar a.active {
  background: rgba(198, 161, 91, 0.18);
  color: #fff;
}
.admin-main { min-width: 0; }
.admin-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.5rem;
  background: rgba(255,255,255,0.7);
  border-bottom: 1px solid var(--line);
}
.admin-top h1 { margin: 0; font-size: 1.4rem; }
.admin-content { padding: 1.25rem 1.5rem 2rem; display: grid; gap: 1rem; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.1rem;
  box-shadow: var(--shadow);
}
.stat span { color: var(--muted); display: block; margin-bottom: 0.35rem; }
.stat strong { font-size: 1.8rem; font-family: var(--display); letter-spacing: 0.04em; }

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.panel-head h2 { margin: 0; font-size: 1.15rem; }

.form-inline {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.6rem;
}
.form-stack { max-width: 480px; }
.actions { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.inline { display: inline; margin: 0; }
.search-form { display: flex; gap: 0.4rem; }
.row-live { background: #f3fbf6; }
.otp-code { font-size: 1rem; font-weight: 700; color: var(--brand-dark); }

@media (max-width: 960px) {
  .feature-grid,
  .product-strip,
  .dash-grid,
  .stat-grid,
  .form-inline {
    grid-template-columns: 1fr 1fr;
  }
  .admin-body { grid-template-columns: 1fr; }
  .admin-sidebar { position: relative; height: auto; }
  .nav { display: none; }
  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    right: 1rem;
    top: 72px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.8rem;
    box-shadow: var(--shadow);
  }
  .nav-toggle { display: inline-block; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .footer-inner { flex-direction: column; }
}

@media (max-width: 640px) {
  .feature-grid,
  .product-strip,
  .dash-grid,
  .stat-grid,
  .form-inline {
    grid-template-columns: 1fr;
  }
  .hero { min-height: auto; }
  .hero-content { padding: 3rem 0; }
}
