/* «Взял-Вернул» — стиль CRM. Макеты: Claude Design, холст «CRM «Взял-Вернул» — интерфейсы» (14.10.2026).
   Шрифт Golos Text (OFL, static/fonts), бумажный фон, графит, оранжевый акцент; телефон у стойки — первым. */
@font-face { font-family: "Golos Text"; font-weight: 400; font-display: swap; src: url("fonts/GolosText-Regular.woff2") format("woff2"); }
@font-face { font-family: "Golos Text"; font-weight: 500; font-display: swap; src: url("fonts/GolosText-Medium.woff2") format("woff2"); }
@font-face { font-family: "Golos Text"; font-weight: 600; font-display: swap; src: url("fonts/GolosText-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Golos Text"; font-weight: 700; font-display: swap; src: url("fonts/GolosText-Bold.woff2") format("woff2"); }

:root {
  --bg: #FAF8F4; --card: #FFFFFF; --sunk: #F7F4EE; --ink: #1C1B19; --ink-2: #4A4742; --muted: #6B6760;
  --line: #E6E1D8; --line-2: #F0ECE5; --field: #D9D3C8;
  --accent: #C2410C; --accent-hover: #9A3412; --accent-ink: #FFFFFF; --accent-soft: #FFF0E6; --accent-line: #F6CDB0;
  --brand: #E8590C;
  --ok: #2B6E35; --ok-bg: #EBFBEE; --ok-line: #BFE5C6;
  --warn: #8F4700; --warn-bg: #FFF4E0; --warn-line: #F2D3A4;
  --bad: #B02525; --bad-bg: #FFF0F0; --bad-line: #F5C2C2;
  --info: #1864AB; --info-bg: #E7F5FF; --info-line: #BBDDF5;
  --dark: #1C1B19; --dark-ink: #FFFFFF; --dark-muted: #C9C4BB; --dark-line: #3A3833;
  --radius: 16px; --radius-sm: 12px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #151412; --card: #1E1D1B; --sunk: #191816; --ink: #F1EEE8; --ink-2: #D2CDC4; --muted: #A39E95;
    --line: #2F2D29; --line-2: #282623; --field: #3D3A35;
    --accent: #F07A3A; --accent-hover: #FF9459; --accent-ink: #1C1B19; --accent-soft: #3A2417; --accent-line: #5C3520;
    --ok: #7FD08F; --ok-bg: #18301E; --ok-line: #285236;
    --warn: #F2B866; --warn-bg: #33260F; --warn-line: #59431C;
    --bad: #F28B8B; --bad-bg: #3A1D1D; --bad-line: #5E2B2B;
    --info: #74B9F2; --info-bg: #142A3D; --info-line: #20476A;
    --dark: #0E0D0C; --dark-ink: #F1EEE8; --dark-muted: #A39E95; --dark-line: #2F2D29;
  }
}
:root[data-theme="dark"] {
  --bg: #151412; --card: #1E1D1B; --sunk: #191816; --ink: #F1EEE8; --ink-2: #D2CDC4; --muted: #A39E95;
  --line: #2F2D29; --line-2: #282623; --field: #3D3A35;
  --accent: #F07A3A; --accent-hover: #FF9459; --accent-ink: #1C1B19; --accent-soft: #3A2417; --accent-line: #5C3520;
  --ok: #7FD08F; --ok-bg: #18301E; --ok-line: #285236; --warn: #F2B866; --warn-bg: #33260F; --warn-line: #59431C;
  --bad: #F28B8B; --bad-bg: #3A1D1D; --bad-line: #5E2B2B; --info: #74B9F2; --info-bg: #142A3D; --info-line: #20476A;
  --dark: #0E0D0C; --dark-ink: #F1EEE8; --dark-muted: #A39E95; --dark-line: #2F2D29;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 "Golos Text", system-ui, sans-serif;
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); } a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

/* шапка и меню */
header.top { display: flex; align-items: center; gap: 8px 20px; flex-wrap: wrap; padding: 10px 16px; min-height: 64px;
  background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; letter-spacing: -.2px;
  text-decoration: none; color: var(--ink); }
.brand svg { flex-shrink: 0; }
header.top nav { display: flex; gap: 4px; flex-wrap: wrap; font-size: 15px; }
header.top nav a { padding: 8px 12px; border-radius: 10px; color: var(--ink-2); text-decoration: none; }
header.top nav a:hover { background: var(--sunk); color: var(--ink); }
header.top nav a[aria-current="page"] { background: var(--ink); color: var(--bg); font-weight: 600; }
header.top form { margin: 0; }
nav.bottom { position: fixed; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  background: var(--card); border-top: 1px solid var(--line); z-index: 5; padding: 6px 4px calc(8px + env(safe-area-inset-bottom)); }
nav.bottom a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 48px;
  text-decoration: none; font-size: 12px; color: var(--muted); }
nav.bottom a svg { width: 22px; height: 22px; }
nav.bottom a[aria-current="page"] { color: var(--accent); font-weight: 600; }
@media (min-width: 800px) { nav.bottom { display: none; } main { padding-bottom: 40px; } }
@media (max-width: 799px) { header.top nav { display: none; } }

main { max-width: 980px; margin: 0 auto; padding: 16px 16px 104px; }
main.wide { max-width: 1360px; }
@media (min-width: 800px) { header.top { padding: 10px 24px; gap: 8px 24px; } main { padding: 24px 24px 40px; } }  /* широкие макеты: поля 24 px */
h1 { font-size: 28px; line-height: 1.15; letter-spacing: -.5px; margin: 4px 0 14px; }
h2 { font-size: 19px; line-height: 1.25; margin: 22px 0 10px; } h3 { font-size: 16px; margin: 14px 0 6px; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.page-head { margin: 4px 0 16px; } .page-head h1 { margin: 2px 0 0; }
.page-head .muted { font-size: 14px; }

/* карточки и списки */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; }
.card.soft { background: var(--accent-soft); border-color: var(--accent-line); }
.card.ok { background: var(--ok-bg); border-color: var(--ok-line); }
.card.warn { background: var(--warn-bg); border-color: var(--warn-line); }
.card.bad { background: var(--bad-bg); border-color: var(--bad-line); }
.card.info { background: var(--info-bg); border-color: var(--info-line); }
.card.dark { background: var(--dark); border-color: var(--dark); color: var(--dark-ink); }
.card.dark .muted { color: var(--dark-muted); } .card.dark a { color: #FFB088; }
.card.flush { padding: 0; overflow: hidden; } .card.flush > h2 { padding: 14px 14px 6px; margin: 0; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.between { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.grow { flex: 1 1 auto; }
.muted { color: var(--muted); font-size: 14px; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 10px; margin: 20px 0 8px; }
.section-head h2 { margin: 0; }
.big-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 16px; }
.list-item, .rrow { display: flex; gap: 12px; padding: 12px; margin-bottom: 8px; border-radius: var(--radius); background: var(--card);
  border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.card .list-item, .card .rrow { border-width: 0 0 1px; border-radius: 0; margin: 0; padding: 12px 0; background: transparent; }
.card .list-item:last-child, .card .rrow:last-child { border-bottom: 0; }
.list-item { display: block; }
.list-item .head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.list-item .head b { color: var(--ink); }
a.list-item:hover, a.rrow:hover { border-color: var(--field); color: var(--ink); }
.rrow-time { width: 58px; flex-shrink: 0; display: flex; flex-direction: column; gap: 1px; }
.rrow-time b { font-size: 17px; } .rrow-time span { font-size: 12px; color: var(--muted); }
.rrow-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.rrow-client { font-weight: 600; font-size: 15px; }
.rrow-items { font-size: 14px; color: var(--ink-2); line-height: 1.35; }
.rrow-side { text-align: right; flex-shrink: 0; }
.line-item { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.line-item:last-child { border-bottom: 0; }
.line-item .grow { min-width: 0; }
.line-item .price { text-align: right; white-space: nowrap; font-weight: 700; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.tile { padding: 10px 8px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); text-align: center;
  text-decoration: none; color: var(--ink); }
.tile b { display: block; font-size: 20px; } .tile span { font-size: 12px; color: var(--muted); }
.tile.warn b { color: var(--warn); } .tile.bad b { color: var(--bad); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { padding: 18px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.kpi .label { font-size: 14px; color: var(--muted); } .kpi .value { font-size: 34px; line-height: 1.15; font-weight: 700; letter-spacing: -.6px; }
.kpi .muted { font-size: 14px; }
.park-scale { position: relative; height: 10px; border-radius: 5px; margin-top: 4px;
  background: linear-gradient(90deg, #F1D0D0 0 39%, #FFE8C2 39% 57%, #D3F0D9 57% 79%, #B2E2BD 79% 100%); }
.park-scale i { position: absolute; top: -4px; width: 4px; height: 18px; margin-left: -2px; border-radius: 2px; background: var(--ink); }
.park-scale-labels { display: flex; justify-content: space-between; font-size: 12px !important; }
.one-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar.reason { grid-template-columns: minmax(0, 130px) minmax(0, 1fr) 28px; }
.kpi.dark { background: var(--dark); border-color: var(--dark); color: var(--dark-ink); } .kpi.dark .label, .kpi.dark .muted { color: var(--dark-muted); }
.money { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; font-size: 13px; color: var(--dark-muted); }
.money b { display: block; color: var(--dark-ink); font-size: 15px; }
.sum-line { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; }
.sum-line.total { font-weight: 700; font-size: 17px; border-top: 1px solid var(--line-2); padding-top: 10px; margin-top: 4px; }
.card.dark .sum-line.total { border-color: var(--dark-line); }
.big-num { font-size: 30px; font-weight: 700; letter-spacing: -.5px; }

/* кнопки */
.btn, button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px solid var(--accent);
  background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: var(--radius-sm); font: inherit;
  font-weight: 600; text-decoration: none; text-align: center; cursor: pointer; min-height: 44px; }
.btn:hover, button:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.btn.secondary, button.secondary { background: var(--card); color: var(--ink); border-color: var(--ink); }
.btn.secondary:hover, button.secondary:hover { background: var(--sunk); color: var(--ink); }
.btn.ghost, button.ghost { background: transparent; color: var(--ink-2); border-color: var(--field); }
.btn.dark, button.dark { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.danger, button.danger { background: var(--card); color: var(--bad); border-color: var(--bad-line); }
.btn.danger:hover, button.danger:hover { background: var(--bad-bg); color: var(--bad); }
.btn.big { min-height: 52px; padding: 12px 16px; font-size: 16px; border-radius: 14px; }
.btn[disabled], button[disabled], .btn.disabled { background: var(--line); border-color: var(--line); color: var(--muted); cursor: not-allowed; }
.btn svg { width: 20px; height: 20px; }
.actions-bar { position: sticky; bottom: 72px; display: flex; gap: 10px; padding: 12px 0; background: linear-gradient(transparent, var(--bg) 30%); }
.actions-bar > * { flex: 1; }
@media (min-width: 800px) { .actions-bar { bottom: 0; } }

/* поля */
input, select, textarea { font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--field);
  border-radius: var(--radius-sm); padding: 10px 14px; width: 100%; min-height: 48px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=checkbox], input[type=radio] { width: 22px; height: 22px; min-height: 0; margin: 0 8px 0 0; accent-color: var(--ok); vertical-align: middle; }
label { display: block; font-size: 14px; font-weight: 600; color: var(--ink-2); margin: 10px 0 6px; }
.helptext, .help { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; }
form p { margin: 0 0 10px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 14px; }
ul.choices, form ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
form ul li label, ul.choices li label { display: inline-flex; align-items: center; border: 1px solid var(--field); border-radius: 999px;
  padding: 8px 14px; margin: 0; color: var(--ink); background: var(--card); font-size: 15px; font-weight: 400; min-height: 40px; cursor: pointer; }
form ul li label:has(input:checked), ul.choices li label:has(input:checked) { background: var(--ink); border-color: var(--ink); color: var(--bg); font-weight: 600; }
.chips > div { display: flex; flex-wrap: wrap; gap: 8px; }
.chips > div > div { margin: 0; }
.chips label { display: inline-flex; align-items: center; border: 1px solid var(--field); border-radius: 999px; padding: 8px 14px; margin: 0;
  color: var(--ink); background: var(--card); font-size: 15px; font-weight: 400; min-height: 44px; cursor: pointer; }
.chips label:has(input:checked) { border-color: var(--ink); background: var(--ink); color: var(--bg); font-weight: 600; }
.chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips.accent label:has(input:checked) { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.errorlist { color: var(--bad); font-size: 14px; list-style: none; padding: 0; margin: 4px 0; }
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.check-list li:last-child { border-bottom: 0; }
.check-list label { margin: 0; color: var(--ink); font-size: 15px; display: flex; gap: 12px; align-items: flex-start; }
.progress { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 4px; background: var(--accent); }

/* метки */
.tag, .pill { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--sunk); color: var(--ink-2); white-space: nowrap; text-decoration: none; }
.tag.ok, .pill.ok { background: var(--ok-bg); color: var(--ok); }
.tag.warn, .pill.warn { background: var(--warn-bg); color: var(--warn); }
.tag.bad, .pill.bad { background: var(--bad-bg); color: var(--bad); }
.tag.info, .pill.info { background: var(--info-bg); color: var(--info); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.alert { padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 12px; border: 1px solid transparent; }
.alert.error, .alert.bad { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }
.alert.success { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.alert.warn, .alert.warning { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.alert.info { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }

/* таблицы */
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
tbody tr:hover td { background: var(--sunk); }
td.num, th.num { text-align: right; white-space: nowrap; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); margin-bottom: 12px; }
.table-wrap table th:first-child, .table-wrap table td:first-child { padding-left: 14px; }
.table-wrap table th:last-child, .table-wrap table td:last-child { padding-right: 14px; }
.card .table-wrap { border: 0; border-radius: 0; margin: 0; }
.receipt td { padding: 5px 0; border: 0; } .receipt tr.total td { font-weight: 700; font-size: 17px; border-top: 1px solid var(--line); padding-top: 10px; }
.card.dark .receipt tr.total td { border-color: var(--dark-line); }
.unit-pick { display: flex; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.unit-pick label { margin: 0; color: var(--ink); font-weight: 500; }
.unit-pick.busy { opacity: .5; }
details { border-radius: var(--radius-sm); }
details summary { cursor: pointer; font-weight: 600; padding: 11px 0; min-height: 44px; box-sizing: border-box; }
.bar { height: 12px; border-radius: 6px; background: var(--sunk); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 6px; background: var(--ink); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); background: var(--sunk); }

/* календарь занятости */
.page-head.split { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 14px; margin: 0 0 16px; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-wrap { overflow-x: auto; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.cal2 { min-width: 1100px; --unit-w: 200px; }
.cal2-head, .cal2-row { display: grid; grid-template-columns: var(--unit-w) repeat(28, minmax(0, 1fr)); }
.cal2-head { background: var(--sunk); border-bottom: 1px solid var(--line); }
.cal2-row { border-bottom: 1px solid var(--line-2); min-height: 46px; align-items: center; }
.cal2-row:last-child { border-bottom: 0; }
.cal2-unit { padding: 8px 14px; display: flex; flex-direction: column; min-width: 0; align-self: stretch; justify-content: center; line-height: 1.25;
  position: sticky; left: 0; z-index: 1; background: inherit; text-decoration: none; color: var(--ink); }
.cal2-row .cal2-unit { background: var(--card); }
.cal2-head .cal2-unit { font-size: 13px; color: var(--muted); font-weight: 600; justify-content: center; }
.cal2-unit b { font-size: 14px; font-weight: 600; } .cal2-unit span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.cal2-unit:hover b { color: var(--accent); }
.cal2-day { grid-column: span 2; padding: 8px 0; line-height: 1.3; text-align: center; border-left: 1px solid var(--line-2); color: var(--ink-2); display: flex; flex-direction: column; }
.cal2-day span { font-size: 12px; } .cal2-day b { font-size: 15px; font-weight: 600; }
.cal2-day.weekend { color: var(--accent); } .cal2-day.today { background: var(--accent-soft); color: var(--accent); }
.cal2-track { grid-column: 2 / -1; display: grid; grid-template-columns: repeat(28, minmax(0, 1fr)); row-gap: 4px; padding: 6px 0; }
.cal-bar { height: 30px; line-height: 30px; border-radius: 8px; margin: 0 2px; padding: 0 6px; display: block; min-width: 0;
  font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.cal-bar.busy-repair { line-height: 28px; }
.cal-bar b { font-weight: 700; }
@media (max-width: 799px) { .cal2 { --unit-w: 116px; } .cal2-unit { padding: 8px 10px; } }
.cal-key { display: inline-block; width: 22px; height: 12px; border-radius: 4px; }
.busy-booked { background: var(--card); box-shadow: inset 0 0 0 1.5px var(--ink); color: var(--ink); }
.busy-out { background: var(--ink); color: var(--bg); }
.busy-overdue { background: #E03131; color: #FFFFFF; }
.busy-blocked { background: var(--bad-bg); box-shadow: inset 0 0 0 1.5px var(--bad); color: var(--bad); }
.busy-done { background: var(--sunk); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.busy-service { background: var(--warn-bg); color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn-line); }
.busy-repair { background: var(--sunk); color: var(--muted); border: 1px dashed var(--muted); }
a.cal-bar:hover { filter: brightness(.95); color: inherit; }
.busy-out:hover, .busy-overdue:hover { color: #FFFFFF; }

@media print { header.top, nav.bottom, form, .no-print, .actions-bar { display: none !important; } body { background: #FFFFFF; } }

/* ход аренды и кнопки-иконки */
.steps { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 4px; }
.steps li { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.steps li span { height: 6px; border-radius: 3px; background: var(--line); }
.steps li b { font-weight: 600; } .steps li em { font-style: normal; }
.steps li.done span { background: var(--ink); } .steps li.done b { color: var(--ink); }
.steps li.current span { background: var(--accent); }
.steps li.bad span { background: var(--bad); } .steps li.bad b { color: var(--bad); }
.btn.icon { width: 44px; padding: 0; flex-shrink: 0; }
.pay { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--sunk); margin-bottom: 8px; font-size: 15px; }
.pay .pill { margin-top: 6px; }
.hbar { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr) 44px; gap: 10px; align-items: center; font-size: 14px; padding: 4px 0; }
.hbar > b { text-align: right; }
.util { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2px 32px; }
.util .hbar { grid-template-columns: minmax(0, 190px) minmax(0, 1fr) 44px; }

/* шапка экрана со стрелкой назад, строки проверок, аватар (макеты Issue, Accept, Booking, Client, Inquiry) */
.head-back { display: flex; align-items: center; gap: 4px; margin: 0 0 14px -10px; }
.head-back h1 { margin: 0; font-size: 24px; }
.head-back .sub { font-size: 14px; color: var(--muted); line-height: 1.35; }
.head-back .grow { min-width: 0; }
a.back { width: 44px; height: 44px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink); border-radius: 12px; }
a.back:hover { background: var(--sunk); color: var(--ink); }
a.back svg { width: 22px; height: 22px; }
.check-list .hint { display: block; font-size: 13px; font-weight: 400; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.check-list label b { font-weight: 600; }
.check-list input[type=checkbox] { width: 24px; height: 24px; margin: 0; flex-shrink: 0; }
.card.flush .check-list li { padding: 14px; }
.check-row { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.check-row:last-child { border-bottom: 0; }
.check-row .grow { min-width: 0; }
.check-row form { margin: 0; display: flex; gap: 6px; flex-shrink: 0; }
.check-row form button { min-height: 44px; min-width: 44px; padding: 6px 12px; font-size: 14px; }
.check-row .title { font-weight: 600; font-size: 15px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--field); flex-shrink: 0; }
.dot.ok { background: var(--ok); } .dot.warn { background: #E67700; } .dot.bad { background: var(--bad); }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700;
  font-size: 18px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tiles.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.progress-head { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 8px; }
.unit-row { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-2); margin: 0;
  font-size: 15px; font-weight: 400; color: var(--ink); cursor: pointer; }
.unit-row:last-child { border-bottom: 0; }
.unit-row input[type=checkbox] { width: 24px; height: 24px; margin: 0; }
.unit-row.busy { cursor: default; } .unit-row.busy b { color: var(--muted); }
.pos-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding-top: 12px; }
.pos-head:first-of-type { padding-top: 0; }
.pos-head b { font-size: 16px; } .pos-head .price { font-weight: 700; white-space: nowrap; }
.note { font-size: 13px; color: var(--muted); line-height: 1.4; margin: 8px 0 0; }
.repair-note { display: none; margin-top: 10px; }
.accept-line:has(.dmg input:not([value=""]):not([data-norepair]):checked) .repair-note,
.accept-line:has(.dmg-text input:not(:placeholder-shown)) .repair-note { display: block; }
.reason-box { margin-top: 4px; }
form:has(input[name=outcome]:checked):not(:has(input[name=outcome][value=refused]:checked)) .reason-box { display: none; }
fieldset { border: 0; margin: 0 0 6px; padding: 0; min-width: 0; }
legend { font-size: 14px; font-weight: 600; color: var(--ink-2); margin: 10px 0 8px; padding: 0; }
.seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; padding: 4px; border-radius: 14px; background: var(--sunk);
  border: 1px solid var(--line); }
.seg > div { display: contents; }
.seg > div > div { margin: 0; }
.seg label { display: flex; align-items: center; justify-content: center; margin: 0; min-height: 44px; border-radius: 10px; font-size: 15px;
  font-weight: 500; color: var(--ink-2); cursor: pointer; }
.seg label:has(input:checked) { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.public-hero { margin: -16px -16px 16px; padding: 22px 16px 22px; background: var(--dark); color: var(--dark-ink); }
.public-hero .brand { color: var(--dark-ink); margin-bottom: 18px; }
.public-hero h1 { font-size: 26px; margin: 0 0 10px; }
.public-hero p { margin: 0; color: var(--dark-muted); font-size: 15px; }
.public-wrap { max-width: 560px; margin: 0 auto; }
@media (min-width: 600px) { .public-hero { margin: 0 0 16px; border-radius: var(--radius); padding: 24px; } }
.check-list label, .check-list label:has(input:checked) { border: 0; border-radius: 0; padding: 0; background: transparent; color: var(--ink);
  font-weight: 400; min-height: 0; display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark; } }
:root[data-theme="dark"] { color-scheme: dark; }
.card > input[type=hidden]:first-child + h2 { margin-top: 0; }
.unit-row input[type=checkbox] { flex-shrink: 0; }
form ul.check-list { display: block; }

/* Экраны со стрелкой «назад» на телефоне — как в макетах: без шапки и нижнего меню, действие — белой полосой снизу */
@media (max-width: 799px) {
  body:has(main .head-back) header.top, body:has(main .head-back) nav.bottom { display: none; }
  body:has(main .head-back) main { padding-top: 8px; }
  body:has(main .head-back) .actions-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; margin: 0;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); }
}
/* шапка: поиск и меню владельца вместо «Выйти» (макет Main) */
.top-tools { display: flex; align-items: center; gap: 8px; }
.top-tools .btn.icon { border-radius: 14px; }
.me { position: relative; }
.me > summary { list-style: none; padding: 0; cursor: pointer; }
.me > summary::-webkit-details-marker { display: none; }
.me .avatar { width: 44px; height: 44px; font-size: 16px; background: var(--ink); color: var(--bg); }
.me .menu { position: absolute; right: 0; top: 52px; min-width: 200px; padding: 6px; border-radius: 14px; background: var(--card);
  border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 10; display: flex; flex-direction: column; }
.me .menu a, .me .menu button { display: flex; justify-content: flex-start; width: 100%; min-height: 44px; padding: 10px 12px; border: 0;
  border-radius: 10px; background: transparent; color: var(--ink); font-weight: 500; text-decoration: none; }
.me .menu a:hover, .me .menu button:hover { background: var(--sunk); color: var(--ink); }
.me .menu form { margin: 0; }
.me .menu .who { padding: 8px 12px 6px; font-size: 13px; color: var(--muted); }
/* «Сегодня»: просрочка по макету Main — сумма и время опоздания справа, звонок и SMS под строкой */
.title-ico { display: flex; align-items: center; gap: 8px; }
.title-ico svg { width: 20px; height: 20px; flex-shrink: 0; }
.od { padding: 4px 0 12px; border-bottom: 1px solid var(--bad-line); margin-bottom: 10px; }
.od:last-of-type { border-bottom: 0; margin-bottom: 0; padding-bottom: 4px; }
.od-top { display: flex; gap: 12px; align-items: flex-start; }
.od-title { display: block; font-weight: 700; font-size: 16px; line-height: 1.3; color: var(--ink); text-decoration: none; }
.od-title:hover { color: var(--ink); text-decoration: underline; }
.od-sub { font-size: 14px; color: var(--ink-2); line-height: 1.35; margin-top: 2px; }
.od-sub.od-limit { color: var(--bad); font-weight: 600; }
.od-side { text-align: right; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; }
.od-side b { font-size: 18px; color: var(--bad); white-space: nowrap; }
.od-side span { font-size: 13px; color: var(--muted); white-space: nowrap; }
.od-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.od-actions .btn { border-color: var(--bad-line); }
.od-actions .btn { min-height: 44px; padding: 8px 10px; font-size: 14px; white-space: nowrap; }
@media (max-width: 799px) { header.top { background: var(--bg); border-bottom-color: transparent; } }

/* Выдача, приём, клиент, публичная заявка — по макетам Issue, Accept, Client, Zayavka */
.muted-2 { color: var(--ink-2); }
.signals h3 { margin: 0 0 4px; font-size: 15px; }
.card.info.signals h3 { color: var(--info); }
.signals p { margin: 0 0 6px; font-size: 14px; color: var(--ink-2); }
.signals p:last-child, .signals form { margin-bottom: 0; }
.check-list li.auto > span:last-child { display: flex; flex-direction: column; font-size: 15px; }
.check-list li.auto b { font-weight: 600; }
.auto-mark { width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: 14px; }
.auto-mark.ok { background: var(--ok); color: var(--card); }
.auto-mark.bad { background: var(--warn-bg); color: var(--warn); box-shadow: inset 0 0 0 1.5px var(--warn-line); }
.auto-mark svg { width: 15px; height: 15px; }
.pay-seg { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 10px; }
.take-money { margin: 0; }
.bar-hint { font-size: 13px; color: var(--warn); text-align: center; }
.photo-tiles { margin: 0; }
.photo-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-bottom: 10px; }
.photo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 600px) { .photo-grid { grid-template-columns: repeat(auto-fill, 110px); } .photo-opts { max-width: 560px; } }
.photo-grid .ph { position: relative; display: block; aspect-ratio: 1; margin: 0; border-radius: 12px; overflow: hidden; background: var(--sunk); }
.photo-grid .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-grid .ph span { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 6px 3px; font-size: 11px; font-weight: 500;
  color: #FFFFFF; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); }
.photo-grid .cam { display: flex; align-items: center; justify-content: center; background: transparent; border: 1.5px dashed var(--field);
  color: var(--muted); cursor: pointer; }
.photo-grid .cam:hover { border-color: var(--ink-2); color: var(--ink); }
.photo-grid .cam svg { width: 26px; height: 26px; }
.photo-grid .cam input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; padding: 0; }
.photo-grid .cam:focus-within { outline: 3px solid var(--brand); outline-offset: 2px; }
.accept-line h3 { font-size: 15px; margin: 14px 0 8px; }
form ul.kit-list, .kit-list { display: block; list-style: none; margin: 0; padding: 0; }
form ul.kit-list li label, form ul.kit-list li label:has(input:checked), .kit-list label { display: flex; align-items: center; gap: 12px;
  margin: 0; padding: 7px 0; min-height: 0; border: 0; border-radius: 0; background: transparent; font-size: 15px; font-weight: 400;
  color: var(--ink); cursor: pointer; }
.kit-list input[type=checkbox] { width: 22px; height: 22px; margin: 0; flex-shrink: 0; }
.late-note { padding: 10px 12px; border-radius: 14px; margin-bottom: 4px; }
.late-note b { display: block; font-size: 15px; } .late-note span { font-size: 13px; }
.late-note.ok span { color: var(--ok); } .late-note.warn span { color: var(--warn); }
.chips.dmg label { border-radius: 12px; font-size: 14px; text-align: left; }
.chips.dmg label:has(input:checked) { background: var(--accent-soft); border: 1.5px solid var(--accent); color: var(--ink); }
.chips.dmg label:has(input[value=""]:checked) { background: var(--card); border: 1.5px solid var(--ink); }
details.more { margin-top: 10px; }
details.more summary { font-size: 14px; color: var(--ink-2); }
.recon { padding: 16px; border-radius: 18px; }
.recon .sum-line { font-size: 15px; color: var(--dark-muted); }
.recon .sum-line > span:last-child { color: var(--dark-ink); text-align: right; }
.recon .sum-line.total { border-color: var(--dark-line); font-weight: 400; font-size: 15px; }
.recon .sum-line .hold { color: #FFB088; font-weight: 600; }
.recon .result { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 2px; }
.recon .result b { font-size: 28px; letter-spacing: -.5px; white-space: nowrap; }
.card.dark .note { color: var(--dark-muted); }
.tile.ok b { color: var(--ok); }
.tiles.left .tile { text-align: left; padding: 10px; }
.crow { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line-2);
  color: var(--ink); text-decoration: none; font-size: 15px; }
.crow:last-child { border-bottom: 0; }
.card.flush .crow { padding: 12px 14px; }
a.crow:hover { color: var(--ink); background: var(--sunk); }
.crow .what { min-width: 0; } .crow .what b { font-weight: 600; }
.crow .st { font-size: 13px; color: var(--muted); white-space: nowrap; }
.crow .st.info { color: var(--info); font-weight: 600; } .crow .st.warn { color: var(--warn); font-weight: 600; }
.crow .st.bad { color: var(--bad); font-weight: 600; }
.two-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 12px; }
.two-btns .btn { min-height: 48px; border-radius: 14px; }
.two-btns .btn.ghost { background: var(--card); color: var(--ink); }
.btn.danger-soft { background: var(--card); color: var(--bad); border-color: var(--bad-line); }
.btn.danger-soft:hover { background: var(--bad-bg); color: var(--bad); }
.public-hero h1 { font-size: 28px; line-height: 1.15; }
.public-hero p { line-height: 1.45; }
.public-hero .facts { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 12px; font-size: 13px; color: var(--dark-muted); }
.zay { display: flex; flex-direction: column; gap: 14px; }
.zay label, .zay legend { font-size: 15px; font-weight: 600; color: var(--ink); margin: 0 0 6px; }
.zay legend { margin-bottom: 10px; }
.zay .field { display: flex; flex-direction: column; }
.zay .two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.zay .chips label { font-size: 15px; min-height: 44px; margin: 0; font-weight: 400; }
.zay .chips label:has(input:checked) { font-weight: 600; }
.zay .opt { font-weight: 400; color: var(--muted); }
.price-hint { margin-top: 10px; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); font-size: 14px; line-height: 1.45; }
.pos-other { display: none; margin-top: 10px; }
.zay:has(input[name=pick][value=""]:checked) .pos-other { display: block; }
.zay textarea { min-height: 76px; resize: vertical; }
.zay label.inline { display: flex; gap: 12px; align-items: center; font-size: 15px; font-weight: 400; color: var(--ink); cursor: pointer; }
.zay label.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; font-weight: 400; line-height: 1.45; color: var(--ink-2); cursor: pointer; }
.zay label.inline input, .zay label.consent input { margin: 0; flex-shrink: 0; }
.zay .btn.big { min-height: 56px; border-radius: 16px; font-size: 17px; }
.zay .note { text-align: center; margin: 0; }
/* «Новое обращение» по макету Inquiry: без карточек, что спрашивали — со свободой прямо сейчас */
.flat-form { display: flex; flex-direction: column; gap: 16px; }
.flat-form > fieldset, .flat-form > div, .flat-form > details { margin: 0; }
.flat-form label:first-child { margin-top: 0; }
.flat-form legend { margin-top: 0; }
.flat-form .reason-box { margin: 0; padding: 4px 14px 14px; }
.flat-form .reason-box legend { padding: 0 4px; margin: 0 0 4px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.two > div { min-width: 0; }
.picked { display: flex; flex-wrap: wrap; gap: 6px; }
.picked:not(:empty) { margin-bottom: 8px; }
.chip-on { min-height: 40px; padding: 0 14px; border-radius: 999px; border-color: var(--ink); background: var(--ink); color: var(--bg);
  font-size: 14px; font-weight: 500; }
.chip-on:hover { background: var(--ink-2); border-color: var(--ink-2); color: var(--bg); }
.pos-avail > div { margin-top: 8px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); max-height: 336px; overflow: auto; }
.pos-avail > div:not(:has(> div:not([hidden]))) { display: none; }
.pos-avail > div > div { border-bottom: 1px solid var(--line-2); }
.pos-avail > div > div:last-child { border-bottom: 0; }
.pos-avail label { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0; padding: 10px 14px; min-height: 48px;
  font-size: 15px; font-weight: 400; color: var(--ink); cursor: pointer; }
.pos-avail label:hover { background: var(--sunk); }
.pos-avail input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pos-avail label:has(input:focus-visible) { outline: 3px solid var(--brand); outline-offset: -3px; }
.av { font-size: 13px; font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.av.ok { color: var(--ok); } .av.bad { color: var(--bad); } .av.warn { color: var(--warn); } .av.muted { color: var(--muted); font-weight: 500; }
/* «Бронь» по макету Booking: срок пакетами, залог по проверкам, тёмный чек «при выдаче» */
.period { margin: 0 0 4px; }
.period h2 { margin: 6px 0 10px; }
.period label { margin-top: 0; }
input.compact { min-height: 48px; padding: 8px 10px; font-size: 15px; }
.pkg { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pkg button { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--field); background: var(--card); color: var(--ink);
  font-size: 14px; font-weight: 500; }
.pkg button:hover { background: var(--sunk); color: var(--ink); border-color: var(--field); }
.pkg button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); font-weight: 600; }
#units .pos[hidden] { display: none; }
.deposit-card .dep-sum { font-size: 20px; }
.deposit-card h2 { margin: 0; }
.deposit-card .note { color: var(--ink-2); font-size: 14px; }
.receipt-dark table { font-size: 15px; }
.receipt-dark td { padding: 5px 0; border: 0; color: var(--dark-muted); }
.receipt-dark td.num { color: var(--dark-ink); }
.receipt-dark tr.total td { color: var(--dark-ink); border-top: 1px solid var(--dark-line); padding-top: 10px; vertical-align: baseline; }
.receipt-dark tr.total .big-num { font-size: 28px; }
.receipt-dark tbody tr:hover td { background: transparent; }
.receipt-dark .note, .receipt-dark .muted { color: var(--dark-muted); }
input.compact { font-size: 14px; padding: 8px; }
input.compact::-webkit-calendar-picker-indicator { margin-left: 0; padding: 0; }
#units .pos + .pos { border-top: 1px solid var(--line-2); padding-top: 12px; margin-top: 2px; }
/* «Аренда» по макету Rental */
.head-back > .pill { height: 28px; padding: 0 12px; font-size: 13px; flex-shrink: 0; }
.lines-card .lines-foot { margin: 4px -14px -14px; padding: 10px 14px; background: var(--sunk); border-top: 1px solid var(--line-2);
  border-radius: 0 0 var(--radius) var(--radius); font-size: 13px; color: var(--ink-2); }
.lines-card .lines-foot.bad { background: var(--bad-bg); color: var(--bad); }
.msg-row { display: flex; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 15px; }
.msg-row:last-of-type { border-bottom: 0; }
.lines-card .line-item:has(+ .lines-foot) { border-bottom: 0; }
a.ink-link { color: var(--ink); text-decoration: none; } a.ink-link:hover { color: var(--accent); text-decoration: underline; }
.lines-card .line-item:first-child { padding-top: 0; }
@media (min-width: 800px) { .od-actions { max-width: 440px; } }
/* Иконка на экране телефона (display: standalone, viewport-fit=cover): поля под вырез экрана и скругления.
   Сверху на iPhone чёрная строка состояния (apple-mobile-web-app-status-bar-style: black) — страница под неё не заходит,
   но в альбомной ориентации вырез оказывается сбоку. В обычном браузере env() = 0, ничего не меняется. */
header.top { padding-top: max(10px, env(safe-area-inset-top)); padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right)); }
main { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
nav.bottom { padding-left: max(4px, env(safe-area-inset-left)); padding-right: max(4px, env(safe-area-inset-right)); }
@media (max-width: 799px) {
  body:has(main .head-back) main { padding-top: max(8px, env(safe-area-inset-top)); }
  body:has(main .head-back) .actions-bar { padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right)); }
}
@media (min-width: 800px) {
  header.top { padding-left: max(24px, env(safe-area-inset-left)); padding-right: max(24px, env(safe-area-inset-right)); }
  main { padding-left: max(24px, env(safe-area-inset-left)); padding-right: max(24px, env(safe-area-inset-right)); }
}
