:root {
  --bg: #050505;
  --bg-soft: #111114;
  --panel: rgba(18, 18, 22, 0.92);
  --panel-soft: rgba(255, 255, 255, 0.03);
  --line: rgba(255, 255, 255, 0.08);
  --text: #f6f6f8;
  --muted: #b7b7c0;
  --red: #ff404f;
  --red-soft: rgba(255, 64, 79, 0.16);
  --green: #2bd576;
  --green-soft: rgba(43, 213, 118, 0.16);
  --orange: #ffb84d;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top center, rgba(255, 64, 79, 0.16), transparent 26%),
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 72px 72px, 72px 72px, auto;
  min-height: 100vh;
}

.page-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 80% 10%, rgba(255, 64, 79, 0.12), transparent 20%);
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.shell {
  width: min(1360px, calc(100% - 96px));
  margin: 0 auto;
}

.main-shell {
  padding: 24px 0 80px;
}

.site-header,
.site-footer {
  position: relative;
  z-index: 2;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0;
  position: sticky;
  top: 0;
  backdrop-filter: blur(16px);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 8px -24px;
  border-radius: 999px;
  background: rgba(10, 10, 12, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.05);
  z-index: -1;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 800;
  color: white;
  background: linear-gradient(135deg, #ff6975, #b80d24);
  box-shadow: 0 18px 48px rgba(255, 64, 79, 0.24);
}

.brand-title,
.brand-sub {
  display: block;
}

.brand-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.brand-sub {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.top-nav,
.header-actions,
.hero-actions,
.stack-actions,
.table-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-nav {
  padding: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
}

.top-nav a {
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--muted);
  transition: 220ms ease;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  color: white;
  background: var(--red-soft);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.primary-button,
.ghost-button {
  min-height: 54px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
  transition: 220ms ease;
  cursor: pointer;
}

.small {
  min-height: 44px;
  padding: 0 18px;
  font-size: 14px;
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, #ff5c69, #be0f29);
  box-shadow: 0 16px 50px rgba(255, 64, 79, 0.22);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.full-width {
  width: 100%;
}

.hero,
.section-block,
.glass-card,
.pricing-card,
.timeline-card,
.faq-item,
.stat-card,
.order-card,
.auth-card,
.flash,
.notice-box,
.summary-box,
.hero-panel,
.addon-banner {
  box-shadow: var(--shadow);
}

.section-block {
  margin-top: 28px;
}

.split-layout,
.checkout-grid,
.success-grid,
.admin-grid {
  display: grid;
  gap: 24px;
}

.split-layout {
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  min-height: 70vh;
}

.slim-gap {
  gap: 20px;
}

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

.hero h1,
.section-head h2,
.auth-card h1,
.glass-card h2,
.success-card h1,
.checkout-grid h1,
.dashboard-title,
.admin-grid h2 {
  margin: 0;
  letter-spacing: -0.05em;
}

.hero h1 {
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.94;
  max-width: 12ch;
}

.lead {
  margin: 20px 0 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.small-lead {
  font-size: 16px;
  margin-top: 14px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 64, 79, 0.1);
  border: 1px solid rgba(255, 64, 79, 0.22);
  color: #ffd9dd;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow.subtle {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.eyebrow.success {
  background: var(--green-soft);
  border-color: rgba(43, 213, 118, 0.28);
  color: #c9ffe1;
}

.hero-actions,
.stack-actions {
  margin-top: 28px;
  flex-wrap: wrap;
}

.hero-panel,
.glass-card,
.pricing-card,
.timeline-card,
.faq-item,
.auth-card,
.empty-state,
.notice-box,
.summary-box,
.addon-banner,
.stat-card,
.flash {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.hero-panel,
.glass-card,
.auth-card,
.notice-box {
  padding: 28px;
}

.panel-label,
.card-badge {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.feature-list {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.feature-list li {
  position: relative;
  padding-left: 24px;
  color: var(--muted);
  line-height: 1.55;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff6671, #b40d22);
}

.tight {
  gap: 10px;
}

.stats-grid,
.pricing-grid,
.timeline-grid,
.faq-list,
.orders-grid {
  display: grid;
  gap: 18px;
}

.stats-grid {
  margin-top: 28px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

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

.stat-card {
  padding: 22px;
  display: grid;
  gap: 8px;
  text-align: center;
}

.left-aligned {
  text-align: left;
}

.stat-card strong {
  font-size: 28px;
}

.stat-card span {
  color: var(--muted);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.section-head p {
  margin: 14px 0 0;
  color: var(--muted);
  max-width: 760px;
}

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

.pricing-card {
  padding: 24px;
  display: grid;
  gap: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015));
}

.pricing-card.featured {
  border-color: rgba(255, 64, 79, 0.38);
  background: linear-gradient(180deg, rgba(255, 64, 79, 0.1), rgba(255,255,255,0.02));
}

.card-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.card-top h3,
.timeline-card h3,
.faq-item h3,
.order-card h3,
.glass-card h2,
.hero-panel h3,
.auth-card h1 {
  margin: 14px 0 0;
}

.card-top p,
.timeline-card p,
.faq-item p,
.glass-card p,
.auth-card p,
.notice-box p,
.order-card p,
.hero-panel p {
  color: var(--muted);
  line-height: 1.65;
}

.price-block {
  text-align: right;
}

.price-block strong {
  display: block;
  font-size: 28px;
}

.price-block span {
  color: var(--muted);
  font-size: 14px;
}

.addon-banner {
  margin-top: 18px;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.timeline-card {
  padding: 24px;
}

.timeline-card span {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--red-soft);
  color: white;
  font-weight: 800;
}

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

.faq-item {
  padding: 24px;
}

.flash-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.flash {
  padding: 14px 18px;
}

.flash.success {
  border-color: rgba(43, 213, 118, 0.28);
  background: rgba(43, 213, 118, 0.09);
}

.flash.warning {
  border-color: rgba(255, 184, 77, 0.28);
  background: rgba(255, 184, 77, 0.08);
}

.flash.danger {
  border-color: rgba(255, 64, 79, 0.28);
  background: rgba(255, 64, 79, 0.08);
}

.flash.info {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

.auth-wrap {
  min-height: 72vh;
  display: grid;
  place-items: center;
}

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

.form-grid {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

label {
  display: grid;
  gap: 10px;
}

label > span {
  font-size: 14px;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  min-height: 54px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 0 16px;
  outline: none;
  color-scheme: dark;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 52px;
  cursor: pointer;
  background-image:
    linear-gradient(135deg, transparent 50%, rgba(255, 255, 255, 0.72) 50%),
    linear-gradient(45deg, rgba(255, 255, 255, 0.72) 50%, transparent 50%);
  background-position:
    calc(100% - 24px) calc(50% - 3px),
    calc(100% - 18px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

select:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

select option,
select optgroup {
  background: #111114;
  color: #f6f6f8;
}

select option:checked {
  background: #1d335d;
  color: #ffffff;
}

select option:disabled {
  color: rgba(255, 255, 255, 0.38);
}

input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

textarea {
  min-height: 140px;
  padding: 16px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(255, 64, 79, 0.45);
  box-shadow: 0 0 0 4px rgba(255, 64, 79, 0.12);
}

.checkbox-row {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  min-height: auto;
}

.summary-box {
  margin-top: 18px;
  padding: 18px 20px;
  display: grid;
  gap: 14px;
}

.large-gap {
  gap: 18px;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.summary-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.summary-row span {
  color: var(--muted);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.status-chip.pending {
  color: #ffe3b8;
  background: rgba(255, 184, 77, 0.12);
  border-color: rgba(255, 184, 77, 0.24);
}

.status-chip.paid {
  color: #cbffe3;
  background: rgba(43, 213, 118, 0.12);
  border-color: rgba(43, 213, 118, 0.24);
}

.success-card {
  max-width: 820px;
}

.key-box {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
}

.notice-box {
  margin-top: 22px;
}

.danger-soft {
  background: rgba(255, 64, 79, 0.1);
  border-color: rgba(255, 64, 79, 0.22);
}

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

.order-card {
  padding: 24px;
}

.order-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.empty-state {
  padding: 32px;
  text-align: center;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.03);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.admin-table th,
.admin-table td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-table th {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.fine-print {
  color: var(--muted);
  margin-top: 18px;
}

.field-hint {
  margin-top: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.48);
  line-height: 1.5;
}

.key-count-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.fine-print a {
  color: white;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 30px 0 56px;
  color: var(--muted);
}

.site-footer p {
  margin: 8px 0 0;
}

@media (max-width: 1180px) {
  .split-layout,
  .checkout-grid,
  .success-grid,
  .admin-grid,
  .pricing-grid,
  .timeline-grid,
  .orders-grid,
  .compact-4 {
    grid-template-columns: 1fr 1fr;
  }

  .top-nav {
    display: none;
  }
}

@media (max-width: 860px) {
  .shell {
    width: min(100% - 28px, 1360px);
  }

  .site-header {
    gap: 14px;
    flex-wrap: wrap;
  }

  .site-header::before {
    inset: 4px -6px;
    border-radius: 28px;
  }

  .header-actions,
  .site-footer,
  .stats-grid,
  .compact-3,
  .faq-list,
  .split-layout,
  .checkout-grid,
  .success-grid,
  .admin-grid,
  .pricing-grid,
  .timeline-grid,
  .orders-grid,
  .compact-4 {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: clamp(34px, 12vw, 54px);
    max-width: none;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .addon-banner,
  .card-top,
  .summary-row,
  .site-footer {
    flex-direction: column;
    align-items: start;
  }

  .price-block {
    text-align: left;
  }

  .summary-row strong,
  .summary-row a {
    width: 100%;
  }
}

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

.key-inline {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: inline-flex;
  max-width: 100%;
  word-break: break-all;
}

.admin-table form {
  margin: 0;
}


.admin-head {
  align-items: end;
  gap: 18px;
}

.toolbar-form {
  width: min(520px, 100%);
  display: grid;
  gap: 12px;
}

.admin-grid-3 {
  grid-template-columns: 0.8fr 1.2fr;
}

.wide-card {
  min-width: 0;
}

.pricing-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.price-edit-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.price-edit-card strong {
  font-size: 18px;
}

.addon-price-card {
  border-color: rgba(255, 64, 79, 0.2);
  background: rgba(255, 64, 79, 0.06);
}

.compact-list {
  gap: 10px;
}

.stock-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.stock-chip.ok {
  color: #cbffe3;
  background: rgba(43, 213, 118, 0.12);
  border-color: rgba(43, 213, 118, 0.24);
}

.stock-chip.warn {
  color: #ffe3b8;
  background: rgba(255, 184, 77, 0.12);
  border-color: rgba(255, 184, 77, 0.24);
}

.stock-chip.danger {
  color: #ffd9dd;
  background: rgba(255, 64, 79, 0.12);
  border-color: rgba(255, 64, 79, 0.24);
}

.stock-warn {
  border-color: rgba(255, 184, 77, 0.2);
}

.stock-danger {
  border-color: rgba(255, 64, 79, 0.24);
}

@media (max-width: 1180px) {
  .admin-grid-3,
  .pricing-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .admin-head {
    align-items: start;
  }

  .toolbar-form {
    width: 100%;
  }
}
