@font-face {
    font-family: "TildaSans";
    src: url("../fonts/TildaSans-VF.woff2") format("woff2-variations");
    font-weight: 250 1000;
    font-display: swap;
}

:root {
    --ink: #041923;
    --ink-soft: #2d3f47;
    --muted: #687d86;
    --accent: #f7400a;
    --accent-dark: #e03604;
    --blue: #8ec7e3;
    --bg: #edf2f4;
    --white: #fff;
    --line: #dce7eb;
    --ok: #1f9d55;
    --warn: #d97706;
    --err: #dc2626;
    --font: "TildaSans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

body.panel-body {
    margin: 0;
    background: #f5f8f9;
    color: var(--ink);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.panel-top {
    background: var(--ink);
    color: #fff;
}

.panel-top__inner {
    display: flex;
    align-items: center;
    gap: 28px;
    max-width: 1240px;
    margin: 0 auto;
    padding: 14px 24px;
    flex-wrap: wrap;
}

.panel-top__logo { display: flex; align-items: center; gap: 14px; color: #fff; }
.panel-top__logo:hover { text-decoration: none; }
.panel-top__logo img { height: 26px; width: auto; }
.panel-top__logo span {
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    font-size: 12px;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.panel-top__nav { display: flex; gap: 18px; flex-wrap: wrap; }
.panel-top__nav a { color: rgba(255, 255, 255, .82); font-size: 14px; }
.panel-top__nav a:hover { color: #fff; }
.panel-nav-badge {
    display: inline-flex;
    min-width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    vertical-align: middle;
}

.panel-top__user { display: flex; align-items: center; gap: 12px; margin-left: auto; font-size: 13px; color: rgba(255, 255, 255, .78); }
.panel-top__user form { margin: 0; }
.panel-link { padding: 0; border: 0; background: none; color: var(--blue); font: inherit; cursor: pointer; }
.panel-link:hover { color: #fff; text-decoration: underline; }

.panel-main { max-width: 1240px; margin: 0 auto; padding: 32px 24px 80px; }

.flash {
    margin-bottom: 20px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    background: #e8f5ee;
    color: var(--ok);
}
.flash--error { background: #fdecec; color: #b42318; }
.flash--warn { background: #fef6e7; color: #92400e; }

.panel-h1 { margin: 0 0 6px; font-size: 30px; font-weight: 700; }
.panel-lead { margin: 0 0 26px; color: var(--muted); }

.card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
}
.card + .card { margin-top: 16px; }
.card--article-editor { overflow: visible; }
.card h2 { margin: 0 0 16px; font-size: 20px; }

.panel-breadcrumb { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.panel-breadcrumb a { color: var(--muted); }
.panel-breadcrumb a:hover { color: var(--accent); }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.card__head h2 { margin: 0; }
.card--form { margin-bottom: 16px; }
.card--danger-zone { border-color: #f3c3c3; }
.card--danger-zone h2 { color: var(--err); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background .18s ease;
}
.btn:hover { background: var(--accent-dark); text-decoration: none; color: #fff; }
.btn--ghost { border-color: var(--line); background: #fff; color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); background: #fff; color: var(--ink); }
.btn--danger { background: #fff; border-color: #f3c3c3; color: var(--err); }
.btn--danger:hover { background: #fdecec; color: var(--err); }
.btn--sm { min-height: 34px; padding: 0 14px; font-size: 13px; }
.panel-main .table .btn { white-space: nowrap; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.field { margin-bottom: 18px; }
.field > label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; letter-spacing: .01em; }
.field__hint { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.field__error { display: block; margin-top: 6px; color: var(--err); font-size: 12px; }

/* пример заполнения под полем */
.field__example {
    margin-top: 8px;
    padding: 10px 12px;
    border-left: 3px solid #c7e7f7;
    border-radius: 0 10px 10px 0;
    background: #f4f9fc;
    color: #5b7079;
    font-size: 12.5px;
    line-height: 1.5;
}

.field__example b {
    color: #041923;
    font-weight: 600;
}

/* заезд/выезд в одну строку */
.field--split > div {
    display: inline-block;
    width: calc(50% - 9px);
    margin-right: 14px;
    vertical-align: top;
}
.field--split > div:last-of-type { margin-right: 0; }

@media (max-width: 520px) {
    .field--split > div {
        display: block;
        width: 100%;
        margin: 0 0 12px;
    }
}
.field--split input[type=time] {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}

input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=url], select, textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(247, 64, 10, .35); outline-offset: 1px; }
textarea { min-height: 130px; resize: vertical; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 18px; }

.checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
}
.checkbox input { width: 18px; height: 18px; accent-color: var(--accent); }
.checks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.auth-card { max-width: 440px; margin: 60px auto; }
.auth-card .card { padding: 28px; }
.auth-card__submit { width: 100%; margin-top: 4px; }

.auth-alt {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
}
.auth-alt p { margin: 0 0 6px; }
.auth-alt p:last-child { margin-bottom: 0; }

.checkbox--agree {
    align-items: flex-start;
    margin: 0 0 18px;
    font-size: 13px;
    line-height: 1.45;
}
.checkbox--agree input { flex: 0 0 auto; margin-top: 2px; }
.checkbox--agree a { color: var(--accent); }

.debug-link {
    margin: 14px 0;
    padding: 12px 14px;
    border: 1px dashed #c7d5db;
    border-radius: 12px;
    background: #f7fafb;
    font-size: 12.5px;
    word-break: break-all;
}
.debug-link b { display: block; margin-bottom: 4px; }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap .table { min-width: 680px; }
@media (max-width: 640px) {
    .table-wrap .table { min-width: 0; }
    .table thead, .table tbody, .table tr, .table td { display: block; width: 100%; }
    .table thead { display: none; }
    .table tr { padding: 16px; border-bottom: 1px solid var(--line); }
    .table tbody { display: grid; gap: 0; }
    .table tr:last-child { border-bottom: 0; }
    .table td { display: flex; gap: 12px; padding: 4px 0; border: 0; }
    .table td::before {
        content: attr(data-label);
        flex: 0 0 92px;
        color: var(--muted);
        font-size: 12px;
        line-height: 1.7;
    }
    .table td[data-label="Объект"] { display: block; margin-bottom: 6px; }
    .table td[data-label="Объект"]::before { content: none; }
    .table td[data-label="Объект"],
    .table td[data-label="Владелец"],
    .table td[data-label="Сущность"] { display: flex; flex-wrap: wrap; gap: 4px 10px; }
    .table td[data-label="Объект"]::before,
    .table td[data-label="Владелец"]::before,
    .table td[data-label="Сущность"]::before { content: none; }
    .table td.table__actions,
    .table td[style*="text-align:right"] {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 10px;
        padding-top: 12px;
        border-top: 1px solid #eef3f5;
        white-space: normal;
        text-align: left;
    }
    .table td.table__actions::before,
    .table td[style*="text-align:right"]::before { content: none; }
    .table td form { margin: 0; }
    .table .btn { margin: 0; }
}
.table th { padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; text-transform: uppercase; letter-spacing: .05em; }
.table td { padding: 12px; border-bottom: 1px solid #eef3f5; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table__row:hover td { background: #fafcfd; }

.status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.status--published { background: #e8f5ee; color: var(--ok); }
.status--draft { background: #eef3f5; color: var(--muted); }
.status--scheduled { background: #eef4ff; color: #2b5fd9; }
.status--moderation { background: #fef6e7; color: var(--warn); }
.status--hidden { background: #eef3f5; color: var(--muted); }
.status--blocked { background: #fdecec; color: var(--err); }
.status--expired { background: #f3f4f6; color: var(--muted); }

.steps { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.steps a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink-soft);
    font-size: 13px;
}
.steps a.is-done { border-color: #bfe3cd; background: #eefaf3; color: var(--ok); }
.steps a.is-current { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.steps b { display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center; border-radius: 50%; background: #eef3f5; font-size: 12px; }
.steps a.is-current b { background: var(--accent); color: #fff; }

.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; align-items: center; }
.actions .spacer { margin-left: auto; }

.empty-state { padding: 48px 24px; border: 1px dashed var(--line); border-radius: 18px; background: #fff; text-align: center; }
.empty-state h2 { margin: 0 0 8px; }
.empty-state p { margin: 0 0 20px; color: var(--muted); }

.preview-thumb { width: 88px; height: 88px; border-radius: 12px; object-fit: cover; background: var(--bg); }

@media (max-width: 860px) {
    .grid-2, .grid-3, .checks { grid-template-columns: 1fr; }
    .panel-top__inner { gap: 14px; }
    .panel-top__nav { order: 3; width: 100%; }
}

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.photo-item { position: relative; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.photo-item img { display: block; width: 100%; height: 130px; object-fit: cover; }
.photo-item.is-cover { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(247, 64, 10, .18); }
.photo-item__badge { position: absolute; top: 8px; left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; }
.photo-item__actions { display: flex; gap: 12px; padding: 8px 10px; background: #fff; font-size: 12px; }
.photo-item__actions form { margin: 0; }
.panel-link--danger { color: var(--err); }

/* ---------- комнаты ---------- */
.notice { margin: 0 0 16px; padding: 12px 16px; border-radius: 12px; background: #fef6e7; color: #92400e; font-size: 14px; }
.notice--ok { background: #ecfdf3; color: #027a48; }
.field--wide { grid-column: span 2; }

/* ---------- зона загрузки фото ---------- */
.dropzone {
    position: relative;
    border: 2px dashed var(--line);
    border-radius: 16px;
    background: #fafcfd;
    transition: border-color .18s ease, background .18s ease;
}
.dropzone.is-dragover { border-color: var(--accent); background: #fff6f2; }
.dropzone__input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.dropzone__label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
}
.dropzone__icon { font-size: 26px; line-height: 1; color: var(--accent); }
.dropzone__text { font-weight: 600; font-size: 15px; }
.dropzone__hint { color: var(--muted); font-size: 12px; }
.dropzone__list { display: grid; gap: 8px; margin: 0; padding: 0 14px 14px; list-style: none; }
.dropzone__list:empty { display: none; }
.dropzone__file {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    font-size: 13px;
}
.dropzone__thumb { width: 44px; height: 33px; border-radius: 6px; object-fit: cover; background: var(--bg); }
.dropzone__file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropzone__file-size { color: var(--muted); font-size: 12px; white-space: nowrap; }
.dropzone__remove {
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 50%;
    background: var(--bg);
    color: var(--muted);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}
.dropzone__remove:hover { background: #fdecec; color: var(--err); }

.upload-progress { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.upload-progress__bar { flex: 1; height: 8px; overflow: hidden; border-radius: 999px; background: var(--bg); }
.upload-progress__bar span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width .2s ease; }
.upload-progress__text { color: var(--muted); font-size: 12px; white-space: nowrap; }

/* ---------- формы комнат ---------- */
.room-forms { display: grid; gap: 16px; }
.room-forms__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 8px 0 0; }
.room-forms__head h2 { margin: 0; font-size: 20px; }
.room-form { border-left: 4px solid #f3d6a6; }
.room-form__title { margin: 0 0 16px; font-size: 18px; }
.room-form__summary {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    cursor: pointer;
    list-style: none;
}
.room-form__summary::-webkit-details-marker { display: none; }
.room-form__name { font-size: 17px; font-weight: 700; }
.room-form__meta { color: var(--muted); font-size: 13px; }
.room-form[open] .room-form__summary { margin-bottom: 18px; }
.room-form__delete { margin-top: 12px; }
.room-form__photos { display: grid; gap: 12px; }
.actions--sticky { position: sticky; bottom: 0; padding: 12px 0; background: rgba(255, 255, 255, .96); border-top: 1px solid var(--line); }

.months-input { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.months-input__item { display: flex; flex-direction: column; gap: 4px; }
.months-input__item span { color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; }
.months-input__item input { width: 100%; padding: 8px 10px; }
.months-input__closed { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 11px; white-space: nowrap; cursor: pointer; }
.months-input__closed input { width: auto; accent-color: var(--accent); }

.room-list { margin-top: 16px; display: grid; gap: 12px; }
.room-card { border-left: 4px solid #f3d6a6; }
.room-card.is-ready { border-left-color: var(--ok); }
.room-card__head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.room-card__img { flex: none; width: 120px; height: 90px; border-radius: 12px; object-fit: cover; background: var(--bg); }
.room-card__img--empty { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; }
.room-card__info { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.room-card__info strong { font-size: 17px; }
.room-card__meta { color: var(--muted); font-size: 13px; }
.room-card__prices { display: flex; flex-wrap: wrap; gap: 6px; }
.room-card__price { padding: 2px 8px; border-radius: 999px; background: var(--bg); font-size: 12px; color: var(--ink); }
.room-card__warn { color: #92400e; font-size: 13px; font-weight: 600; }
.room-card__actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.room-card__upload { margin-top: 16px; }
.room-card__subtitle { margin: 26px 0 6px; font-size: 18px; }

@media (max-width: 720px) {
    .months-input { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .field--wide { grid-column: auto; }
    .room-card__actions { flex-direction: row; align-items: center; width: 100%; }
}

.checklist { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.checklist li { display: flex; gap: 10px; align-items: center; font-size: 15px; }
.checklist .is-done span { color: var(--ok); font-weight: 700; }
.checklist a { color: var(--ink); }
.checklist a:hover { color: var(--accent); }
.checklist .is-todo span { color: var(--warn); font-weight: 700; }

.preview { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.preview__img { width: 320px; height: 240px; border-radius: 14px; object-fit: cover; background: var(--bg); }
.preview__img--empty { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; }
.preview__title { font-size: 20px; font-weight: 700; }
.preview__meta { color: var(--muted); font-size: 13px; }
.preview__price { margin-top: 10px; font-size: 18px; font-weight: 700; }

.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 20px; }
.stat { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.stat b { display: block; font-size: 24px; }
.stat span { color: var(--muted); font-size: 12px; }

.filters-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filters-bar select, .filters-bar input { width: auto; min-width: 160px; padding: 8px 12px; }

.user-limit { display: inline-flex; align-items: center; gap: 6px; }
.user-limit input { width: 64px; padding: 6px 8px; }

.card--hint { margin-top: 20px; color: var(--muted); font-size: 13.5px; }
.card--hint p { margin: 0; }

.settings-mode {
    display: grid;
    gap: 4px;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f7fafb;
    font-size: 14px;
}
.settings-mode span { color: var(--muted); font-size: 12.5px; }

@media (max-width: 1100px) { .stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- редактор статьи (WYSIWYG) ---------- */
.article-editor {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.article-editor__toolbar {
    position: sticky;
    top: 10px;
    z-index: 30;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(248, 251, 253, 0.97);
    box-shadow: 0 10px 24px -22px rgba(4, 25, 35, 0.5);
    backdrop-filter: blur(6px);
}

.article-editor__btn {
    min-width: 34px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.article-editor__btn:hover,
.article-editor__btn.is-active {
    border-color: #bfe4f6;
    background: #eef7fc;
    color: var(--accent-dark);
}

.article-editor__btn--accent {
    border-color: transparent;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
}

.article-editor__btn--accent:hover {
    border-color: transparent;
    background: var(--accent-dark);
    color: #fff;
}

.article-editor__sep {
    width: 1px;
    height: 20px;
    margin: 0 4px;
    background: var(--line);
}

.article-editor__stat {
    margin-left: auto;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.article-editor__surface {
    min-height: 520px;
    padding: 34px 40px 48px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    color: #041923;
    font-size: 18px;
    line-height: 1.55;
    outline: none;
    overflow-wrap: anywhere;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.article-editor__surface:focus {
    border-color: #bfe4f6;
    box-shadow: 0 0 0 4px rgba(37, 172, 240, 0.12);
}

.article-editor__surface.is-empty::before {
    content: attr(data-placeholder);
    color: #8a9aa1;
    pointer-events: none;
}

.article-editor__surface p {
    margin: 0 0 1.15em;
    font-size: 18px;
    line-height: 1.55;
}

.article-editor__surface h2 {
    margin: 1.5em 0 0.7em;
    color: #041923;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.25;
}

.article-editor__surface h3 {
    margin: 1.3em 0 0.55em;
    color: #041923;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
}

.article-editor__surface ul,
.article-editor__surface ol {
    margin: 0 0 1.2em;
    padding-left: 1.4em;
    font-size: 18px;
    line-height: 1.55;
}

.article-editor__surface li {
    margin-bottom: 0.35em;
}

.article-editor__surface blockquote {
    margin: 0 0 1.2em;
    padding: 12px 20px;
    border-left: 3px solid var(--accent);
    border-radius: 0 12px 12px 0;
    background: #f4f9fc;
    color: #33474f;
    font-size: 17px;
    line-height: 1.65;
}

.article-editor__surface code {
    padding: 2px 6px;
    border-radius: 6px;
    background: #eef4f7;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.92em;
}

.article-editor__surface a {
    color: var(--accent-dark);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.article-editor__surface figure {
    position: relative;
    margin: 1.6em 0;
}

.article-editor__surface figure.article__figure--center {
    margin-right: auto;
    margin-left: auto;
}

.article-editor__surface figure.article__figure--left {
    margin-right: auto;
    margin-left: 0;
}

.article-editor__surface figure.article__figure--right {
    margin-right: 0;
    margin-left: auto;
}

.article-editor__surface figure img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 24px;
}

.article-editor__figure-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(4, 25, 35, 0.14);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    color: #b42318;
    box-shadow: 0 8px 22px -12px rgba(4, 25, 35, 0.55);
    font: 700 23px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.article-editor__figure-remove::before {
    content: "×";
}

.article-editor__figure-remove:hover {
    transform: scale(1.08);
    background: #fff;
    color: #d92d20;
}

.article-editor__insert-marker {
    position: fixed;
    z-index: 70;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    pointer-events: none;
}

.article-editor__insert-marker::before {
    content: "";
    width: 3px;
    height: 42px;
    border-radius: 3px;
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 172, 240, 0.16);
}

.article-editor__insert-marker span {
    margin-top: 6px;
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 8px 18px -10px rgba(4, 25, 35, 0.5);
}

.article-editor__surface figure.is-selected {
    border-radius: 26px;
    outline: 2px solid #25acf0;
    outline-offset: 4px;
}

.article-editor__surface figure.is-uploading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    border: 2px dashed #c7e7f7;
    border-radius: 24px;
    background: #f8fbfd;
}

.article-editor__uploading {
    color: #687d86;
    font-size: 14px;
}

.article-editor__surface figure.is-error {
    padding: 20px;
    border: 2px dashed #f0c2c2;
    border-radius: 24px;
    background: #fff5f5;
    color: var(--err);
    font-size: 14px;
    text-align: center;
}

.article-editor__upload-remove {
    display: block;
    margin: 8px auto 0;
    padding: 3px 10px;
    border: 1px solid #f0c2c2;
    border-radius: 8px;
    background: #fff;
    color: var(--err);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.article-editor__foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
}

.article-editor__bubble {
    position: fixed;
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px;
    border: 1px solid rgba(4, 25, 35, 0.12);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 40px -20px rgba(4, 25, 35, 0.5);
}

.article-editor__bubble button {
    min-width: 32px;
    height: 30px;
    padding: 0 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.article-editor__bubble button:hover,
.article-editor__bubble button.is-active {
    background: #eef7fc;
    color: var(--accent-dark);
}

.article-editor__bubble-sep {
    width: 1px;
    height: 18px;
    margin: 0 3px;
    background: var(--line);
}

.article-editor__image-tools {
    position: fixed;
    z-index: 55;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px;
    max-width: calc(100vw - 24px);
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 40px -20px rgba(4, 25, 35, 0.5);
    font-size: 12px;
}

.article-editor__image-tools label {
    display: flex;
    flex-direction: column;
    gap: 3px;
    color: var(--muted);
}

.article-editor__image-tools select,
.article-editor__image-tools input {
    height: 30px;
    padding: 0 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font: inherit;
    font-size: 12.5px;
}

.article-editor__image-alt input {
    width: 180px;
}

.article-editor__image-delete {
    height: 30px;
    padding: 0 10px;
    border: 1px solid #f0c2c2;
    border-radius: 8px;
    background: #fff5f5;
    color: var(--err);
    font: inherit;
    font-size: 12.5px;
    cursor: pointer;
}

@media (max-width: 720px) {
    .article-editor__surface {
        min-height: 380px;
        padding: 22px 18px 32px;
    }

    .article-editor__surface p,
    .article-editor__surface ul,
    .article-editor__surface ol {
        font-size: 17px;
    }

    .article-editor__surface h2 {
        font-size: 23px;
    }

    .article-editor__surface h3 {
        font-size: 20px;
    }

    .article-editor__stat {
        width: 100%;
        margin-left: 0;
    }

    .article-editor__image-alt input {
        width: 140px;
    }
}

/* диалог вставки фото */
.img-dialog {
    width: min(460px, calc(100vw - 32px));
    padding: 0;
    border: 0;
    border-radius: 18px;
    box-shadow: 0 30px 70px -30px rgba(4, 25, 35, 0.55);
}

.img-dialog::backdrop {
    background: rgba(4, 25, 35, 0.45);
}

.img-dialog__inner {
    padding: 22px 22px 18px;
}

.img-dialog h2 {
    margin: 0 0 16px;
    font-size: 20px;
}

.img-dialog__error {
    margin: 0 0 10px;
    color: var(--err);
    font-size: 13px;
}

@media (max-width: 900px) {
    .editor {
        grid-template-columns: minmax(0, 1fr);
    }

    .editor textarea {
        min-height: 320px;
    }

    .editor__preview {
        max-height: 420px;
    }
}

/* drag-and-drop фото в статье */
.editor__drop {
    position: absolute;
    inset: 0;
    z-index: 8;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    border: 2px dashed var(--accent);
    border-radius: 14px;
    background: rgba(238, 247, 252, 0.94);
    color: var(--accent-dark);
    font-weight: 600;
    text-align: center;
    pointer-events: none;
}

.editor.is-dragover .editor__drop {
    display: flex;
}

.editor__uploads {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.editor__upload {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px 5px 5px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--muted);
    font-size: 12.5px;
}

.editor__upload img {
    width: 40px;
    height: 40px;
    border-radius: 7px;
    object-fit: cover;
    display: block;
}

.editor__upload.is-done {
    border-color: #bfe6cf;
    background: #f2fbf6;
    color: #1f7a4d;
}

.editor__upload.is-error {
    border-color: #f0c2c2;
    background: #fff5f5;
    color: var(--err);
}

.editor__stat {
    margin-left: 6px;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.editor__draft {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 1px solid #f2d9a6;
    border-radius: 12px;
    background: #fffaf0;
    font-size: 13px;
}

.editor__draft .btn {
    padding: 4px 10px;
    font-size: 12px;
}

.img-dialog__drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 14px;
    padding: 18px;
    border: 2px dashed var(--line);
    border-radius: 12px;
    background: #f8fbfd;
    text-align: center;
    font-size: 13px;
}

.img-dialog__drop.is-dragover {
    border-color: var(--accent);
    background: #eef7fc;
}

.img-dialog__drop p {
    margin: 0;
}

.img-dialog__pick {
    padding: 0;
    border: 0;
    background: none;
    color: var(--accent-dark);
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.img-dialog__thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.img-dialog__thumb {
    position: relative;
    width: 72px;
    height: 72px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.img-dialog__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.img-dialog__thumb button {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(4, 25, 35, 0.72);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}

/* ---------- режим ремонта ---------- */

.panel-top__maintenance {
    display: flex;
    align-items: center;
}

.maintenance-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    color: #fff;
    font: inherit;
    font-size: 12.5px;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease;
}

.maintenance-toggle:hover {
    background: rgba(255, 255, 255, .12);
}

.maintenance-toggle.is-on {
    border-color: rgba(247, 64, 10, .75);
    background: rgba(247, 64, 10, .2);
}

.maintenance-toggle__track {
    position: relative;
    width: 30px;
    height: 17px;
    flex: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, .26);
    transition: background .18s ease;
}

.maintenance-toggle__dot {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #fff;
    transition: transform .18s ease;
}

.maintenance-toggle.is-on .maintenance-toggle__track {
    background: var(--accent);
}

.maintenance-toggle.is-on .maintenance-toggle__dot {
    transform: translateX(13px);
}

.maintenance-toggle__label {
    white-space: nowrap;
}

.maintenance-current {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}

.maintenance-current.is-on {
    border-color: #f3c3c3;
    background: #fff8f7;
}

.maintenance-current.is-off {
    border-color: #c9e8d8;
    background: #f5fbf8;
}

.maintenance-current__text b {
    display: block;
    margin-bottom: 3px;
    font-size: 16px;
}

.maintenance-current__text span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.maintenance-current .status {
    flex: none;
}

.maintenance-switch-row {
    margin-bottom: 24px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--line);
}

.maintenance-switch {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 600;
}

.maintenance-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.maintenance-switch__track {
    position: relative;
    width: 52px;
    height: 30px;
    flex: none;
    border-radius: 999px;
    background: #d6e1e5;
    transition: background .18s ease;
}

.maintenance-switch__dot {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(4, 25, 35, .2);
    transition: transform .18s ease;
}

.maintenance-switch input:checked + .maintenance-switch__track {
    background: var(--accent);
}

.maintenance-switch input:checked + .maintenance-switch__track .maintenance-switch__dot {
    transform: translateX(22px);
}

.maintenance-switch input:focus-visible + .maintenance-switch__track {
    outline: 3px solid rgba(247, 64, 10, .28);
    outline-offset: 2px;
}

.maintenance-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.panel-h2 {
    margin: 0 0 6px;
    font-size: 20px;
    line-height: 1.25;
}

.users-bulk {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    margin-bottom: 16px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.users-bulk span {
    flex: 1 1 320px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.field__check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
    cursor: pointer;
}

@media (max-width: 760px) {
    .panel-top__maintenance {
        order: 4;
        width: 100%;
    }

    .maintenance-current {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Журнал действий */
.log-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
}

.log-filters label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 150px;
    color: var(--muted);
    font-size: 12px;
}

.log-filters select,
.log-filters input {
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    color: inherit;
    font: inherit;
    font-size: 14px;
}

.log-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.log-note {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.log-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.5;
}

.log-summary b {
    color: inherit;
}

.log-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 760px) {
    .log-filters label {
        flex: 1 1 100%;
    }
}

/* Всплывающая плашка результата */
.panel-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9000;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    max-width: min(420px, calc(100vw - 32px));
    padding: 14px 16px;
    border-radius: 14px;
    background: #e8f5ee;
    color: #146c43;
    box-shadow: 0 18px 45px -20px rgba(4, 25, 35, .45);
    font-size: 14px;
    line-height: 1.4;
    animation: panel-toast-in .22s ease-out both;
}

.panel-toast--error {
    background: #fdecec;
    color: #b42318;
}

.panel-toast--warn {
    background: #fef6e7;
    color: #92400e;
}

.panel-toast__text {
    flex: 1 1 auto;
}

.panel-toast__close {
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    opacity: .7;
}

.panel-toast__close:hover {
    opacity: 1;
}

@keyframes panel-toast-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 560px) {
    .panel-toast {
        right: 16px;
        bottom: 16px;
        left: 16px;
        max-width: none;
    }
}

/* Карта для ручной точки в шаге «Что за жильё» */
.panel-address-guide {
    display: grid;
    gap: 3px;
    margin: 18px 0 12px;
    padding: 12px 14px;
    border: 1px solid rgba(240, 74, 18, .24);
    border-left: 4px solid #f04a12;
    border-radius: 10px;
    background: #fff7f2;
    color: #63301f;
    font-size: 13px;
    line-height: 1.45;
}

.panel-address-guide strong {
    color: #b53c0e;
}

#address.is-attention {
    border-color: #f04a12;
    box-shadow: 0 0 0 3px rgba(240, 74, 18, .14);
}

.panel-map-steps {
    display: grid;
    gap: 4px;
    margin: 6px 0 8px;
    padding-left: 24px;
    color: var(--text);
    font-size: 13px;
    line-height: 1.45;
}

.panel-map-steps li::marker {
    color: #f04a12;
    font-weight: 700;
}

.panel-map {
    position: relative;
    height: 340px;
    margin-top: 8px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #edf2f4;
}

.panel-map__canvas {
    position: absolute;
    inset: 0;
}

.panel-map__bar {
    position: absolute;
    z-index: 5;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    pointer-events: none;
}

.panel-map__bar .btn {
    pointer-events: auto;
    background: rgba(255, 255, 255, .95);
}

.panel-map__status {
    max-width: 60%;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    color: #2d3f47;
    font-size: 12px;
    line-height: 1.3;
    text-align: right;
}

.panel-map__hint {
    position: absolute;
    z-index: 5;
    bottom: 8px;
    left: 10px;
    padding: 3px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .86);
    color: #687d86;
    font-size: 11px;
}

.panel-map__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
}

.panel-map__coords {
    color: var(--muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.panel-map-pin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #f04a12;
    box-shadow: 0 8px 20px -8px rgba(4, 25, 35, .7);
    transform: translate(-50%, -50%);
}

.panel-map-pin.is-empty {
    display: none;
}

/* Метка найденного адреса: подсказка, а не сохранённая точка */
.panel-map-search-pin {
    width: 24px;
    height: 24px;
    border: 2px dashed #f04a12;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 0 0 6px rgba(240, 74, 18, .14);
    transform: translate(-50%, -50%);
}

@media (max-width: 560px) {
    .panel-map {
        height: 280px;
    }

    .panel-map__actions {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Быстрое переключение режима оплаты */
.payment-mode-switch {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.payment-mode-switch__current {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 13px;
}

.payment-mode-switch__form {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: #eef3f5;
}

.payment-mode-switch__btn {
    padding: 8px 20px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #41575f;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.payment-mode-switch__btn:hover:not(:disabled) {
    background: #dfe8ec;
}

.payment-mode-switch__btn.is-active {
    background: #041923;
    color: #fff;
}

.payment-mode-switch__btn--live.is-active {
    background: #c0392b;
    color: #fff;
}

.payment-mode-switch__btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.payment-mode-switch__hint {
    flex-basis: 100%;
    color: var(--muted);
    font-size: 12.5px;
}

.payment-mode-switch__hint a {
    color: var(--accent);
}

/* Финансы: итоги и фильтры */
.finance-totals {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.finance-totals__item {
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.finance-totals__item span {
    display: block;
    color: var(--muted);
    font-size: 12.5px;
}

.finance-totals__item strong {
    display: block;
    margin-top: 4px;
    color: var(--ink);
    font-size: 19px;
}

.finance-filters {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.finance-filters label {
    display: grid;
    gap: 4px;
    color: var(--muted);
    font-size: 12.5px;
}

.finance-filters input,
.finance-filters select {
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-family: var(--font);
    font-size: 14px;
}

@media (max-width: 760px) {
    .finance-totals {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Авто-загрузка фото комнаты */
.room-upload-progress {
    margin-top: 10px;
}

.dropzone.is-uploading {
    border-color: var(--accent);
    background: #fff8f4;
}

.dropzone.is-uploading .dropzone__icon {
    display: inline-block;
    animation: room-upload-spin 1s linear infinite;
}

.dropzone.is-full {
    opacity: .72;
}

.dropzone.is-full .dropzone__label {
    cursor: not-allowed;
}

.upload-progress__bar span {
    transition: width .18s ease;
}

@keyframes room-upload-spin {
    from { transform: rotate(0); }
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .dropzone.is-uploading .dropzone__icon {
        animation: none;
    }

    .upload-progress__bar span {
        transition: none;
    }
}

/* Якорь комнаты после удаления фото/обложки */
.room-form,
.room-form__photos {
    scroll-margin-top: 96px;
}

/* ---------- Отзывы в админке и кабинете ---------- */
.review-mod {
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

.review-mod:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.review-mod__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 8px;
}

.review-mod__meta {
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 400;
    line-height: 1.45;
}

.review-mod__meta a {
    color: var(--accent-dark);
    text-decoration: underline;
}

.review-mod__rating {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #8a6a1a;
    font-size: 13px;
    white-space: nowrap;
}

.review-mod__rating strong {
    color: var(--ink);
}

.review-mod__text {
    margin: 0 0 10px;
    color: var(--ink-soft);
    font-size: 14px;
    line-height: 1.6;
}

.review-mod__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.review-status {
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
}

.review-status--published {
    background: #eaf7ee;
    color: #1c6b35;
}

.review-status--pending {
    background: #fff5df;
    color: #8a5a00;
}

.review-status--rejected {
    background: #fdece9;
    color: #9b2c17;
}

.review-reply {
    margin: 10px 0 12px;
    padding: 10px 12px;
    border-left: 3px solid var(--blue, #8ec7e3);
    border-radius: 0 10px 10px 0;
    background: var(--bg);
}

.review-reply__label {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.review-reply p {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.55;
}

.review-reply__date {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
}

.review-owner {
    scroll-margin-top: 96px;
}

.review-owner__rating {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 8px;
    color: #8a6a1a;
    font-size: 13px;
}

.review-owner__form {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.review-owner__form .field {
    margin-bottom: 10px;
}

/* ---------- единый раздел «Статьи и AI-редакция» ---------- */
.ai-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0 0 20px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f5fafc;
}

.ai-tab {
    padding: 8px 13px;
    border-radius: 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.ai-tab:hover {
    background: #eaf5fb;
    color: var(--accent-dark);
    text-decoration: none;
}

.ai-tab.is-active {
    background: #fff;
    color: var(--accent-dark);
    box-shadow: 0 5px 16px -12px rgba(4, 25, 35, 0.55);
}

.ai-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.ai-stat-grid .card {
    padding: 18px 20px;
}

.ai-stat-grid .card h2 {
    margin: 0 0 4px;
    font-size: 30px;
    line-height: 1;
}

.ai-stat-grid .card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.ai-destination-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ai-destination-stats span {
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: #33474f;
    font-size: 12.5px;
}

.ai-destination-stats b {
    color: var(--accent-dark);
}

.ai-help {
    margin: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8fbfd;
    color: #24343a;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
    line-height: 1.6;
    white-space: pre-wrap;
}

@media (max-width: 900px) {
    .ai-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .ai-stat-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.ai-run-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 4px;
}

.ai-worker-status {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.ai-worker-status.is-online {
    background: #e8f5ee;
    color: var(--ok);
}

.ai-worker-status.is-offline {
    background: #fef6e7;
    color: var(--warn);
}

.ai-progress {
    width: 180px;
    height: 7px;
    margin: 8px 0 4px;
    overflow: hidden;
    border-radius: 999px;
    background: #eaf0f3;
}

.ai-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #7ab8d7, #25acf0);
    transition: width 0.35s ease;
}
