/* Живой звук — базовые стили по дизайну docs/design/zhivoy-zvuk-vse-ekrany.pdf */

:root {
  --bg: #f5f5f7;
  --bg-page: #dbdbe3;
  --card: #ffffff;
  --text: #17171b;
  --muted: #6b6b76;
  --line: #e8e8ef;
  --primary: #4e3bd9;
  --primary-dark: #3d2db5;
  --primary-soft: #ecebfa;
  --primary-text: #4e3fb0;
  --green: #1f8a63;
  --green-soft: #e3f3ec;
  --orange: #c2410c;
  --orange-soft: #fdebdd;
  --orange-btn: #b84a1c;
  --dark: #17171b;
  --star: #f5a623;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --phone-w: 430px;
  --shadow: 0 1px 2px rgba(23, 23, 27, .04);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.4;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--primary); text-decoration: none; }
button { font: inherit; }

/* На компьютере — колонка по центру, как телефон */
@media (min-width: 600px) {
  body { background: var(--bg-page); }
  .phone {
    max-width: var(--phone-w);
    margin: 24px auto;
    background: var(--bg);
    border-radius: 32px;
    min-height: calc(100vh - 48px);
    box-shadow: 0 8px 40px rgba(23, 23, 27, .12);
    overflow: hidden;
  }
}
.phone { display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 20px 10px;
}
.topbar--back { justify-content: flex-start; gap: 12px; }
.topbar__sub { font-size: 12px; color: var(--muted); display: block; }
.topbar__title { font-size: 22px; font-weight: 800; margin: 0; }
.logo { font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.logo span { color: var(--primary); }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; background: var(--card);
  color: var(--text); border: 0; box-shadow: var(--shadow);
}

.screen {
  flex: 1; padding: 8px 20px 24px;
}
.screen--dark-head { padding-top: 0; }

.h1 { font-size: 28px; font-weight: 800; line-height: 1.15; margin: 12px 0 6px; letter-spacing: -.02em; }
.lead { color: var(--muted); margin: 0 0 20px; }
.section { margin-bottom: 24px; }
.section__title { font-size: 14px; font-weight: 700; color: var(--muted); margin: 0 0 10px; }

/* Карточки */
.card {
  display: block; background: var(--card); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow); color: var(--text);
  position: relative;
}
.card + .card { margin-top: 12px; }
.card__icon { font-size: 22px; display: block; margin-bottom: 10px; }
.card__title { display: block; font-weight: 700; font-size: 16px; }
.card__text { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.card--format { min-height: 120px; }
.card--row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.card--soft { background: var(--primary-soft); box-shadow: none; }
.card--primary { background: var(--primary); color: #fff; margin-top: 12px; }
.card--primary .card__text { color: rgba(255,255,255,.8); }
.card--primary .badge--white { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); }
.card--selected { outline: 2px solid var(--primary); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-2 > .card { margin-top: 0; }
.grid-2 > .card:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* Список строк */
.list { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.list__row {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.list__row:last-child { border-bottom: 0; }
.list__icon { font-size: 18px; width: 24px; text-align: center; }
.list__label { display: block; font-size: 12px; color: var(--muted); }
.list__value { display: block; font-weight: 600; }
.list__chevron { margin-left: auto; color: var(--muted); }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 16px 20px; border-radius: 14px; border: 0; font-weight: 700;
  font-size: 16px; cursor: pointer; width: 100%; transition: background .15s;
}
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); }
.btn--secondary { background: var(--card); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn--warning { background: var(--orange-btn); color: #fff; }
.btn--sm { padding: 10px 16px; font-size: 14px; width: auto; }
.btn--link { background: none; color: var(--primary); width: auto; padding: 8px 0; }
.btn[disabled] { opacity: .5; cursor: default; }

.sticky-actions {
  position: sticky; bottom: 0; display: flex; gap: 10px; padding: 12px 0 4px;
  background: linear-gradient(to top, var(--bg) 70%, transparent);
}
.sticky-actions .btn--secondary { flex: 0 0 auto; width: auto; padding-inline: 18px; }

/* Чипы, сегменты */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip {
  padding: 10px 16px; border-radius: var(--radius-pill); border: 1px solid var(--line);
  background: var(--card); font-weight: 600; font-size: 14px; cursor: pointer; color: var(--text);
}
.chip--active { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip--outline { border: 2px solid var(--primary); color: var(--text); }
.segment {
  display: flex; background: var(--line); border-radius: 14px; padding: 4px; gap: 4px;
}
.segment__item {
  flex: 1; padding: 10px 8px; border: 0; background: transparent; border-radius: 11px;
  font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer;
}
.segment__item--active { background: var(--card); color: var(--text); box-shadow: var(--shadow); }

/* Бейджи */
.badge {
  display: inline-block; padding: 4px 10px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 700;
}
.badge--lavender { background: var(--primary-soft); color: var(--primary-text); }
.badge--green { background: var(--green-soft); color: var(--green); }
.badge--orange { background: var(--orange-soft); color: var(--orange); }
.badge--white { background: #fff; color: var(--primary); }
.rating { font-weight: 800; color: var(--text); }
.rating::before { content: "★ "; color: var(--star); }

/* Предупреждение */
.alert { border-radius: var(--radius); padding: 16px; }
.alert--warning { background: var(--orange-soft); }
.alert__title { font-weight: 700; color: var(--orange); margin-bottom: 4px; }
.alert__text { color: var(--text); font-size: 14px; margin-bottom: 12px; }

/* Переключатель */
.switch {
  appearance: none; width: 46px; height: 28px; border-radius: 14px; background: #d4d4dc;
  position: relative; cursor: pointer; flex: 0 0 auto; margin: 0;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px;
  border-radius: 50%; background: #fff; transition: transform .15s;
}
.switch:checked { background: var(--primary); }
.switch:checked::after { transform: translateX(18px); }

/* Формы */
.field { margin-bottom: 14px; }
.field__label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.input, .textarea, .select {
  width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--card); font: inherit; color: var(--text);
}
.input:focus, .textarea:focus, .select:focus { outline: 2px solid var(--primary); border-color: transparent; }
.textarea { min-height: 90px; resize: vertical; }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.error { color: var(--orange); font-size: 13px; margin-top: 6px; }

/* Нижняя панель вкладок */
.tabbar {
  position: sticky; bottom: 0; display: flex; background: var(--card);
  border-top: 1px solid var(--line);
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 0px));
}
.tabbar__item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 11px; color: var(--muted); font-weight: 600;
}
.tabbar__item--active { color: var(--primary); }

/* Тёмная шапка (входящий заказ) */
.dark-head {
  background: var(--dark); color: #fff; margin: 0 -20px 16px; padding: 20px 20px 24px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.dark-head__label { font-size: 13px; color: rgba(255,255,255,.7); }
.dark-head__amount { font-size: 36px; font-weight: 800; margin: 2px 0 6px; }
.dark-head__note { font-size: 13px; color: rgba(255,255,255,.7); }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.mt { margin-top: 16px; }

/* ---------- Этап 1 ---------- */

.phone--wide { --phone-w: 1100px; }
@media (min-width: 600px) { .phone--wide { border-radius: 16px; } }

.back { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; color: var(--text); margin-left: -10px; }
.back-link { display: inline-block; color: var(--muted); font-size: 13px; margin-top: 8px; }

.flash { padding: 12px 16px; border-radius: 14px; margin: 8px 0 12px; font-size: 14px; font-weight: 600; background: var(--green-soft); color: var(--green); }
.flash--error { background: var(--orange-soft); color: var(--orange); }

.input--lg { font-size: 20px; padding: 16px; }
.input--code { letter-spacing: .4em; text-align: center; font-weight: 700; }
.input--sm { padding: 8px 12px; border-radius: 10px; font-size: 14px; }
.input--num { max-width: 120px; }
.code { font-size: 20px; letter-spacing: .15em; }
.mb-s { margin-bottom: 8px; }
.mb { margin-bottom: 16px; }
.mt-s { margin-top: 8px; }

/* Карточка-вариант с радио (экраны 8, 9) */
.option-card {
  display: flex; align-items: center; gap: 14px; background: var(--card); border-radius: var(--radius);
  padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow); cursor: pointer;
  outline: 2px solid transparent; transition: outline-color .15s;
}
.option-card input { position: absolute; opacity: 0; width: 0; height: 0; }
.option-card__icon { width: 44px; height: 44px; border-radius: 12px; background: var(--primary-soft); display: inline-flex; align-items: center; justify-content: center; font-size: 20px; flex: 0 0 auto; }
.option-card__body { flex: 1; }
.option-card__check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #d4d4dc; flex: 0 0 auto; position: relative; }
.option-card:has(input:checked) { outline-color: var(--primary); }
.option-card:has(input:checked) .option-card__check { border-color: var(--primary); background: var(--primary); }
.option-card:has(input:checked) .option-card__check::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #fff; }

/* Чип с невидимым input */
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.choice .chip { display: inline-block; }
.choice input:checked + .chip { background: var(--primary); border-color: var(--primary); color: #fff; }
.choice input:focus-visible + .chip { outline: 2px solid var(--primary); outline-offset: 2px; }

.alert--info { background: var(--primary-soft); }
.alert--info .alert__title { color: var(--primary-text); }

.profile-head { display: flex; align-items: center; gap: 14px; margin: 8px 0 16px; }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--dark); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; flex: 0 0 auto; }
.profile-head__name { font-weight: 800; font-size: 18px; }
.profile-head__sub { color: var(--muted); font-size: 13px; }
.segment--mode { margin-bottom: 6px; }
.segment__item { cursor: pointer; }

.list--menu .list__row { cursor: pointer; }
.list__chevron { font-size: 20px; }
.card--link { word-break: break-all; font-weight: 600; }
.card--off { opacity: .55; }
.link-strong { color: var(--primary); font-weight: 700; white-space: nowrap; }

.details { margin-top: 16px; }
.details summary { cursor: pointer; font-weight: 700; color: var(--muted); font-size: 14px; }

/* Админка */
.admin-top { flex-wrap: wrap; gap: 8px; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 4px 14px; font-weight: 600; font-size: 14px; }
.admin-nav a { color: var(--muted); }
.admin-nav a.active { color: var(--primary); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid-3 > .card { margin-top: 0; }
.stat { font-size: 28px; font-weight: 800; }
.grid-2--admin { gap: 16px; }
.grid-2--admin > .card { margin-top: 0; }
@media (max-width: 700px) { .grid-2--admin { grid-template-columns: 1fr; } .grid-3 { grid-template-columns: 1fr; } }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.filters .select, .filters .input { width: auto; flex: 1; min-width: 140px; padding: 10px 12px; }
.table-wrap { overflow-x: auto; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: 12px; color: var(--muted); font-weight: 700; }
.table tr:last-child td { border-bottom: 0; }
.video { aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--dark); margin-bottom: 8px; }
.video iframe { width: 100%; height: 100%; border: 0; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-row .btn { flex: 1; width: auto; min-width: 120px; }
.checks { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.options { border-top: 1px solid var(--line); padding-top: 10px; }
.option-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.option-row .input { flex: 1; min-width: 140px; width: auto; }
.option-row .select { width: auto; }
.option-row--off { opacity: .55; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.setting-row__label { font-size: 14px; display: flex; flex-direction: column; }

/* ---------- Этап 2 ---------- */
.grow { flex: 1; min-width: 0; }
.w120 { width: 120px; }
.card__row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.card--offer { border-left: 4px solid var(--primary); }
.input--inline, .textarea--inline { padding: 6px 0; border: 0; background: transparent; border-radius: 0; font-weight: 600; font-size: 15px; width: 100%; }
.input--inline:focus, .textarea--inline:focus { outline: none; }
.select.input--inline { appearance: auto; }
.price-row { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 4px 4px; font-size: 14px; color: var(--muted); }
.price-row strong { font-size: 24px; color: var(--text); }
.chips--tight { gap: 6px; margin-bottom: 8px; }

/* Кандидат (экран 3) */
.cand { display: flex; gap: 12px; background: var(--card); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); margin-bottom: 12px; }
.cand__video { width: 96px; min-height: 120px; border-radius: 12px; background: var(--dark); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 12px; flex: 0 0 auto; }
.cand__play { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.2); display: inline-flex; align-items: center; justify-content: center; }
.cand__body { flex: 1; min-width: 0; }
.cand__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 16px; }
.btn--block { width: 100%; }

/* Тёмная шапка входящего заказа */
.dark-head__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 14px; }
.dark-head__close { color: #fff; font-size: 18px; padding: 4px 6px; }
.pill { background: #fff; color: var(--text); border-radius: var(--radius-pill); padding: 6px 12px; font-weight: 700; font-size: 13px; }
.checklist > div { padding: 6px 0; font-size: 14px; }
.checklist > div + div { border-top: 1px solid var(--line); }

/* Оценка */
.stars { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; margin: 8px 0; }
.stars input { display: none; }
.stars label { font-size: 32px; color: #d4d4dc; cursor: pointer; }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label { color: var(--star); }

/* Календарь */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal__wd { text-align: center; font-size: 11px; color: var(--muted); font-weight: 700; padding: 4px 0; }
.cal__day { aspect-ratio: 1; border-radius: 10px; border: 0; background: var(--card); font: inherit; font-weight: 600; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text); }
.cal__day--empty { background: transparent; }
.cal__day--past { color: #c4c4cc; cursor: default; background: transparent; }
.cal__day--free { background: var(--green-soft); color: var(--green); }
.cal__day--booked { background: var(--primary); color: #fff; }
.cal__day--today { outline: 2px solid var(--primary); }

/* ---------- Этап 3: уведомления ---------- */
.notif-demo { background: var(--primary-soft); border-radius: var(--radius-lg); padding: 14px; margin: 8px 0 20px; }
.notif-demo__item { display: flex; gap: 10px; background: var(--card); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; font-size: 14px; align-items: center; }
.notif-demo__item:last-child { margin-bottom: 0; }
.notif-demo__icon { width: 36px; height: 36px; border-radius: 10px; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.notif-demo__icon--urgent { background: var(--orange-btn); }
.checks-list { list-style: none; padding: 0; margin: 0 0 20px; }
.checks-list li { padding: 6px 0 6px 28px; position: relative; font-size: 15px; }
.checks-list li::before { content: "✓"; position: absolute; left: 4px; color: var(--green); font-weight: 800; }
.sticky-actions--col { flex-direction: column; gap: 4px; }
.eyebrow { color: var(--primary); font-weight: 800; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin-top: 8px; }
.step { display: flex; gap: 12px; background: var(--card); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow); }
.step__n { width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.step > div { flex: 1; }
.ios-bar { display: flex; justify-content: space-around; background: var(--bg); border-radius: 12px; padding: 10px; margin-top: 10px; color: var(--muted); font-size: 18px; }
.ios-bar__share { color: var(--primary); outline: 2px solid var(--primary); border-radius: 50%; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; }
.ios-menu { background: var(--bg); border-radius: 12px; padding: 8px; margin-top: 10px; font-size: 14px; }
.ios-menu__row { display: flex; justify-content: space-between; padding: 8px 10px; }
.ios-menu__row--hl { background: var(--card); border-radius: 10px; outline: 2px solid var(--primary); font-weight: 700; }
