:root {
  --bg: #12161b;
  --panel: #1a2128;
  --text: #f3f4f6;
  --muted: #aab4bf;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #ff8c1a;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 140, 26, 0.18), transparent 25%),
    linear-gradient(180deg, #0f1418 0%, #161c22 50%, #0f1418 100%);
  color: var(--text);
}

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

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

.site-header .container,
.hero-card,
.wizard-actions,
.action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
}

h1, h2, h3 {
  margin: 0 0 12px;
  line-height: 1.1;
}

p {
  color: var(--muted);
  line-height: 1.65;
}

.header-link,
.btn {
  border-radius: 999px;
  padding: 14px 22px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  cursor: pointer;
}

.header-link,
.btn-secondary {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--line);
}

.btn-primary {
  background: var(--accent);
  color: #1b1208;
}

.btn:hover,
.header-link:hover {
  transform: translateY(-1px);
}

.configurator-shell,
.admin-grid,
.narrow {
  padding: 32px 0 56px;
}

.hero-card,
.wizard-card,
.summary-card,
.admin-panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 32px;
  margin-bottom: 28px;
}

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

.hero-badges span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.configurator-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.8fr);
  gap: 24px;
}

.admin-grid {
  display: grid;
  gap: 24px;
}

.admin-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.admin-user-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-user-name {
  color: var(--muted);
  font-weight: 600;
}

.admin-nav {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.admin-nav-links {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  flex-wrap: wrap;
}

.admin-nav-links a {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.wizard-card,
.summary-card,
.admin-panel {
  padding: 28px;
}

.summary-card {
  position: sticky;
  top: 120px;
  height: fit-content;
}

.progress-block { margin-bottom: 24px; }

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--muted);
}

.progress-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  width: 12.5%;
  background: linear-gradient(90deg, var(--accent), #ffc06b);
  transition: width 0.25s ease;
}

.wizard-step { display: none; }
.wizard-step.active { display: block; }

.option-grid,
.field-grid,
.stat-grid {
  display: grid;
  gap: 16px;
}

.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-span-2 { grid-column: span 2; }

label span {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 14px 16px;
  font: inherit;
}

.select-card {
  position: relative;
  display: block;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.025);
  min-height: 134px;
}

.select-card input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.select-card:has(input:checked) {
  border-color: rgba(255, 140, 26, 0.75);
  background: rgba(255, 140, 26, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 140, 26, 0.35);
}

.card-title {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.card-text,
.card-price,
.summary-note,
small {
  color: var(--muted);
}

.price-stack {
  display: grid;
  gap: 4px;
  margin: 18px 0 22px;
}

.price-stack strong { font-size: clamp(1.9rem, 5vw, 2.6rem); }

.summary-list {
  display: grid;
  gap: 12px;
}

.summary-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.summary-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
}

.wizard-actions { margin-top: 28px; }

.form-message,
.notice {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 14px;
}

.notice.error,
.form-message.error {
  background: rgba(214, 69, 69, 0.14);
  color: #ffb6b6;
}

.notice.success,
.form-message.success {
  background: rgba(31, 157, 99, 0.14);
  color: #9ce0be;
}

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

.stat-card {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.stat-card strong {
  display: block;
  font-size: 1.75rem;
  margin-top: 8px;
}

.admin-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

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

.admin-link-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  gap: 8px;
}

.admin-link-card strong {
  font-size: 1.05rem;
}

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

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

.btn-small {
  padding: 10px 14px;
  font-size: 0.92rem;
}

.btn-danger {
  background: rgba(214, 69, 69, 0.16);
  border-color: rgba(214, 69, 69, 0.4);
  color: #ffd2d2;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 140, 26, 0.12);
  border: 1px solid rgba(255, 140, 26, 0.25);
  color: #ffd4a3;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.admin-form {
  align-items: start;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
}

.checkbox-row input {
  width: auto;
  margin: 0;
}

.checkbox-row span {
  margin: 0;
}

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
}

.narrow { width: min(620px, calc(100% - 32px)); }

@media (max-width: 960px) {
  .configurator-grid,
  .cards-3,
  .field-grid,
  .stat-grid,
  .admin-link-grid {
    grid-template-columns: 1fr;
  }

  .field-span-2 { grid-column: auto; }
  .summary-card { position: static; }

  .site-header .container,
  .admin-header-row,
  .hero-card,
  .admin-section-head,
  .wizard-actions,
  .action-row {
    flex-direction: column;
    align-items: stretch;
  }
}
