﻿/* ============================================================
   TerritoryRegistry — стили страницы «Территориальный справочник»
   ============================================================ */

/* ============ Локальные переменные ============ */
:root {
    --c-primary: var(--color-link);
    --c-primary-dark: var(--color-link-hover);
    --c-border: var(--color-border);
    --c-text: var(--font-size-color-212121);
    --c-primary-light: #1F69CC;
    --c-primary-weak: #e8f1ff;
    --c-text-muted: #616275;
    --c-text-soft: #717171;
    --c-text-dim: #8d8dad;
    --c-text-faint: #a9a9c1;
    --c-bg-soft: #f9f9f9;
    --c-success: #03a500;
    --c-success-bg: #e0f4e0;
    --c-danger: #c73333;
    --c-danger-bg: #f7e9e9;
    --c-warning: #ce8301;
    --c-warning-bg: #f7f1e9;
    --c-secondary: #8d8dad;
    --c-secondary-bg: #eeeef2;
}

/* ============ Шапка страницы ============ */
.tech-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    border-bottom: 1px solid var(--c-border);
    background: #fff;
    gap: 16px;
    flex-wrap: wrap;
}

.tech-page-header__title {
    margin: 0;
    font-weight: 600;
    font-size: 22px;
    line-height: 40px;
}

.tech-page-header__breadcrumb {
    font-size: 14px;
    color: var(--c-text-soft);
    margin: 0;
    padding: 0;
    background: none;
}

    .tech-page-header__breadcrumb .breadcrumb-item + .breadcrumb-item::before {
        color: var(--c-text-faint);
        content: "/";
    }

.tech-page-body {
    padding: 24px 32px 48px;
}

.tech-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
}

@media (max-width: 575px) {
    .tech-form-row {
        grid-template-columns: 1fr;
    }
}
/* ============ Toolbar ============ */
.tech-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0 12px;
    flex-wrap: wrap;
}

.tech-toolbar__title {
    font-weight: 600;
    font-size: 14px;
    line-height: 24px;
    color: #7e879d;
    margin-right: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .tech-toolbar__title i {
        color: var(--c-text-faint);
    }

/* ============ Кнопки ============ */
.btn-tech {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    line-height: 24px;
    border-radius: 4px;
    border: none;
    transition: background-color .15s ease;
}

.btn-tech--primary {
    background: var(--c-primary);
    color: #fff;
}

    .btn-tech--primary:hover {
        background: var(--c-primary-dark);
        color: #fff;
    }

.btn-tech--secondary {
    background: var(--c-secondary-bg);
    color: var(--c-text);
}

    .btn-tech--secondary:hover {
        background: #e8e8ef;
    }

.btn-tech--icon {
    padding: 8px;
    min-width: 40px;
    min-height: 40px;
    background: transparent;
    color: var(--c-text-dim);
}

    .btn-tech--icon:hover {
        background: var(--c-bg-soft);
        color: var(--c-text);
    }

/* ============ Chips ============ */
.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    white-space: nowrap;
}

.chip--success {
    background: var(--c-success-bg);
    color: var(--c-success);
}

.chip--danger {
    background: var(--c-danger-bg);
    color: var(--c-danger);
}

.chip--warning {
    background: var(--c-warning-bg);
    color: var(--c-warning);
}

.chip--secondary {
    background: var(--c-secondary-bg);
    color: var(--c-secondary);
}

.chip__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

/* ============ Form Fields ============ */
.tech-field {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 200px;
}

.tech-field__label {
    font-size: 12px;
    line-height: 20px;
    letter-spacing: .04em;
    font-weight: 400;
    color: var(--c-text-dim);
    margin-bottom: 4px;
    transition: color .15s ease;
}

.tech-field:focus-within .tech-field__label {
    color: var(--c-primary-light);
}

.tech-field--error .tech-field__label,
.tech-field--error:focus-within .tech-field__label {
    color: var(--c-danger);
}

.tech-field--disabled .tech-field__label {
    color: #dedee2;
}

.tech-field__control {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 40px;
    background: #fff;
    border: 1px solid var(--c-text-faint);
    border-radius: 4px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

    .tech-field__control:hover {
        border-color: var(--c-text-dim);
    }

    .tech-field__control:focus-within {
        border-color: var(--c-primary);
        box-shadow: 0 0 0 3px rgba(4, 85, 192, .12);
    }

.tech-field--error .tech-field__control {
    border-color: var(--c-danger);
}

    .tech-field--error .tech-field__control:focus-within {
        box-shadow: 0 0 0 3px rgba(199, 51, 51, .12);
    }

.tech-field--disabled .tech-field__control {
    border-color: #dedee2;
    background: #fff;
    pointer-events: none;
}

.tech-field__input {
    width: 100%;
    height: 38px;
    padding: 6px 12px 5px;
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 16px;
    line-height: 26px;
    font-weight: 500;
    color: var(--c-text-muted);
    border-radius: 4px;
}

    .tech-field__input::placeholder {
        color: #dedee2;
        opacity: 1;
    }

    .tech-field__input:focus {
        color: var(--c-text);
    }

.tech-field--disabled .tech-field__input {
    color: #dedee2;
    -webkit-text-fill-color: #dedee2;
    cursor: default;
}

.tech-field__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-right: 8px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--c-text-faint);
    cursor: pointer;
    flex-shrink: 0;
    transition: color .15s ease;
}

    .tech-field__icon:hover {
        color: var(--c-text-muted);
    }

    .tech-field__icon i {
        font-size: 15px;
    }

.tech-field__select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 34px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23a9a9c1' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

    .tech-field__select:focus {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%231F69CC' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    }

.tech-field__control--date {
    position: relative;
}

    .tech-field__control--date .tech-field__icon {
        position: absolute;
        right: 8px;
        margin: 0;
        pointer-events: none;
    }

.tech-field__input[type="date"] {
    padding-right: 34px;
}

    .tech-field__input[type="date"]::-webkit-calendar-picker-indicator {
        position: absolute;
        right: 0;
        top: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        cursor: pointer;
    }

    .tech-field__input[type="date"]::-webkit-datetime-edit {
        color: inherit;
    }

    .tech-field__input[type="date"]:invalid::-webkit-datetime-edit {
        color: #dedee2;
    }

.tech-field__helper {
    margin-top: 4px;
    font-size: 12px;
    line-height: 18px;
    color: var(--c-text-dim);
    letter-spacing: .02em;
}

.tech-field--error .tech-field__helper {
    color: var(--c-danger);
}

.tech-field--disabled .tech-field__helper {
    color: #dedee2;
}

/* ============ Checkbox ============ */
.tech-checkbox {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 16px;
    line-height: 24px;
    color: var(--c-text);
    user-select: none;
}

.tech-checkbox__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tech-checkbox__box {
    position: relative;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 4px;
    border: 1px solid var(--c-text-faint);
    border-radius: 2px;
    background: #fff;
    transition: border-color .15s ease, background-color .15s ease;
}

.tech-checkbox:hover .tech-checkbox__box {
    border-color: var(--c-primary);
}

.tech-checkbox__input:checked ~ .tech-checkbox__box {
    background: var(--c-primary);
    border-color: var(--c-primary);
}

    .tech-checkbox__input:checked ~ .tech-checkbox__box::after {
        content: "";
        position: absolute;
        left: 4.5px;
        top: 1px;
        width: 4px;
        height: 8px;
        border: solid #fff;
        border-width: 0 2px 2px 0;
        transform: rotate(45deg);
    }

.tech-checkbox__input:indeterminate ~ .tech-checkbox__box {
    background: #fff;
    border-color: var(--c-primary);
    border-width: 4px;
}

.tech-checkbox__input:focus-visible ~ .tech-checkbox__box {
    box-shadow: 0 0 0 3px rgba(4, 85, 192, .18);
}

.tech-checkbox__input:disabled ~ .tech-checkbox__box {
    background: var(--c-secondary-bg);
    border-color: #c3c3d3;
}

.tech-checkbox__input:disabled:checked ~ .tech-checkbox__box {
    background: var(--c-secondary-bg);
    border-color: #c3c3d3;
}

    .tech-checkbox__input:disabled:checked ~ .tech-checkbox__box::after {
        border-color: #c3c3d3;
    }

.tech-checkbox__input:disabled ~ .tech-checkbox__text {
    color: #c3c3d3;
}

.tech-checkbox__input:disabled {
    cursor: default;
}

.tech-checkbox:has(.tech-checkbox__input:disabled) {
    cursor: default;
}

.tech-checkbox__text {
    font-size: 15px;
    line-height: 24px;
    font-weight: 400;
}

/* ============ Панель фильтров ============ */
.tech-filter-panel {
    border: 1px solid var(--c-border);
    border-radius: 4px;
    padding: 20px 24px;
    background: #fff;
    margin-bottom: 16px;
}

.tech-filter-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--c-border);
}

.tech-filter-panel__title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 24px;
    color: #7e879d;
    text-transform: uppercase;
    letter-spacing: .02em;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .tech-filter-panel__title i {
        color: var(--c-text-faint);
    }

.tech-filter-panel__reset {
    border: none;
    background: transparent;
    color: var(--c-primary);
    font-size: 13px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
}

    .tech-filter-panel__reset:hover {
        background: var(--c-primary-weak);
        color: var(--c-primary-dark);
    }

.tech-filter-panel__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px 20px;
    margin-bottom: 16px;
}

.tech-filter-panel__checks {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 28px;
    padding-top: 16px;
    border-top: 1px solid var(--c-border);
}

/* ============ Сетка карточек кладбищ ============ */
.cemetery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
    align-items: start;
}

/* Карточка «Добавить кладбище» */
.cemetery-card--add {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 96px;
    padding: 16px;
    border: 1px dashed var(--c-text-faint);
    border-radius: 4px;
    background: #fff;
    color: var(--c-primary);
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
    align-self: stretch;
}

    .cemetery-card--add:hover {
        border-color: var(--c-primary);
        background: var(--c-primary-weak);
    }

    .cemetery-card--add:focus-visible {
        outline: none;
        border-color: var(--c-primary);
        box-shadow: 0 0 0 3px rgba(4, 85, 192, .18);
    }

    .cemetery-card--add i {
        font-size: 22px;
        line-height: 1;
    }

/* Карточка кладбища */
.cemetery-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid var(--c-border);
    border-radius: 4px;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.cemetery-card--selected {
    border-color: var(--c-primary);
    box-shadow: 0 0 0 1px var(--c-primary);
}

.cemetery-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.cemetery-card__title {
    font-size: 15px;
    font-weight: 600;
    line-height: 22px;
    color: var(--c-text);
}

.cemetery-card__address {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 13px;
    line-height: 20px;
    color: var(--c-text-muted);
}

    .cemetery-card__address i {
        color: var(--c-text-faint);
        font-size: 13px;
        margin-top: 3px;
        flex-shrink: 0;
    }

.cemetery-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    padding: 8px 0;
    border-top: 1px solid var(--c-border);
    border-bottom: 1px solid var(--c-border);
    font-size: 12px;
    line-height: 18px;
    color: var(--c-text-soft);
}

    .cemetery-card__meta span {
        display: inline-flex;
        gap: 4px;
    }

    .cemetery-card__meta b {
        color: var(--c-text);
        font-weight: 600;
    }

.cemetery-card__actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

    .cemetery-card__actions .btn-tech {
        flex: 1 1 auto;
        min-width: 0;
        font-size: 12px;
        line-height: 18px;
        padding: 6px 10px;
    }

        .cemetery-card__actions .btn-tech i {
            font-size: 13px;
        }

/* ============ Индикаторы в шапке карточки ============ */
.cemetery-card__indicators {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.cemetery-card__indicator {
    font-size: 14px;
    line-height: 1;
}

.cemetery-card__indicator--active {
    color: #7eb57a;
}

.cemetery-card__indicator--closed {
    color: var(--c-secondary);
}

.cemetery-card__indicator--grouped {
    color: var(--c-primary);
    opacity: 0.75;
}

/* ============ Таблица кладбищ / объектов ============ */
.cemetery-table__wrapper {
    border: 1px solid var(--c-border);
    border-radius: 4px 4px 0 0;
    overflow: auto;
    background: #fff;
}

.cemetery-table__table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
    line-height: 21px;
    color: var(--c-text);
}

.cemetery-table__head th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--c-bg-soft);
    padding: 13px 16px;
    border-bottom: 1px solid var(--c-border);
    border-right: 1px solid var(--c-border);
    color: var(--c-text-faint);
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    text-align: left;
    white-space: nowrap;
}

    .cemetery-table__head th:last-child {
        border-right: none;
    }

    .cemetery-table__head th .cemetery-table__sort {
        margin-left: 6px;
        color: var(--c-text-faint);
        cursor: pointer;
    }

        .cemetery-table__head th .cemetery-table__sort:hover {
            color: var(--c-text-muted);
        }

.cemetery-table__row td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--c-border);
    vertical-align: top;
    background: #fff;
}

.cemetery-table__row:last-child td {
    border-bottom: none;
}

.cemetery-table__row:hover td {
    background: var(--c-bg-soft);
}

.cemetery-table__row td.is-badge {
    padding: 9.5px 16px;
}

.cemetery-table__row td.is-action {
    padding: 8px 12px;
    text-align: right;
    white-space: nowrap;
}

.cemetery-table__expand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: var(--c-secondary-bg);
    color: var(--c-primary);
    margin-right: 8px;
    transition: background-color .15s ease;
}

    .cemetery-table__expand:hover {
        background: #e8e8ef;
    }

    .cemetery-table__expand[aria-expanded="true"] i {
        transform: rotate(90deg);
    }

    .cemetery-table__expand i {
        font-size: 12px;
        transition: transform .2s ease;
    }

.cemetery-table__cell-title {
    display: flex;
    align-items: center;
    font-weight: 500;
}

.cemetery-table__code {
    font-weight: 600;
    color: var(--c-primary);
    margin-right: 8px;
}

.cemetery-table__detail-row td {
    padding: 0;
    background: var(--c-bg-soft);
    border-bottom: 1px solid var(--c-border);
}

.cemetery-table__detail-content {
    padding: 20px 32px 24px 64px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px 24px;
}

.cemetery-table__detail-item dt {
    font-size: 12px;
    line-height: 18px;
    color: var(--c-text-dim);
    margin-bottom: 4px;
}

.cemetery-table__detail-item dd {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--c-text);
}

/* ============ Пагинация ============ */
.tech-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border: 1px solid var(--c-border);
    border-top: none;
    border-radius: 0 0 4px 4px;
    background: #fff;
    font-size: 14px;
    line-height: 24px;
    color: var(--c-text-soft);
    flex-wrap: wrap;
    gap: 8px;
}

.tech-pagination__pages {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

    .tech-pagination__pages button {
        min-width: 24px;
        height: 24px;
        padding: 0 4px;
        border: none;
        background: transparent;
        color: var(--c-text-soft);
        font-weight: 400;
        font-size: 14px;
        border-radius: 4px;
        cursor: pointer;
    }

        .tech-pagination__pages button:hover {
            background: var(--c-bg-soft);
        }

        .tech-pagination__pages button.is-active {
            font-weight: 700;
            color: var(--c-text);
        }

        .tech-pagination__pages button:disabled {
            color: #e5e5e5;
            cursor: default;
        }

/* ============ Адаптив ============ */
@media (max-width: 768px) {
    .tech-page-header, .tech-page-body {
        padding-left: 16px;
        padding-right: 16px;
    }

    .cemetery-table__detail-content {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* ============ Карта в модалке ============ */
.cemetery-map {
    position: relative;
    width: 100%;
    height: 520px;
    min-height: 520px;
    border: 1px solid var(--c-border);
    border-radius: 4px;
    overflow: hidden;
    background: #f5f8fd;
    isolation: isolate;
}

.cemetery-map__hint {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    padding: 6px 12px;
    background: rgba(255, 255, 255, .95);
    border: 1px solid var(--c-border);
    border-radius: 4px;
    font-size: 12px;
    line-height: 18px;
    color: var(--c-text-muted);
    pointer-events: none;
    max-width: calc(100% - 240px);
}

.cemetery-map__actions {
    position: absolute;
    top: 8px;
    right: 140px;
    z-index: 20;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

    .cemetery-map__actions .btn-tech {
        font-size: 13px;
        line-height: 18px;
        padding: 7px 12px;
        box-shadow: 0 2px 6px rgba(5, 25, 69, .12);
    }

        .cemetery-map__actions .btn-tech i {
            font-size: 13px;
        }

/* ============================================================
   Инлайн-панель секций выбранного кладбища
   ============================================================ */
.cemetery-sections-panel {
    margin-bottom: 24px;
    padding: 16px 20px;
    border: 1px solid var(--c-border);
    border-radius: 4px;
    background: #fafbfd;
}

.cemetery-sections-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--c-border);
    flex-wrap: wrap;
}

.cemetery-sections-panel__title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 22px;
    color: var(--c-text);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.cemetery-sections-panel__filter {
    max-width: 320px;
    min-width: 200px;
}

.cemetery-sections-panel__empty {
    padding: 16px;
    text-align: center;
    font-size: 13px;
    color: var(--c-text-soft);
}

/* ============================================================
   Сетка маленьких карточек секций
   ============================================================ */
.cemetery-sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
    margin-top: 12px;
}

/* Карточка секции */
.cemetery-section-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 10px;
    border: 1px solid var(--c-border);
    border-radius: 4px;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}

    .cemetery-section-card:hover {
        border-color: var(--c-primary);
        box-shadow: 0 2px 6px rgba(4, 85, 192, .08);
    }

.cemetery-section-card__title {
    font-size: 13px;
    font-weight: 600;
    line-height: 18px;
    color: var(--c-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cemetery-section-card__meta {
    display: flex;
    gap: 8px;
    font-size: 11px;
    line-height: 16px;
    color: var(--c-text-soft);
}

    .cemetery-section-card__meta b {
        color: var(--c-text);
        font-weight: 600;
    }

.cemetery-section-card__actions {
    display: flex;
    gap: 4px;
    margin-top: 4px;
}

    .cemetery-section-card__actions .btn-tech {
        padding: 3px 7px;
        min-width: 0;
        font-size: 11px;
        line-height: 13px;
    }

        .cemetery-section-card__actions .btn-tech i {
            font-size: 12px;
        }

        /* Цветные состояния кнопок */
        .cemetery-section-card__actions .btn-tech[title="Редактировать"]:hover {
            color: var(--c-primary);
            background: var(--c-primary-weak);
        }

        .cemetery-section-card__actions .btn-tech[title="Удалить"]:hover {
            color: var(--c-danger);
            background: var(--c-danger-bg);
        }

/* Кнопка «Добавить секцию» */
.cemetery-section-card--add {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 10px;
    border: 1px dashed var(--c-text-faint);
    border-radius: 4px;
    background: #fff;
    color: var(--c-primary);
    font-family: inherit;
    font-size: 11px;
    font-weight: 500;
    line-height: 14px;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}

    .cemetery-section-card--add:hover {
        border-color: var(--c-primary);
        background: var(--c-primary-weak);
    }

    .cemetery-section-card--add:focus-visible {
        outline: none;
        border-color: var(--c-primary);
        box-shadow: 0 0 0 3px rgba(4, 85, 192, .18);
    }

    .cemetery-section-card--add i {
        font-size: 16px;
        line-height: 1;
    }

.map-mode-switch ~ .tech-form-row .tech-field__input {
    font-size: 14px;
    height: 34px;
}

/* ============================================================
   Адаптив
   ============================================================ */
@media (max-width: 767px) {
    .cemetery-sections-panel {
        padding: 12px 14px;
    }

    .cemetery-sections-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 6px;
    }

    .cemetery-sections-panel__filter {
        max-width: 100%;
    }
}


/* ============================================================
   Выбор режима формы радио-группы
   ============================================================ */

.modal-header__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    margin-left: auto;
}

.modal-header .map-mode-switch {
    padding: 3px;
    background: rgba(255, 255, 255, .6);
}

.modal-header .map-mode-switch__item {
    padding: 4px 12px;
    font-size: 12px;
}

.map-mode-switch {
    display: inline-flex;
    gap: 0;
    padding: 4px;
    background: var(--c-secondary-bg);
    border-radius: 6px;
    margin-left: auto;
}

.map-mode-switch__item {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--c-text-soft);
    cursor: pointer;
    border-radius: 4px;
    transition: background-color .15s ease, color .15s ease;
}

    .map-mode-switch__item input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    .map-mode-switch__item:has(input:checked) {
        background: rgb(111, 230, 119);
        color: #000;
        box-shadow: 0 1px 3px rgba(5, 25, 69, .08);
    }

    .map-mode-switch__item:hover:not(.is-disabled):not(:has(input:checked)) {
        color: var(--c-text-muted);
    }

    .map-mode-switch__item.is-disabled {
        cursor: not-allowed;
        opacity: 0.45;
    }



.cemetery-map__name-input {
    height: 34px;
    padding: 6px 10px;
    border: 1px solid var(--c-border);
    border-radius: 4px;
    background: #fff;
    font-size: 13px;
    line-height: 18px;
    color: var(--c-text);
    box-shadow: 0 2px 6px rgba(5, 25, 69, .12);
    width: 160px;
    outline: none;
}

    .cemetery-map__name-input:focus {
        border-color: var(--c-primary);
        box-shadow: 0 0 0 3px rgba(4, 85, 192, .12);
    }

    .cemetery-map__name-input::placeholder {
        color: var(--c-text-faint);
    }