/* ==========================================================================
   Добродом — личный кабинет
   Токены те же, что на лендинге. Mobile-first: базовые стили — для телефона
   мастера на участке, медиазапросы добавляют десктоп.
   ========================================================================== */

:root {
    --sand:        #F5F3EC;
    --sand-deep:   #EDEAE0;
    --pine:        #14251D;
    --green:       #2C6A4A;
    --green-dark:  #22553B;
    --green-soft:  #E6EFE9;
    --brass:       #B9924F;
    --brass-soft:  #F6EFE2;

    --ink:         #14251D;
    --ink-muted:   #5B6B62;
    --line:        #DCD8CB;
    --white:       #FFFFFF;

    --danger:      #A6382E;
    --danger-soft: #F8E9E7;
    --warning:     #9A6B12;
    --warning-soft:#FBF1DC;
    --info:        #2F5D78;
    --info-soft:   #E6EEF3;

    --radius:      14px;
    --radius-sm:   9px;
    --shadow:      0 1px 2px rgba(20, 37, 29, .06), 0 8px 24px rgba(20, 37, 29, .06);
    --shadow-sm:   0 1px 2px rgba(20, 37, 29, .08);

    --font-text:   'Golos Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-title:  'Piazzolla', Georgia, 'Times New Roman', serif;

    --header-h:    58px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--sand);
    color: var(--ink);
    font-family: var(--font-text);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--font-title);
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 .5em;
    letter-spacing: -.01em;
}
h1 { font-size: 26px; }
h2 { font-size: 21px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; font-family: var(--font-text); font-weight: 600; }

p { margin: 0 0 1em; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

/* ─── Каркас ────────────────────────────────────────────────────────────── */

.layout { min-height: 100vh; display: flex; flex-direction: column; }

.header {
    position: sticky; top: 0; z-index: 40;
    height: var(--header-h);
    display: flex; align-items: center; gap: 12px;
    padding: 0 16px;
    background: var(--pine);
    color: var(--sand);
}
.header a { color: var(--sand); }
.header__logo {
    display: flex; align-items: center; gap: 9px;
    font-family: var(--font-title); font-size: 18px; font-weight: 600;
    text-decoration: none; white-space: nowrap;
}
.header__logo img { width: 28px; height: 28px; border-radius: 6px; }
.header__logo:hover { text-decoration: none; }
.header__spacer { flex: 1; }
.header__user {
    font-size: 13px; color: rgba(245, 243, 236, .72);
    max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.header__burger {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; margin-left: -8px;
    border: 0; border-radius: 9px; background: transparent;
    color: var(--sand); cursor: pointer;
}
.header__burger svg { width: 22px; height: 22px; }

/* На телефоне меню — выпадающая панель ПОД шапкой. Раньше оно было обычным
   flex-элементом внутри шапки высотой 58px и просто не помещалось: пункты
   обрезались, и меню выглядело отсутствующим. */
.nav {
    display: none;
    position: absolute;
    top: var(--header-h); left: 0; right: 0;
    z-index: 50;
    background: var(--pine);
    border-top: 1px solid rgba(245, 243, 236, .12);
    box-shadow: 0 12px 24px rgba(20, 37, 29, .28);
    padding: 6px 8px 12px;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
}
.nav.is-open { display: block; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav a {
    display: block; padding: 11px 12px; border-radius: 9px;
    color: rgba(245, 243, 236, .82); font-size: 15px;
}
.nav a:hover { background: rgba(245, 243, 236, .08); text-decoration: none; }
.nav a.is-active { background: var(--green); color: #fff; }
.nav__group { margin-top: 6px; padding: 8px 12px 2px; font-size: 11px;
    text-transform: uppercase; letter-spacing: .08em; color: rgba(245, 243, 236, .45); }
.nav__logout {
    display: block; width: 100%; text-align: left;
    padding: 11px 12px; border: 0; border-radius: 9px;
    background: none; color: rgba(245, 243, 236, .82);
    font: inherit; font-size: 15px; cursor: pointer;
}
.nav__logout:hover { background: rgba(245, 243, 236, .08); }

.main { flex: 1; padding: 18px 16px 56px; }
.container { max-width: 1120px; margin: 0 auto; }
.container--narrow { max-width: 720px; }

@media (min-width: 900px) {
    .header { padding: 0 24px; }
    .header__burger { display: none; }

    /* На широком экране меню — строка внутри шапки. Профиль и выход отсюда
       убираем: они и так есть в правом углу, а из-за них панель становилась
       выше шапки и пункты уезжали за её край. */
    .nav {
        display: block; position: static; margin-left: 8px; padding: 0;
        background: transparent; border: 0; box-shadow: none;
        max-height: none; overflow: visible;
    }
    /* nowrap обязателен: со счётчиками пункты стали шире и меню переносилось
       на вторую строку, вылезая за фиксированную высоту шапки. */
    .nav__list { display: flex; align-items: center; gap: 1px; flex-wrap: nowrap; }
    .nav a { padding: 7px 9px; font-size: 14px; white-space: nowrap; }
    .nav__group, .nav__profile { display: none; }

    .main { padding: 26px 24px 72px; }
    h1 { font-size: 32px; }
}

/* ─── Карточки ──────────────────────────────────────────────────────────── */

.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
}
.card--flat { box-shadow: none; }
.card--accent { border-left: 3px solid var(--brass); }
.card__title {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    margin: 0 0 12px;
}
.card__title h2, .card__title h3 { margin: 0; }

.grid { display: grid; gap: 14px; }
@media (min-width: 760px) {
    .grid--2 { grid-template-columns: repeat(2, 1fr); }
    .grid--3 { grid-template-columns: repeat(3, 1fr); }
    .grid--4 { grid-template-columns: repeat(4, 1fr); }
    .grid--sidebar { grid-template-columns: 1fr 320px; align-items: start; }
}

.page-head {
    display: flex; flex-wrap: wrap; align-items: flex-start;
    justify-content: space-between; gap: 12px; margin-bottom: 18px;
}
.page-head__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.page-head p { margin: 4px 0 0; color: var(--ink-muted); font-size: 14px; }

.breadcrumbs { font-size: 13px; color: var(--ink-muted); margin-bottom: 8px; }
.breadcrumbs a { color: var(--ink-muted); }

/* ─── Кнопки ────────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    min-height: 44px; padding: 10px 18px;
    border: 1px solid transparent; border-radius: 10px;
    background: var(--green); color: #fff;
    font-family: inherit; font-size: 15px; font-weight: 500; line-height: 1.2;
    text-decoration: none; cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--green-dark); text-decoration: none; color: #fff; }
.btn:disabled, .btn.is-disabled { opacity: .5; cursor: not-allowed; }

.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { background: var(--sand-deep); color: var(--ink); }
.btn--brass { background: var(--brass); }
.btn--brass:hover { background: #A47F3F; }
.btn--danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn--danger:hover { background: var(--danger-soft); color: var(--danger); }
.btn--sm { min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 8px; }
.btn--block { width: 100%; }
.btn--wa { background: #1FA855; }
.btn--wa:hover { background: #17914A; }

.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ─── Формы ─────────────────────────────────────────────────────────────── */

.field { margin-bottom: 14px; }
.field__label {
    display: block; margin-bottom: 5px;
    font-size: 14px; font-weight: 500; color: var(--ink);
}
.field__label .req { color: var(--danger); }
.field__hint { margin-top: 4px; font-size: 12.5px; color: var(--ink-muted); }
.field__error { margin-top: 4px; font-size: 13px; color: var(--danger); }
.field__unit { margin-left: 6px; color: var(--ink-muted); font-size: 13px; }

input[type=text], input[type=tel], input[type=email], input[type=password],
input[type=number], input[type=date], input[type=time], input[type=datetime-local],
input[type=month], select, textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--white);
    color: var(--ink);
    font-family: inherit; font-size: 16px; /* 16px — чтобы iOS не зумил форму */
    line-height: 1.4;
}
textarea { min-height: 88px; resize: vertical; }
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%235B6B62' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
    background-size: 12px; padding-right: 34px;
}
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(44, 106, 74, .14);
}
.field.has-error input, .field.has-error select, .field.has-error textarea {
    border-color: var(--danger);
}

.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.check input[type=checkbox] { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--green); }
.check span { font-size: 15px; }

.form-grid { display: grid; gap: 0 14px; }
@media (min-width: 700px) { .form-grid--2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 700px) { .form-grid--3 { grid-template-columns: 1fr 1fr 1fr; } }

.form-actions {
    display: flex; flex-wrap: wrap; gap: 8px;
    padding-top: 12px; margin-top: 4px; border-top: 1px solid var(--line);
}

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; align-items: center; }
.filters input[type=text], .filters select { width: auto; min-width: 180px; flex: 1 1 180px; }

/* ─── Таблицы и списки ──────────────────────────────────────────────────── */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -16px; padding: 0 16px; }
table.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.table th {
    text-align: left; font-weight: 600; font-size: 12px; text-transform: uppercase;
    letter-spacing: .05em; color: var(--ink-muted);
    padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.table td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.table tr:last-child td { border-bottom: 0; }
table.table tbody tr:hover { background: var(--sand); }
.table__num { text-align: right; white-space: nowrap; }

.list { list-style: none; margin: 0; padding: 0; }
.list__item {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 12px 0; border-bottom: 1px solid var(--line);
}
.list__item:last-child { border-bottom: 0; }
.list__item:hover { background: transparent; }
.list__body { flex: 1; min-width: 0; }
.list__title { font-weight: 500; margin: 0 0 2px; }
.list__meta { font-size: 13px; color: var(--ink-muted); }

.empty {
    padding: 28px 16px; text-align: center; color: var(--ink-muted);
    background: var(--sand); border: 1px dashed var(--line); border-radius: var(--radius);
    font-size: 14.5px;
}

/* ─── Метки ─────────────────────────────────────────────────────────────── */

.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 9px; border-radius: 100px;
    font-size: 12.5px; font-weight: 500; white-space: nowrap;
    background: var(--sand-deep); color: var(--ink-muted);
}
.badge--accent  { background: var(--brass-soft); color: #8A6A2C; }
.badge--success { background: var(--green-soft); color: var(--green-dark); }
.badge--warning { background: var(--warning-soft); color: var(--warning); }
.badge--danger  { background: var(--danger-soft); color: var(--danger); }
.badge--info    { background: var(--info-soft); color: var(--info); }
.badge--muted   { background: var(--sand-deep); color: var(--ink-muted); }

.stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat__value { font-family: var(--font-title); font-size: 28px; line-height: 1; }
.stat__label { font-size: 13px; color: var(--ink-muted); margin-top: 6px; }

.progress { height: 7px; border-radius: 100px; background: var(--sand-deep); overflow: hidden; }
.progress__bar { height: 100%; background: var(--green); border-radius: 100px; }

/* ─── Флеш-сообщения ────────────────────────────────────────────────────── */

.flash { margin-bottom: 14px; }
.flash__item {
    display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap;
    padding: 12px 14px; border-radius: var(--radius-sm);
    font-size: 14.5px; margin-bottom: 8px;
    border: 1px solid transparent;
}
/* Пояснение под сообщением занимает всю ширину: в узкой колонке карточки
   иначе получается два тесных столбца вместо двух строк. */
.flash__item > div { flex: 1 1 100%; }
.flash__item--success { background: var(--green-soft); color: var(--green-dark); border-color: #CBE0D4; }
.flash__item--error   { background: var(--danger-soft); color: var(--danger); border-color: #EFD3CF; }
.flash__item--warning { background: var(--warning-soft); color: var(--warning); border-color: #EEDDB6; }
.flash__item--info    { background: var(--info-soft); color: var(--info); border-color: #CFDFE9; }

/* ─── Паспорт дома ──────────────────────────────────────────────────────── */

.spec { display: grid; gap: 0; }
.spec__row {
    display: flex; gap: 12px; justify-content: space-between;
    padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px;
}
.spec__row:last-child { border-bottom: 0; }
.spec__key { color: var(--ink-muted); flex: 0 1 auto; }
.spec__val { text-align: right; font-weight: 500; word-break: break-word; }
.spec__val--empty { font-weight: 400; color: #A9B2AC; }

.section-tabs {
    display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px;
    margin: 0 -16px 14px; padding-left: 16px; padding-right: 16px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.section-tabs::-webkit-scrollbar { display: none; }
.section-tabs a {
    flex: none; padding: 8px 14px; border-radius: 100px;
    background: var(--white); border: 1px solid var(--line);
    font-size: 14px; color: var(--ink); white-space: nowrap;
}
.section-tabs a.is-active { background: var(--pine); border-color: var(--pine); color: var(--sand); }
.section-tabs a:hover { text-decoration: none; }

/* Журнал изменений паспорта */
.timeline { position: relative; padding-left: 20px; }
.timeline::before {
    content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px;
    width: 2px; background: var(--line);
}
.timeline__item { position: relative; padding: 0 0 16px; }
.timeline__item::before {
    content: ''; position: absolute; left: -19px; top: 6px;
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--green); border: 2px solid var(--sand);
}
.timeline__meta { font-size: 12.5px; color: var(--ink-muted); margin-bottom: 3px; }
.timeline__change { font-size: 14px; }
.timeline__change del { color: var(--ink-muted); text-decoration: line-through; }
.timeline__change ins { color: var(--green-dark); text-decoration: none; font-weight: 500; }

/* ─── Лента обращения ───────────────────────────────────────────────────── */

.chat { display: flex; flex-direction: column; gap: 12px; }
.chat__msg { max-width: 92%; }
.chat__msg--own { align-self: flex-end; }
.chat__bubble {
    padding: 10px 13px; border-radius: 14px;
    background: var(--white); border: 1px solid var(--line);
    font-size: 15px; white-space: pre-line; word-break: break-word;
}
.chat__msg--own .chat__bubble { background: var(--green-soft); border-color: #CBE0D4; }
.chat__meta { font-size: 12px; color: var(--ink-muted); margin: 4px 2px 0; }
.chat__system {
    align-self: center; font-size: 12.5px; color: var(--ink-muted);
    background: var(--sand-deep); padding: 4px 12px; border-radius: 100px;
}

/* ─── Фото ──────────────────────────────────────────────────────────────── */

.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.photo {
    position: relative; aspect-ratio: 1; border-radius: var(--radius-sm);
    overflow: hidden; background: var(--sand-deep); border: 1px solid var(--line);
}
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo__del {
    position: absolute; top: 4px; right: 4px;
    width: 26px; height: 26px; border: 0; border-radius: 50%;
    background: rgba(20, 37, 29, .72); color: #fff;
    font-size: 15px; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.uploader {
    display: block; padding: 16px; text-align: center;
    border: 1.5px dashed var(--line); border-radius: var(--radius-sm);
    background: var(--sand); color: var(--ink-muted); font-size: 14.5px; cursor: pointer;
}
.uploader input[type=file] { display: none; }
.uploader:hover { border-color: var(--green); color: var(--green); }

/* ─── Состояние узла (чек-лист) ─────────────────────────────────────────── */

.state { display: grid; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.state:last-of-type { border-bottom: 0; }
.state__label { font-weight: 500; font-size: 15px; }
.state__opts { display: flex; flex-wrap: wrap; gap: 6px; }
.state__opt { position: relative; }
.state__opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.state__opt span {
    display: inline-block; padding: 7px 13px; border-radius: 100px;
    border: 1px solid var(--line); background: var(--white);
    font-size: 13.5px; cursor: pointer; user-select: none;
}
.state__opt input:checked + span { background: var(--pine); border-color: var(--pine); color: var(--sand); }
.state__opt input:focus-visible + span { box-shadow: 0 0 0 3px rgba(44, 106, 74, .18); }
.state__opt--ok    input:checked + span { background: var(--green); border-color: var(--green); }
.state__opt--attn  input:checked + span { background: var(--brass); border-color: var(--brass); color: #fff; }
.state__opt--fault input:checked + span { background: var(--danger); border-color: var(--danger); color: #fff; }
.state input[type=text] { min-height: 40px; font-size: 15px; }

/* ─── Повторяющиеся строки (работы, материалы) ──────────────────────────── */

.rows { display: grid; gap: 10px; }
.row-item {
    display: grid; gap: 8px;
    padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: var(--sand);
}
.row-item__head {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 12.5px; color: var(--ink-muted);
}
.row-item__del {
    border: 0; background: transparent; color: var(--danger);
    font-size: 13px; cursor: pointer; padding: 2px 4px;
}
.row-item__edit {
    border: 0; background: transparent; color: var(--green);
    font-size: 13px; cursor: pointer; padding: 2px 4px;
}
.row-item__edit:hover, .row-item__del:hover { text-decoration: underline; }
/* Строка правки разворачивается под значениями и занимает всю ширину таблицы. */
tr[data-item-form] > td { background: var(--sand); }
.row-item__grid { display: grid; gap: 8px; grid-template-columns: repeat(2, 1fr); }
.row-item__grid .col-wide { grid-column: 1 / -1; }
.row-item label { display: block; font-size: 12px; color: var(--ink-muted); margin-bottom: 3px; }
.row-item input, .row-item select { min-height: 40px; font-size: 15px; }
.rows__total {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 12px; background: var(--green-soft); border-radius: var(--radius-sm);
    font-weight: 600;
}
@media (min-width: 760px) {
    .row-item__grid { grid-template-columns: 3fr 1fr 1fr 1.2fr 1.2fr; }
    .row-item__grid .col-wide { grid-column: auto; }
}

/* ─── Автосохранение ────────────────────────────────────────────────────── */

.autosave {
    position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%);
    z-index: 60; padding: 8px 16px; border-radius: 100px;
    background: var(--pine); color: var(--sand); font-size: 13px;
    box-shadow: var(--shadow); opacity: 0; pointer-events: none;
    transition: opacity .25s ease;
}
.autosave.is-visible { opacity: 1; }
.autosave--error { background: var(--danger); }

.sticky-actions {
    position: sticky; bottom: 0; z-index: 30;
    margin: 18px -16px -56px; padding: 12px 16px;
    background: rgba(245, 243, 236, .94);
    backdrop-filter: blur(6px);
    border-top: 1px solid var(--line);
    display: flex; gap: 8px;
}
.sticky-actions .btn { flex: 1; }
@media (min-width: 900px) {
    .sticky-actions { position: static; margin: 18px 0 0; padding: 12px 0 0;
        background: transparent; backdrop-filter: none; }
    .sticky-actions .btn { flex: 0 0 auto; }
}

/* ─── Экран входа ───────────────────────────────────────────────────────── */

.auth {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 24px 16px;
    background: linear-gradient(160deg, var(--sand) 0%, var(--sand-deep) 100%);
}
.auth__box { width: 100%; max-width: 400px; }
.auth__brand {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    margin-bottom: 20px;
    font-family: var(--font-title); font-size: 24px; color: var(--pine);
}
.auth__brand img { width: 36px; height: 36px; border-radius: 8px; }
.auth__card {
    background: var(--white); border: 1px solid var(--line);
    border-radius: 18px; padding: 24px; box-shadow: var(--shadow);
}
.auth__lead { color: var(--ink-muted); font-size: 14.5px; margin-bottom: 18px; }
.auth__alt { text-align: center; margin-top: 16px; font-size: 14px; }
.auth__foot { text-align: center; margin-top: 18px; font-size: 13px; color: var(--ink-muted); }
.code-input {
    letter-spacing: .5em; text-align: center;
    font-size: 26px !important; font-weight: 600; padding-left: .5em !important;
}

/* ─── Мелочи ────────────────────────────────────────────────────────────── */

.muted { color: var(--ink-muted); }
.text-danger { color: var(--danger); font-weight: 600; }

/* Строка списка, из-за которой горит красная цифра в меню. */
.row--attention > td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.list__item--attention { box-shadow: inset 3px 0 0 var(--danger); padding-left: 11px; }
a.badge--danger { text-decoration: none; }
a.badge--danger:hover { filter: brightness(.94); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; }
.text-right { text-align: right; }
.divider { height: 1px; background: var(--line); margin: 16px 0; border: 0; }
.inline-form { display: inline; }

.price-box {
    padding: 14px 16px; border-radius: var(--radius-sm);
    background: var(--brass-soft); border: 1px solid #E8D9BC;
}
.price-box__amount { font-family: var(--font-title); font-size: 26px; color: var(--pine); }

@media print {
    .header, .nav, .form-actions, .sticky-actions, .btn, .flash { display: none !important; }
    body { background: #fff; }
    .card { border: 0; box-shadow: none; padding: 0; }
}

/* ─── Выбор дома с подсказкой ──────────────────────────────────────────────
   Появляется вместо выпадающего списка, когда домов много.
   ───────────────────────────────────────────────────────────────────────── */

.picker { position: relative; }

.picker__list {
    position: absolute;
    z-index: 20;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    margin: 0;
    padding: 4px;
    list-style: none;
    max-height: 280px;
    overflow-y: auto;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
}

.picker__item {
    padding: 9px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    line-height: 1.3;
}

.picker__item.is-active { background: var(--green-soft); }

.picker__hint {
    display: block;
    margin-top: 2px;
    font-size: .82rem;
    color: var(--ink-muted);
}

.picker__empty {
    padding: 9px 10px;
    color: var(--ink-muted);
    font-size: .9rem;
}

/* ─── Счётчик «требует действия» в меню ────────────────────────────────────
   Цифра, а не мигание: мигающий элемент раздражает уже на второй день.
   ───────────────────────────────────────────────────────────────────────── */

.nav__count {
    display: inline-block;
    min-width: 17px;
    margin-left: 4px;
    padding: 0 4px;
    border-radius: 9px;
    background: var(--danger);
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    vertical-align: text-top;
}
