:root {
  color-scheme: dark;
  --bg: #150f14;
  --bg-panel: rgba(33, 20, 30, 0.96);
  --bg-panel-soft: rgba(46, 28, 40, 0.98);
  --bg-card: rgba(53, 31, 44, 0.98);
  --bg-card-soft: rgba(66, 39, 54, 0.98);
  --bg-card-strong: rgba(77, 46, 63, 0.98);
  --line: rgba(151, 113, 88, 0.28);
  --line-strong: rgba(184, 148, 91, 0.42);
  --text: #f3e7d6;
  --text-on-dark: #f3e7d6;
  --muted: #c9ae97;
  --accent: #7a1f34;
  --accent-strong: #5e1728;
  --accent-soft: rgba(122, 31, 52, 0.16);
  --gold: #b8945b;
  --gold-deep: #8f6b35;
  --success: #d0ad75;
  --shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  min-height: 100dvh;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(122, 31, 52, 0.12), transparent 18%),
    linear-gradient(180deg, #120b10 0%, #1b1018 52%, #160d13 100%);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

#root {
  width: 100%;
  height: 100%;
}

.app-shell {
  width: 100%;
  height: 100dvh;
  padding: 12px;
}

.workspace {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 16px;
  height: 100%;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-panel);
  box-shadow: var(--shadow);
}

.sidebar,
.content {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.sidebar {
  gap: 14px;
  padding: 18px;
  color: var(--text-on-dark);
}

.content {
  padding: 18px;
  background: var(--bg-card);
  color: var(--text);
}

.panel--soft {
  background: var(--bg-panel-soft);
  box-shadow: none;
  padding: 18px;
}

.brand-block {
  padding: 4px 2px 8px;
}

.kicker {
  margin: 0 0 8px;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.brand-block h1,
.section-head h2,
.content__header h2 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.brand-block h1,
.section-head h2 {
  color: var(--text-on-dark);
}

.content__header h2,
.service-name,
.summary-row__name {
  color: var(--text);
}

.brand-block h1 {
  font-size: clamp(2rem, 3vw, 2.6rem);
  line-height: 0.98;
}

.lead,
.content__note,
.service-detail,
.summary-row__meta,
.total-panel__hint,
.metric-card span,
.empty-state,
.service-subtotal__label {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--muted);
}

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

.section-head {
  padding-inline: 2px;
}

.section-head h2,
.content__header h2 {
  font-size: 1.45rem;
}

.discount-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
  padding-inline: 2px;
}

.discount-chip,
.text-btn,
.primary-btn,
.stepper__btn {
  border: 1px solid var(--line);
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.discount-chip {
  min-height: 48px;
  border-radius: 6px;
  background: rgba(243, 231, 214, 0.08);
  color: var(--text-on-dark);
}

.discount-chip.is-active {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(122, 31, 52, 0.28), rgba(94, 23, 40, 0.32));
  color: #f7eadb;
}

.text-btn {
  padding: 0;
  background: transparent;
  border: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.92rem;
  color: var(--gold);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.metric-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(243, 231, 214, 0.04);
}

.metric-card strong {
  display: block;
  margin-top: 4px;
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--text-on-dark);
}

.metric-card span {
  color: rgba(243, 231, 214, 0.72);
}

.summary-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  padding: 16px;
}

.summary-list {
  min-height: 0;
  margin-top: 14px;
  padding-right: 6px;
  overflow: auto;
  scrollbar-width: none;
}

.summary-list::-webkit-scrollbar {
  display: none;
}

.summary-list.is-empty {
  display: flex;
  align-items: center;
}

.summary-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

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

.summary-row__name {
  margin: 0;
  font-weight: 600;
}

.summary-row strong {
  font-size: 1rem;
  color: var(--gold);
}

.total-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(71, 39, 52, 0.98) 0%, rgba(58, 31, 43, 0.98) 100%);
  color: var(--text-on-dark);
}

.total-panel__amount {
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  line-height: 0.95;
  font-weight: 600;
  letter-spacing: -0.06em;
  color: #f1dfc1;
}

.primary-btn {
  min-height: 52px;
  border-radius: 6px;
  border-color: #4a0f1d;
  background: linear-gradient(180deg, #7a1f34 0%, #5e1728 100%);
  color: #fff8f0;
}

.content__header {
  padding: 4px 2px 18px;
}

.content__note {
  max-width: 32ch;
  text-align: right;
  line-height: 1.45;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-content: start;
  grid-auto-rows: minmax(0, auto);
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
  scrollbar-width: none;
}

.service-grid::-webkit-scrollbar {
  display: none;
}

.service-card {
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: linear-gradient(180deg, var(--bg-card-soft) 0%, var(--bg-card-strong) 100%);
}

.service-card__head,
.service-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.service-copy {
  min-width: 0;
}

.service-name {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.service-detail {
  margin-top: 6px;
  font-size: 0.92rem;
}

.service-price {
  text-align: right;
  flex-shrink: 0;
}

.service-price__current {
  display: block;
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: #f1dfc1;
}

.service-price__base {
  display: block;
  margin-top: 4px;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.84rem;
  color: #c7ae92;
}

.stepper {
  display: inline-grid;
  grid-template-columns: 42px minmax(48px, auto) 42px;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: rgba(27, 14, 22, 0.32);
}

.stepper__btn {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 0;
  background: rgba(122, 31, 52, 0.08);
  color: #f1dfc1;
}

.stepper__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.stepper__value {
  display: inline-flex;
  justify-content: center;
  min-width: 48px;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #f3e7d6;
}

.service-subtotal {
  text-align: right;
}

.service-subtotal__label {
  color: #c7ae92;
}

.service-subtotal strong {
  display: block;
  margin-top: 4px;
  font-size: 1.15rem;
  color: var(--gold);
}

.discount-chip:hover,
.primary-btn:hover,
.stepper__btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

@media (max-width: 1100px) {
  html,
  body {
    overflow: auto;
  }

  .app-shell {
    height: auto;
    min-height: 100dvh;
  }

  .workspace {
    grid-template-columns: 1fr;
    height: auto;
  }

  .summary-panel,
  .service-grid {
    overflow: visible;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 10px;
  }

  .workspace {
    gap: 10px;
    padding-top: 10px;
  }

  .sidebar,
  .content,
  .total-panel,
  .summary-panel {
    padding: 14px;
  }

  .service-grid,
  .discount-grid,
  .metrics {
    grid-template-columns: 1fr;
  }

  .content__header,
  .service-card__head,
  .service-card__foot {
    flex-direction: column;
    align-items: flex-start;
  }

  .content__note,
  .service-price,
  .service-subtotal {
    text-align: left;
  }

  .stepper {
    width: 100%;
    grid-template-columns: 48px 1fr 48px;
  }
}
