:root {
  --bg: #071018;
  --bg-2: #0c1822;
  --surface: #0e1c28;
  --border: rgba(90, 140, 160, 0.28);
  --text: #e7f4f7;
  --muted: #8aa6b3;
  --accent: #2fe0c4;
  --accent-dim: #1db8d4;
  --input-bg: #07141c;
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max: 1120px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  position: relative;
}

.page-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(700px 380px at 12% -5%, rgba(47, 224, 196, 0.12), transparent 60%),
    radial-gradient(560px 320px at 90% 8%, rgba(29, 184, 212, 0.1), transparent 55%);
}

.header, .main, .footer, dialog {
  position: relative;
  z-index: 1;
}

a { color: var(--accent); }
.hidden { display: none !important; }
.muted { color: var(--muted); }

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.logo {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}
.nav {
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
}
.nav a:hover { color: var(--accent); }
.btn-header {
  padding: 7px 14px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.btn-header:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 24px 56px;
}

.section-title {
  margin: 0 0 16px;
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.intro { margin-bottom: 36px; }
.eyebrow {
  margin: 0 0 10px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}
.intro h1 {
  margin: 0 0 12px;
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
}
.intro-lead {
  margin: 0 0 18px;
  color: var(--muted);
  max-width: 560px;
  font-size: 1rem;
}
.intro-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.intro-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.88rem;
}
.intro-points li::before {
  content: "✓ ";
  color: var(--accent);
  font-weight: 700;
}

.features { margin-bottom: 28px; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 900px) {
  .feature-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .feature-grid { grid-template-columns: 1fr; }
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.feature-card:hover {
  border-color: rgba(47, 224, 196, 0.45);
  transform: translateY(-2px);
}
.feature-num {
  display: block;
  margin-bottom: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.feature-card h3 {
  margin: 0 0 6px;
  font-size: 0.98rem;
}
.feature-card p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.4;
}

.cta-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 0 0 32px;
  padding: 16px 18px;
  background: linear-gradient(120deg, rgba(47, 224, 196, 0.12), rgba(29, 184, 212, 0.08));
  border: 1px solid rgba(47, 224, 196, 0.28);
  border-radius: var(--radius);
}
.cta-strip strong {
  display: block;
  margin-bottom: 2px;
}
.cta-strip span {
  color: var(--muted);
  font-size: 0.9rem;
}
.cta-strip-soft {
  margin-top: 20px;
  margin-bottom: 0;
  background: var(--surface);
  border-color: var(--border);
}

.btn-inline {
  width: auto;
  min-width: 140px;
}

.configurator { margin-bottom: 8px; }

/* ---- Configurator ---- */
.config-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 16px;
  align-items: start;
}
@media (max-width: 860px) {
  .config-layout { grid-template-columns: 1fr; }
  .config-summary { position: static; }
}

.config-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.filter-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.filter-block h2 {
  margin: 0 0 12px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}
.hint {
  margin: -6px 0 10px;
  font-size: 0.82rem;
  color: var(--muted);
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  margin-bottom: 10px;
}
.filter-row:last-child { margin-bottom: 0; }
@media (max-width: 560px) {
  .filter-row { grid-template-columns: 1fr; }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0;
  min-width: 0;
}
.field > span {
  font-size: 0.78rem;
  color: var(--muted);
}

select,
input[type="email"],
input[type="password"],
input[type="text"],
input[type="tel"],
textarea {
  width: 100%;
  min-width: 0;
  padding: 9px 11px;
  font: inherit;
  font-size: 0.92rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238aa6b3' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
select option { background: #0e1c28; color: var(--text); }
select:focus,
input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
}

/* ---- Multi-select ---- */
.ms {
  position: relative;
  min-width: 0;
}
.ms.is-loading {
  opacity: 0.55;
  pointer-events: none;
}
.ms-control {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input-bg);
  cursor: text;
}
.ms.open .ms-control,
.ms-control:focus-within {
  border-color: var(--accent);
}
.ms-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 100%;
}
.ms-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 2px 8px;
  font-size: 0.78rem;
  line-height: 1.4;
  border-radius: 6px;
  background: rgba(47, 224, 196, 0.14);
  border: 1px solid rgba(47, 224, 196, 0.3);
  color: var(--text);
}
.ms-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 140px;
}
.ms-chip-x {
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1;
  text-decoration: none;
}
.ms-chip-x:hover { color: var(--accent); }
.ms-summary {
  font-size: 0.82rem;
  color: var(--muted);
}
.ms-input {
  flex: 1;
  min-width: 80px;
  border: 0 !important;
  background: transparent !important;
  padding: 4px 0 !important;
  outline: none;
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
}
.ms-dropdown {
  display: none;
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 240px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}
.ms.open .ms-dropdown { display: block; }
.ms-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 8px 10px;
  font-size: 0.86rem;
  line-height: 1.3;
  cursor: pointer;
  color: var(--text);
}
.ms-option:hover,
.ms-option.is-active {
  background: rgba(47, 224, 196, 0.1);
}
.ms-option input {
  width: 14px;
  height: 14px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--accent);
}
.ms-empty {
  padding: 12px;
  font-size: 0.84rem;
  color: var(--muted);
  text-align: center;
}

.checks {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px 10px;
}
@media (max-width: 700px) {
  .checks { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
  .checks { grid-template-columns: 1fr; }
}
.checks label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 10px;
  font-size: 0.88rem;
  line-height: 1.2;
  cursor: pointer;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  min-width: 0;
}
.checks label:hover { border-color: rgba(47, 224, 196, 0.45); }
.checks input {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  accent-color: var(--accent);
}

.fields-toolbar {
  display: flex;
  gap: 14px;
  margin-bottom: 10px;
}
.fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 16px;
  max-height: 240px;
  overflow-y: auto;
  padding: 2px 4px 2px 0;
}
@media (max-width: 560px) {
  .fields-grid { grid-template-columns: 1fr; }
}
.fields-grid label {
  display: grid;
  grid-template-columns: 16px 1fr;
  align-items: start;
  gap: 8px;
  margin: 0;
  padding: 5px 0;
  font-size: 0.84rem;
  line-height: 1.25;
  cursor: pointer;
  color: var(--text);
}
.fields-grid input {
  width: 14px;
  height: 14px;
  margin-top: 1px;
  accent-color: var(--accent);
}

/* ---- Summary sidebar ---- */
.config-summary {
  position: sticky;
  top: 68px;
  min-width: 0;
}
.summary-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  position: relative;
}
.summary-box.is-loading {
  opacity: 0.85;
}
.summary-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(47, 224, 196, 0.08);
  border: 1px solid rgba(47, 224, 196, 0.22);
  font-size: 0.84rem;
  color: var(--accent);
}
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(47, 224, 196, 0.25);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.summary-actions.is-loading .btn {
  opacity: 0.45;
  pointer-events: none;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--muted);
}
.summary-row strong {
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--text);
  text-align: right;
  word-break: break-word;
}
.summary-total {
  border-bottom: 0;
  padding-top: 10px;
}
.summary-total span { color: var(--text); font-weight: 500; }
.summary-total strong {
  font-size: 1.3rem;
  color: var(--accent);
}
.summary-note {
  margin: 2px 0 4px;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.35;
}
.summary-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.price-hint {
  margin: 10px 2px 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 14px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.btn:hover { border-color: rgba(47, 224, 196, 0.5); }
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-dim));
  border-color: transparent;
  color: #04241f;
}
.btn-primary:hover:not(:disabled) {
  filter: brightness(1.05);
}
.btn-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 0.84rem;
  color: var(--accent);
  cursor: pointer;
  text-decoration: none;
}
.btn-link:hover,
.btn-link:focus,
.btn-link:active {
  text-decoration: none;
}
.btn-link.block {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 10px;
}

/* ---- Info ---- */
.info {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 640px) {
  .info-grid { grid-template-columns: 1fr; }
}
.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.info-card h3 {
  margin: 0 0 8px;
  font-size: 0.92rem;
  color: var(--accent);
}
.info-card ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.info-card li { margin-bottom: 4px; }

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}
.tab {
  flex: 1;
  padding: 8px 12px;
  font: inherit;
  font-size: 0.86rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.tab.active {
  background: var(--accent);
  border-color: transparent;
  color: #04241f;
  font-weight: 600;
}
.cabinet-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.cabinet-head strong { display: block; }
.cabinet-orders-title {
  margin: 0 0 8px;
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 600;
}
.orders-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 360px;
  overflow-y: auto;
}
.order-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.86rem;
}
.order-item .row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.order-item .btn { width: auto; padding: 6px 10px; font-size: 0.8rem; }
.msg { font-size: 0.86rem; color: var(--muted); margin: 4px 0 0; }

.footer {
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
}

dialog.modal,
dialog {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0;
  width: min(400px, calc(100vw - 32px));
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
dialog::backdrop {
  background: rgba(2, 8, 12, 0.75);
  backdrop-filter: blur(2px);
}
#cabinetDialog {
  width: min(460px, calc(100vw - 32px));
}
.dialog {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dialog-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dialog h2 { margin: 0; font-size: 1.05rem; }
.dialog-close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.dialog-close:hover { color: var(--text); background: var(--input-bg); }
.dialog .field { margin-bottom: 2px; }
.dialog-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.pay-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}
.pay-card {
  width: min(400px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}
.pay-card h1 { margin: 0 0 8px; font-size: 1.15rem; }
.pay-amount {
  font-size: 1.45rem;
  font-weight: 650;
  color: var(--accent);
  margin: 12px 0;
}
.pay-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
