:root {
    --primary: #60a5fa;
    --primary-light: #93c5fd;
    --text: #4b5563;
    --text-light: #9ca3af;
    --bg: #ffffff;
    --bg-light: #ececec;
    --border: #E4E4E4;
    --success: #34d399;
}

/* Отмена подсветки автозаполнения браузером */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
textarea:-webkit-autofill:active,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus,
select:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px white inset !important;
    box-shadow: 0 0 0 1000px white inset !important;
    -webkit-text-fill-color: inherit !important;
    background-color: white !important;
    transition: background-color 5000s ease-in-out 0s;
}

.template-upload-loading{
    margin-top:1rem;
    display:flex;
    align-items:center;
    gap:.75rem;
}
.template-progress{width:100%}
.template-progress-bar{
    width: 100%;
    height: 6px;
    background: #EEE;
    border-radius: 6px;
    overflow: hidden;
}
.template-progress-fill{
    height:100%;
    width:0;
    background: #1976d2;
    background-size: 30px 30px;
    transition:width .25s ease-out;
}
.template-progress-text{
    margin-top:6px;
    font-weight:400;
    font-size: 13px;
    color: #1976d2;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    /* Всегда показываем вертикальный скролл, чтобы не прыгала ширина,
       и резервируем под него место даже когда он скрыт JS-ом */
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    /*background-color: var(--bg-light);*/
    line-height: 1.6;
    min-height: 100vh;
}
.container {
    width: 100%;
    /*padding: 0 20px;*/
}
.header {
    background-color: var(--bg);
    border-bottom: 1px solid var(--border);
}

.header .container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #FFF;
}
.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
    margin: 0 0 0 30px;
    /*border: #000 dashed 1px;*/
}
.header-nav {
    display: flex;
    gap: 1.5rem;
}
.nav-link {
    color: var(--text);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}

.nav-link:hover {
    border-bottom-color: var(--primary);
    color: var(--primary);
}

.header-content {
    padding: 14px 18px;
    background: #fff;
    width: 100%;
}

.header-layout {
    display: grid;
    grid-template-columns: 285px minmax(0, 1fr) 250px;
    gap: 16px;
    align-items: center;
    width: 100%;
}

.header-left-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    min-height: 74px;
    gap: 10px;
}

.header-middle-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.header-middle-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.header-right-column {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
}
.header-city-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    background: transparent;
    font-size: 14px;
    color: #555;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}
.header-city-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}
.header-links {
    display: flex;
    align-items: center;
    gap: 18px;
    justify-content: flex-start;
    min-width: 0;
}
.header-link {
    text-decoration: none;
    color: #555;
    font-size: 14px;
}
.header-link:hover {
    color: #111;
}
.logo {
    margin: 0;
    display: inline-flex;
    align-items: center;
}
.logo img {
    width: 124px;
    height: auto;
}
.header-code-search {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    overflow: visible;
    position: relative;
}
.header-code-search-input {
    border: none;
    background: transparent;
    width: 100%;
    height: 42px;
    padding: 0 14px;
    font-size: 14px;
    color: #222;
    outline: none;
}
.header-code-search-btn {
    width: 42px;
    height: 42px;
    border: none;
    background: transparent;
    color: #777;
    cursor: pointer;
}

.header-code-search-btn-icon {
    font-size: 28px;
}
.header-code-search-suggest {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    background: #fff;
    border: 1px solid #e5e5e5;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    z-index: 2100;
    max-height: 320px;
    overflow: auto;
}
.header-code-search-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border: none;
    background: #fff;
    cursor: pointer;
}
.header-code-search-item:hover {
    background: #f7f7f7;
}
.header-code-search-item-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.header-code-search-item-thumb {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f3f3f3;
    color: #777;
    font-size: 14px;
    overflow: hidden;
    flex-shrink: 0;
}
.header-code-search-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.header-code-search-item-text {
    min-width: 0;
    display: block;
}
.header-code-search-item-code {
    display: block;
    font-size: 13px;
    color: #111;
    font-weight: 600;
}
.header-code-search-item-name {
    display: block;
    font-size: 12px;
    color: #777;
    margin-top: 2px;
}
.header-code-search-empty {
    margin: 0;
    padding: 10px 12px;
    font-size: 12px;
    color: #777;
}

.header-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.header-actions .header-user-btn {
    margin: 0;
}

.header-action-link {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: #606060;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.header-action-link:hover {
    background: #f3f3f3;
    color: #111;
}
.header-action-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ff6c37;
    color: #fff;
    font-size: 10px;
    line-height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    box-sizing: border-box;
}

.header-city-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    overflow-y: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}
.header-city-modal-overlay {
    display: none;
}
.header-city-modal-content {
    position: relative;
    width: 100%;
    max-width: 520px;
    margin: 20px auto;
    background: #fff;
    overflow: hidden;
    border: 1px solid #d9d9d9;
    border-radius: 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}
body.header-city-modal-open,
html.header-city-modal-open {
    overflow: hidden !important;
    overflow-y: hidden !important;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.header-city-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.header-city-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
}
.header-city-modal-close {
    border: none;
    background: transparent;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
}
.header-city-modal-close:hover {
    color: #111827;
}
.header-city-modal-body {
    display: grid;
    gap: 10px;
    padding: 12px 20px 16px;
    max-height: 360px;
    overflow: auto;
}
.header-city-option {
    border: 1px solid #e5e7eb;
    background: #FFF;
    padding: 10px 12px;
    text-align: left;
    cursor: pointer;
    border-radius: 0;
    font-size: 14px;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease, transform .1s ease;
}
.header-city-option:hover {
    border-color: #4f7cff;
    background: #f8fafc;
}
.header-city-option.active {
    background: #4f7cff;
    color: #fff;
    border-color: #4f7cff;
}
.header-city-modal-tools {
    padding: 12px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
}
.header-city-modal-search-input {
    width: 100%;
    height: 40px;
    border: 1px solid #d1d5db;
    border-radius: 0;
    padding: 0 12px;
    font-size: 14px;
    color: #222;
    background: #fff;
}
.header-city-modal-search-input:focus {
    outline: none;
    border-color: #4f7cff;
    box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.18);
}
.header-city-clear-btn {
    height: 40px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    border-radius: 0;
    padding: 0 12px;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.header-city-clear-btn:hover {
    border-color: #111;
    color: #111;
    background: #f8f8f8;
}
.header-city-clear-btn:active {
    background: #f1f1f1;
}
.header-city-modal-footer {
    border-top: 1px solid #e5e7eb;
    padding: 12px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.header-city-modal-footer .account-primary-btn {
    margin: 0;
    text-transform: none;
}

@media (max-width: 980px) {
    .header-layout {
        grid-template-columns: 220px minmax(0, 1fr);
        align-items: start;
    }

    .header-right-column {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }

    .header-code-search {
        width: 100%;
    }

    .header-links {
        gap: 12px;
        flex-wrap: wrap;
    }

    .header-middle-topline {
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .header-layout {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .header-left-column {
        min-height: 0;
        gap: 8px;
    }

    .header-right-column {
        justify-content: flex-start;
    }

    .header-content {
        padding: 10px 12px;
    }

    .header-link {
        font-size: 12px;
    }

    .header-city-modal-tools {
        grid-template-columns: 1fr;
    }

    .header-city-clear-btn {
        width: 100%;
    }

    .header-city-modal-footer {
        flex-direction: column;
    }

    .header-city-modal-footer .account-primary-btn {
        width: 100%;
    }
}

/* Старые стили корзины оставляем для совместимости */
.header-cart-wrapper {
    position: relative;
}

.header-cart-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    transition: color 0.2s;
}

.header-cart-btn:hover {
    color: var(--primary);
}

.header-cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--primary, #1976d2);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1;
}

.header-cart-count:empty {
    display: none;
}

.header-cart-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border: 1px solid var(--border, #e0e0e0);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 400px;
    max-height: 500px;
    z-index: 2100;
    overflow: hidden;
}

.header-cart-dropdown.show {
    display: flex;
    flex-direction: column;
}

.header-cart-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border, #e0e0e0);
}

.header-cart-dropdown-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.header-cart-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: #777;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.header-cart-close:hover {
    background: #f5f5f5;
    color: #000;
}

.header-cart-dropdown-body {
    max-height: 350px;
    overflow-y: auto;
    padding: 0.5rem;
}

.header-cart-empty {
    padding: 2rem;
    text-align: center;
    color: #777;
}
.header-cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.header-cart-item:last-child {
    border-bottom: none;
}

.header-cart-item:hover {
    background-color: #f9f9f9;
}

.header-cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.header-cart-item-info {
    flex: 1;
    min-width: 0;
}

.header-cart-item-name {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-cart-item-code {
    font-size: 0.75rem;
    color: #777;
    margin-bottom: 0.25rem;
}

.header-cart-item-price {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary, #1976d2);
}

.header-cart-item-remove {
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
    padding: 0.25rem;
    align-self: flex-start;
}

.header-cart-item-remove:hover {
    opacity: 1;
}

.header-cart-dropdown-footer {
    padding: 1rem;
    border-top: 1px solid var(--border, #e0e0e0);
}

.header-cart-dropdown-footer .account-primary-btn {
    width: 100%;
    justify-content: center;
}

.alert {
    padding: 10px 20px;
    font-size: 14px;
    margin: -1px 0 0 0;
    position: relative;
    background: #FFF;
    border-top: #d5d5d5 dashed 1px;
    border-bottom: #d5d5d5 dashed 1px;
}
.alert > span{
    display: inline-flex;
    align-items: center;
    margin-left: 12px;
}
.alert > .alert_close_modal{
    width: 30px;
    height: 30px;
    position: absolute;
    cursor: pointer;
    right: 10px;
    top: 5px;
    text-align: center;
    line-height: 35px;
    vertical-align: middle;
}
.alert > .alert_close_modal > img{
    opacity: 0.7;
}
.alert > .alert_close_modal:hover{
    background: #F5F5F5;
}
.alert > .alert_close_modal:hover > img{
    opacity: 1;
}
.alert a {
    text-decoration: underline;
    color: #111;
}
.alert a:hover{
    text-decoration: none;
}
/* Как в таблицах ЛК (.account-table-link), а не общий .alert a */
.alert a.account-table-link {
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px dotted var(--text-light);
}
.alert a.account-table-link:hover {
    color: var(--text);
    border-bottom-color: var(--text);
    text-decoration: none;
}
.alert-success{
    color: #5e9c1c;
}
.alert-error{
    color: #9e3a38;
}
.alert-warning{
    color: #8a6d3b;
}
.alert-info{
    color: #31708f;
}
.alert-link {
    color: #000;
    text-decoration: underline;
}
.alert-link:hover {
    color: #333;
}
#topErrorContainer > .alert{
    border-top: none;
}
.account-number {
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    letter-spacing: 0.5px;
}
.account-copy-inline-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    margin-left: 8px;
    opacity: 0.5;
    transition: opacity 0.2s;
    vertical-align: middle;
}
.account-copy-inline-btn:hover {
    opacity: 1;
}
.breadcrumbs_wrapper{
    width: 100%;
    height: 28px;
    margin: 15px 0;
}
.booking_breadcrumbs {
    margin-left: 35px;
}
.registry-detail-header .breadcrumbs_wrapper{
    margin: 0;
}
.breadcrumbs_wrapper > .inner{
    max-width: 98%;
    margin: 0;
}
.breadcrumbs_wrapper > .inner:after{
    content: '';
    clear: both;
    float: none;
}
ul.breadcrumbs{
    min-width: 220px;
    background: #000;
    vertical-align: middle;
}
ul.breadcrumbs > li{
    float: left;
    display: inline-block;
    line-height: 21px;
    margin: 0 28px 0 0;
    position: relative;
}
ul.breadcrumbs > li > a{
    font-size: 11px;
    vertical-align: middle;
    display: inline-block;
    color: #777;
    position: relative;
    text-transform: uppercase;
    text-decoration: none;
}
ul.breadcrumbs > li > span{
    font-size: 11px;
    vertical-align: middle;
    display: inline-block;
    color: #777;
    position: relative;
    text-transform: uppercase;
    text-decoration: none;
}
ul.breadcrumbs > li > a:hover{
    text-decoration: underline;
}
ul.breadcrumbs > li:after{
    content: '';
    position: absolute;
    top: 6px;
    right: -20px;
    display: inline-block;
    border: 5px solid transparent;
    border-left: 6px solid #000;
}
ul.breadcrumbs > li:before{
    content: '';
    position: absolute;
    top: 6px;
    right: -18px;
    display: inline-block;
    border: 5px solid transparent;
    border-left: 6px solid #FFF;
    z-index: 10;
}
ul.breadcrumbs > li:last-child > a{
    font-size: 11px;
    vertical-align: middle;
    color: #4b5563;
}
ul.breadcrumbs > li:last-child > a:hover{
    color: #4b5563;
    text-decoration: none;
    cursor: default;
}
ul.breadcrumbs > li:last-child:after{
    display: none;
}
ul.breadcrumbs:after{
    content: '';
    clear: both;
    float: none;
}
.form_group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #CCC;
    margin-bottom: 8px;
}
.form_group label > a{
    color: #1976d2;
}
.form_group label > a:hover{
    text-decoration: underline;
}
.form_group label:hover{
    color: #111;
}
.form_group label > span {
    color: #777;
    font-size: 14px;
}
.form_group.checkbox{
    display: flex;
    flex-direction: row;
    margin: 10px 20px;
}
.no-margin .form_group.checkbox{
    margin: 0;
}
.form_group.checkbox > input[type=checkbox]{
    display: none;
}
.form_group.checkbox{
    display: flex;
    flex-direction: row;
}
.form_group.checkbox > input[type=checkbox]{
    display: none;
}
.form_group.checkbox > input[type=checkbox]:checked ~ .checkbox_wrapper{
    background: transparent;
    border: #222 solid 1px;
}
.form_group.checkbox > input[type=checkbox]:checked ~ label > span{
    color: #111;
}
.form_group.checkbox > input[type=checkbox]:checked ~ label > span.filter-checkbox-count{
    color: var(--text-light);
}
.form_group.checkbox > input[type=checkbox]:not(:checked) ~ .checkbox_wrapper{
    background: transparent;
    border: #CCC solid 1px;
    transition: background 0.25s ease-in-out, border 0.25s ease-in-out;
}
.form_group > label.filter-checkbox-label > .filter-checkbox-label:hover{
    color: #111;
}
.form_group.checkbox > input[type=checkbox]:checked + label{
    color: #111;
}
.form_group.checkbox > .checkbox_wrapper{
    width: 15px;
    height: 15px;
    order: 1;
    display: inline-block;
    border: #CCC solid 1px;
    overflow: hidden;
    border-radius: 0;
    margin: 2px 0 0 0;
    box-sizing: content-box;
}
.form_group.checkbox > .checkbox_wrapper .cover{
    width: 0;
    height: 14px;
    overflow: hidden;
    line-height: 13px;
    text-align: left;
    transition: width 0.15s ease-in-out;
}
.form_group.checkbox > .checkbox_wrapper .cover img{
    vertical-align: middle;
    margin-left: 2px;
}
.form_group.checkbox > input[type=checkbox]:checked ~ .checkbox_wrapper .cover{
    width: 14px;
}
.form_group.checkbox > label{
    display: inline-block;
    order: 2;
    margin: 0 0 0 8px;
}
.form_group.checkbox > label:hover + .checkbox_wrapper{
    border: #888 solid 1px;
}
.form_group.checkbox > .checkbox_wrapper .cover > img{
    /*-webkit-filter: invert(1);*/
    /*filter: invert(1);*/
}
/* Запрет выделения и перетаскивания чекбоксов и картинки галочки (чтобы не ломать массовое выделение мышью) */
.form_group.checkbox .checkbox_wrapper,
.form_group.checkbox .checkbox_inner,
.form_group.checkbox .cover,
.form_group.checkbox .cover img {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
    user-drag: none;
    pointer-events: none;
}
.form_group.checkbox .checkbox_wrapper {
    pointer-events: auto;
}
/* Запрет выделения миниатюр в ячейках (корзина и др.) */
.cart-item-thumb,
.cart-item-cell-content img {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}
.main {
    /*padding: 2rem 0;*/
}
.dashboard-header {
    margin-bottom: 2rem;
}
.dashboard-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text);
}
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 1.5rem;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-light);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.dashboard-section {
    background-color: var(--bg);
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 1.5rem;
}

.dashboard-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.qr-codes-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.qr-code-card {
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 1.25rem;
    background: var(--bg);
}

.qr-code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.qr-code-header h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.qr-code-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background-color: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 0;
    color: var(--text-light);
}

.qr-code-info {
    margin: 1rem 0;
    padding: 1rem;
    background-color: var(--bg-light);
    border-radius: 0;
}

.qr-info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.qr-info-item:last-child {
    margin-bottom: 0;
}

.qr-info-label {
    color: var(--text-light);
    font-weight: 500;
    min-width: 70px;
}

.qr-info-value {
    color: var(--text);
}

.qr-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.qr-category-badge {
    padding: 0.25rem 0.75rem;
    background-color: var(--primary);
    color: var(--bg);
    border-radius: 0;
    font-size: 0.75rem;
    font-weight: 500;
}

.qr-code-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.qr-stat {
    display: flex;
    flex-direction: column;
}

.qr-stat-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
}

.qr-stat-label {
    font-size: 0.75rem;
    color: var(--text-light);
}
.geo-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.geo-item {
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 0;
    background: var(--bg);
}

.geo-city {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.geo-scans {
    font-size: 0.875rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.geo-coords {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Реестр: стили страницы /registry перенесены в css/registry/grid.css */

.filters-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
/* Accordion стили */
.filter-accordion {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.filter-accordion-item:last-child {
    border-bottom: none;
}
.filter-accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0.5rem;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font-size: 0.875rem;
    color: var(--text);
    transition: background-color 0.2s;
    margin: 0;
    font-weight: 600;
    border: none;
    border-bottom: 1px dashed var(--border);;
}
.filter-accordion-header:hover {
    background-color: #F9F9F9;
    color: #000;
}
.filter-accordion-item.expanded .filter-accordion-header {
    /*background-color: #faf0cd;*/
    color: #111;
}
.filter-accordion-item.expanded .filter-accordion-header:hover {
    background-color: #faf0cd;
    background-color: #F5F5F5;
}
.filter-accordion-title {
    flex: 1;
}
.filter-accordion-icon {
    width: 12px;
    height: 12px;
    transition: transform 0.2s;
    flex-shrink: 0;
    margin-left: 0.5rem;
    pointer-events: none;
}
.filter-accordion-item.expanded .filter-accordion-icon {
    transform: rotate(180deg);
}
.filter-accordion-item{
    /*padding: 8px 0;*/
}
.filter-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0;
}
.filter-accordion-item.expanded .filter-accordion-content {
    max-height: 500px;
    padding: 0.5rem;
}

/* Чекбоксы фильтров */
.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text);
    transition: background-color 0.15s;
}
.filter-checkbox:hover {
    background-color: rgba(0, 0, 0, 0.02);
}
.filter-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
    margin: 0;
}
.filter-accordion-content .form_group.checkbox {
    margin: 8px 0;
}
.filter-checkbox-label {
    flex: 1;
    cursor: pointer;
}
.form_group > label.filter-checkbox-label{
    display: flex;
}
.form_group > label.filter-checkbox-label > .filter-checkbox-label{
    font-size: 0.85rem;
    color: var(--text-light);
}
.form_group > label.filter-checkbox-label > .filter-checkbox-label:hover{
    color: #111;
}
.form_group > label.filter-checkbox-label > .filter-checkbox-count{
    color: var(--text-light);
    font-size: 0.8125rem;
    margin-left: auto;
}
.filter-checkbox-count {
    color: var(--text-light);
    font-size: 0.8125rem;
    margin-left: auto;
}

/* Ссылка "еще" для дополнительных фильтров */
.filter-more-link {
    display: inline-block;
    color: #378ce1;
    font-size: 14px;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s;
}

.filter-more-link:hover {
    color: #fc5808;
    text-decoration: none;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
}

.filter-select,
.filter-input {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0;
    background-color: var(--bg);
    color: var(--text);
    font-size: 0.875rem;
    font-family: inherit;
    cursor: pointer;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: var(--primary);
}

.filter-input {
    cursor: text;
}

/* Период: кастомный datepicker */
.filter-date-wrap {
    position: relative;
    display: block;
}
.filter-date-wrap .filter-date-input {
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
}
.filter-date-wrap .filter-date-input.filter-date-input--range-invalid {
    border-color: #dc2626 !important;
}
.filter-date-display {
    display: block;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0;
    background-color: var(--bg);
    color: var(--text);
    font-size: 0.875rem;
    font-family: inherit;
    min-height: 2.25rem;
    line-height: 1.25;
}
.filter-date-display--empty {
    color: var(--text-light, #6b7280);
}
.filter-date-wrap .filter-date-input.filter-date-input--old-native {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    margin: 0;
}
.filter-date-wrap .filter-date-input.filter-date-input--old-native:focus {
    opacity: 0;
}
.filter-date-wrap:focus-within .filter-date-display {
    border-color: var(--primary);
    outline: none;
}
.filter-date-wrap .date-picker-dropdown {
    z-index: 1000;
}

.filter-date-clear-btn,
.rm-filter-date-clear-btn{
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--text-light, #6b7280);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}
.filter-date-clear-btn:hover,
.rm-filter-date-clear-btn:hover{
    color: var(--text, #111);
}
.filter-date-wrap .filter-date-input{
    padding-right: 32px;
}

.filter-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex-shrink: 0;
    margin-top: 1rem;
}
.filter-submit {
    padding: 0.75rem 1.5rem;
    background-color: var(--primary);
    color: var(--bg);
    border: 1px solid var(--primary);
    border-radius: 0;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 100%;
}

.filter-submit:hover {
    background-color: var(--primary-light);
}

.filter-reset {
    padding: 0.75rem 1.5rem;
    background-color: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 0;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: border-color 0.2s;
    text-align: center;
    width: 100%;
}

.filter-reset:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-info {
    margin-top: 1rem;
    padding: 0.75rem;
    background-color: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 0;
    font-size: 0.875rem;
    color: var(--text);
}

.registry-filters-info-block {
    width: 100%;
    text-align: left;
    padding: 0.5rem 0;
    margin: 0 0 0.75rem 0;
    border-radius: 0;
}

.registry-filters-info-block--active {
    background-color: #fff7e5;
    border: #ffcd73 dashed 1px;
    padding: 0.5rem 0.5rem;
}

.registry-filters-info-block strong {
    font-weight: 700;
}
/* Карта реестра объектов */
.registry-map {
    padding: 30px 30px 0;
}
@media (max-width: 768px) {
    .registry-map {
        padding: 1rem;
    }
}

.registry-map-header {
    margin-bottom: 1.5rem;
}

.registry-map-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
}

.registry-map-header p {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.registry-map-filters {
    margin-bottom: 1.5rem;
}

.filters-form--map {
    gap: 1rem 2rem;
    align-items: flex-end;
}

.filter-select-multi {
    position: relative;
    width: 100%;
}

.filter-select-multi-toggle {
    width: 100%;
    text-align: left;
    border: 1px solid var(--border);
    background: var(--bg);
    padding: 0.45rem 0.75rem;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 0;
    position: relative;
    padding-right: 2rem;
}

.filter-select-multi.is-open .filter-select-multi-toggle {
    border-color: var(--primary);
}

.filter-select-multi-toggle::after {
    content: '';
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--text);
    pointer-events: none;
}

.filter-select-multi-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    max-height: 240px;
    overflow-y: auto;
    z-index: 2500; /* поверх карты */
}

.filter-select-multi.is-open .filter-select-multi-dropdown {
    display: block;
}

.filter-select-multi-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
}

.filter-select-multi-option input {
    cursor: pointer;
}

.registry-map-layout {
    display: flex;
    align-items: stretch; /* карта и панель одной высоты */
    height: 520px;        /* базовое значение, дальше переопределяется JS под высоту окна */
}

#registry-map-canvas {
    /* ширина блока карты, высота берётся от layout */
    flex: 0 0 calc(100% - 400px); /* ширина карты = общая ширина минус ширина панели и зазора */
    width: calc(100% - 400px);
    height: 100%;
    border: 1px solid var(--border);
}

/* Боковая панель справа от карты */
.registry-map-modal {
    /* фиксированная ширина панели */
    flex: 0 0 400px;
    width: 400px;
    max-width: 400px;
    display: flex;
    height: 100%; /* та же высота, что у карты */
}
.registry-map-modal-inner {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    background: var(--bg);
    background: rgba(255, 255, 255, .5);
    border-left: none;
    box-shadow: none;
    display: flex;
    flex-direction: column;
}
.registry-map-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem 15px;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
}
.registry-map-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}
.registry-map-header-main {
    flex: 1;
    min-width: 0;
}
.registry-map-sort-wrap {
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.25rem;
    border: 1px solid #e6e8eb;
    background: #f7f8fa;
    box-sizing: border-box;
}

.registry-map-sort-select {
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
    height: 40px;
    border-color: #d7dbe0;
    background: #fff;
}

.registry-map-city-btn {
    position: relative;
    width: 40px;
    height: 40px;
    min-width: 40px;
    border: 1px solid #d7dbe0;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #1f2937;
    transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s, transform 0.1s ease;
}

.registry-map-city-btn:hover {
    border-color: #9aa4b2;
    background: #f3f5f7;
}

.registry-map-city-btn:focus-visible {
    outline: none;
    border-color: #4f7cff;
    box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.22);
}

.registry-map-city-btn:active {
    transform: translateY(1px);
}

.registry-map-city-btn-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    opacity: 0.9;
}

.registry-map-city-btn .registry-owner-btn-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 1.2rem;
    height: 1.2rem;
    padding: 0 0.3rem;
    font-size: 0.7rem;
    font-weight: 700;
    background: #4f7cff;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.rm-owner-selected-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.6rem 1rem 0.2rem;
}

.rm-owner-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
    padding: 0.28rem 0.5rem;
    border: 1px solid #d7dbe0;
    background: #f3f5f7;
    color: var(--text);
    font-size: 0.8rem;
    line-height: 1.2;
}

.rm-owner-chip-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 220px;
}

.rm-owner-chip-remove {
    border: none;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    padding: 0;
}

.rm-owner-chip-remove:hover {
    color: #111;
}

.registry-map-code {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.registry-map-close {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    color: var(--text-light);
}

.registry-map-modal-body {
    padding: 10px 0 10px 10px;
    font-size: 0.9rem;
    color: var(--text);
    overflow-y: auto; /* скролл списка объектов */
    flex: 1;          /* тело растягивается по высоте панели */
}

.registry-map-placeholder {
    font-size: 0.85rem;
    color: var(--text-light);
}

.registry-map-pagination {
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text);
}

.registry-map-pagination-btn {
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    padding: 0.25rem 0.65rem;
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.2s;
    min-width: 32px;
}

.registry-map-pagination-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.registry-map-pagination-btn:not(:disabled):hover {
    border-color: var(--primary);
}

.registry-map-pagination-pages {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.registry-map-pagination-page {
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    padding: 0.2rem 0.55rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
    min-width: 30px;
    height: 30px;
}

.registry-map-pagination-page--active {
    background: var(--primary);
    color: var(--bg);
    border-color: var(--primary);
    cursor: default;
}

.registry-map-pagination-page:not(.registry-map-pagination-page--active):hover {
    border-color: var(--primary);
}

.registry-map-pagination-ellipsis {
    color: var(--text-light);
    padding: 0 0.2rem;
}

.registry-map-pagination-info {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    text-align: left;
    color: var(--text-light);
}

.registry-map-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem 1rem;
    margin: 0 0 1.25rem 0;
}

.registry-map-details dt {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08rem;
    color: var(--text-light);
}

.registry-map-details dd {
    margin: 0.1rem 0 0;
}

.registry-map-actions {
    display: flex;
    justify-content: flex-start;
    margin-top: 0.5rem;
}

.registry-map-link {
    padding: 0.5rem 1rem;
    border: 1px solid var(--text);
    text-decoration: none;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08rem;
    color: var(--text);
}

.registry-map-link[aria-disabled="true"] {
    opacity: 0.5;
    pointer-events: none;
}

@media (max-width: 960px) {
    .registry-map-modal-inner {
        max-width: 100%;
        width: calc(100% - 24px);
        max-height: calc(100% - 48px);
    }
}

@media (max-width: 900px) {
    .registry-map-layout {
        flex-direction: column;
        min-height: 400px;
    }
    #registry-map-canvas {
        flex: 0 0 280px;
        width: 100%;
        min-height: 280px;
    }
    .registry-map-modal {
        flex: 1 1 auto;
        width: 100%;
        max-width: none;
        min-height: 200px;
    }
}

/* Карточки объектов в модальном окне */
.registry-map-card-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.registry-map-card-list .registry-map-card {
    background: var(--bg);
    display: grid !important;
    grid-template-columns: 180px minmax(0, 1fr) !important;
    grid-template-areas:
        "image body"
        "actions actions";
    gap: 0.6rem;
    align-items: start;
    grid-auto-flow: row;
}

.registry-map-card-list .registry-map-card-image {
    width: 180px;
    flex-shrink: 0;
    grid-column: 1;
    grid-row: 1;
}

.registry-map-card-list .registry-map-card-image img {
    width: 100%;
    height: 135px;
    object-fit: cover;
    display: block;
}

.registry-map-card-list .registry-map-card-body {
    padding: 0.75rem 0.75rem 0.75rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    grid-column: 2;
    grid-row: 1;
}
#rm-body .registry-map-card-list,
#rm-body .registry-map-card-body{
    padding: 0 0.75rem 0.75rem 0;
}
.registry-map-card-header {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.registry-map-card-code {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12rem;
    color: var(--text-light);
}

.registry-map-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

.registry-map-card-title-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dashed transparent;
}

.registry-map-card-title-link:hover {
    border-bottom-color: currentColor;
}

.registry-map-card-meta {
    font-size: 0.8rem;
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

@media (max-width: 720px) {
    .registry-map-card-list .registry-map-card {
        grid-template-columns: 1fr !important;
        grid-template-areas:
            "image"
            "body"
            "actions";
    }

    .registry-map-card-list .registry-map-card-image {
        width: 100%;
        grid-column: 1;
        grid-row: 1;
    }

    .registry-map-card-list .registry-map-card-body {
        grid-column: 1;
        grid-row: 2;
    }

    .registry-map-card-list .registry-map-card-image img {
        width: 100%;
        max-width: 100%;
    }

    .registry-map-pagination {
        justify-content: center;
    }

    .registry-map-pagination-info {
        text-align: center;
    }
}

.registry-detail-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-start;
}
.registry-detail-header > div{
    width: 100%;
}
.registry-detail-header h2 {
    font-size: 1.75rem;
    color: #111;
}
.registry-detail-price-card {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.registry-detail-price-label {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.registry-price-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111;
    display: inline-block;
}

.registry-inline-item--price .registry-price-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
}

.registry-detail-back {
    font-size: 0.85rem;
    color: var(--text-light);
    text-decoration: none;
}

.registry-detail-back:hover {
    color: var(--text);
}
.registry-detail-breadcrumbs {
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.registry-detail-breadcrumbs a {
    color: var(--text-muted);
    text-decoration: none;
}

.registry-detail-breadcrumbs a:hover {
    color: var(--primary);
}

.registry-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(220px, 0.8fr);
    grid-template-areas:
        "media sidebar"
        "content sidebar";
    gap: 1.5rem;
}

.registry-detail-media-wrapper {
    grid-area: media;
}

.registry-detail-content {
    grid-area: content;
}

.registry-detail-sidebar {
    grid-area: sidebar;
}

.registry-detail-media-wrapper {
    display: flex;
    flex-direction: column;
}

.registry-detail-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.registry-detail-sidebar {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    gap: 1.5rem;
}

.registry-detail-media-tabs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0;
    background: var(--bg);
    border: 1px solid var(--border);
}

.registry-media-tabs-left {
    display: flex;
    gap: 0;
}

.registry-fullscreen-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text);
    transition: color 0.2s;
    margin: 0 10px;
}

.registry-fullscreen-btn:hover {
    color: var(--primary);
    background: var(--bg-light);
}

.registry-media-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    color: #111;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.registry-media-tab:hover {
    color: var(--primary);
}

.registry-media-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: var(--bg);
}

.registry-media-tab img {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.registry-media-content {
    position: relative;
    width: 100%;
}
.registry-media-panel {
    display: none;
}

.registry-media-panel.active {
    display: block;
}

.registry-detail-media-tabs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.registry-media-tabs-left {
    display: flex;
    gap: 0;
}

.registry-fullscreen-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text);
    transition: color 0.2s;
    margin: 0 10px;
}

.registry-fullscreen-btn:hover {
    color: var(--primary);
    background: var(--bg-light);
}

.registry-media-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    color: #111;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.registry-media-tab:hover {
    color: var(--primary);
}

.registry-media-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: var(--bg);
}

.registry-media-tab img {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.registry-media-content {
    position: relative;
    width: 100%;
}
.registry-media-panel {
    display: none;
}

.registry-media-panel.active {
    display: block;
}

/* Это определение для другого контекста, не для списка карточек */
.registry-map-modal-body > .registry-map-card {
    background: var(--bg);
    border-top: none;
    height: 350px;
    display: flex;
    flex-direction: column;
}

.registry-map-image {
    width: 100%;
    height: 300px;
    display: block;
    object-fit: cover;
    flex-shrink: 0;
}

.registry-map-meta {
    flex-shrink: 0;
}
.registry-photos-card {
    background: var(--bg);
    padding: 0;
    position: relative;
    border-top: none;
    display: flex;
    flex-direction: column;
}
.registry-detail-media-wrapper .registry-photos-card{
    border: 1px solid var(--border);
    border-top: none;
}

.registry-photos-slider {
    position: relative;
    width: 100%;
    height: 450px;
    overflow: hidden;
    isolation: isolate;
}
.registry-slider-controls {
    position: absolute;
    inset: 0;
    z-index: 30;
    pointer-events: none;
}
.registry-slider-controls .registry-slider-btn,
.registry-slider-controls .registry-slider-indicator {
    pointer-events: auto;
}
.registry-slider-viewport {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.registry-slider-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.registry-slider-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.registry-slider-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.registry-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text);
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.registry-slider-btn:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.registry-slider-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.registry-slider-btn--prev {
    left: 1rem;
}

.registry-slider-btn--next {
    right: 1rem;
}

.registry-slider-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.registry-slider-indicator {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.registry-slider-current {
    font-weight: 600;
}

.registry-slider-separator {
    opacity: 0.7;
}

.registry-slider-total {
    opacity: 0.7;
}

.registry-view3d-card {
    background: var(--bg);
    border-top: none;
    height: 420px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.registry-panorama-link-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.registry-panorama-link-note {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary, #666);
}

.registry-panorama-link-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color, #1976d2);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
}

.registry-panorama-link-btn:hover {
    opacity: 0.9;
}

#view3d-container,
.registry-yandex-panorama-wrap {
    width: 100%;
    height: 300px;
    flex: 1;
    position: relative;
    cursor: grab;
    overflow: hidden;
    touch-action: none;
}

.registry-yandex-panorama-wrap {
    min-height: 300px;
    box-sizing: content-box;
}

.registry-yandex-panorama-wrap * {
    box-sizing: content-box;
}

.registry-panorama-open-external {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    text-decoration: none;
    transition: opacity 0.2s;
}

.registry-panorama-open-external:hover {
    opacity: 0.9;
    color: white;
}

#view3d-container:active {
    cursor: grabbing;
}

#view3d-container canvas {
    cursor: grab;
}

#view3d-container canvas:active {
    cursor: grabbing;
}

#view3d-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.registry-view3d-controls {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border);
    background: var(--bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    height: auto;
    min-height: auto;
}

.registry-fullscreen-view3d .registry-view3d-controls {
    flex-shrink: 0;
    height: auto;
}

.view3d-info {
    font-size: 0.75rem;
    color: var(--text-light);
}

.view3d-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-view3d {
    padding: 0.375rem 0.75rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-view3d:hover {
    background: var(--primary-light);
}

#reset-view3d {
    background: var(--bg-light);
    color: var(--text);
    border: 1px solid var(--border);
}

#reset-view3d:hover {
    background: #e5e5e5;
}

/* Модальное окно на весь экран */
.registry-fullscreen-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.registry-fullscreen-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.registry-fullscreen-modal-content {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    overflow: hidden;
}

.registry-fullscreen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 2rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.registry-fullscreen-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
}

.registry-fullscreen-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text);
    transition: all 0.2s;
}

.registry-fullscreen-close:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.registry-fullscreen-tabs {
    display: flex;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    flex-shrink: 0;
}

.registry-fullscreen-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    color: var(--text);
    font-size: 0.875rem;
    transition: color 0.2s;
}

.registry-fullscreen-tab:hover {
    color: var(--primary);
}

.registry-fullscreen-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: var(--bg);
}

.registry-fullscreen-tab img {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.registry-fullscreen-content {
    flex: 1 1 0;
    position: relative;
    overflow: hidden;
    display: flex;
    min-height: 0;
    height: calc(100vh - 140px);
    width: 100%;
}
.registry-fullscreen-panel {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    min-height: 0;
    z-index: 0;
    pointer-events: none;
}
.registry-fullscreen-panel.active {
    display: block;
    z-index: 1;
    pointer-events: auto;
}
.registry-fullscreen-photos {
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Слайдер фотографий */
.registry-photos-slider {
    position: relative;
    width: 100%;
    min-height: 450px;
    overflow: hidden;
}

/* Слайдер в полноэкранном режиме должен занимать всю высоту */
.registry-fullscreen-photos .registry-photos-slider {
    height: 100%;
    min-height: 0;
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
}

.registry-slider-viewport {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Viewport в полноэкранном режиме */
.registry-fullscreen-photos .registry-slider-viewport {
    flex: 1 1 0;
    min-height: 0;
}

.registry-slider-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.registry-slider-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.registry-slider-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

.registry-thumbnail-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.25rem 0.5rem;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.registry-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text);
}

.registry-slider-btn:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.registry-slider-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.registry-slider-btn--prev {
    left: 2rem;
}

.registry-slider-btn--next {
    right: 2rem;
}

.registry-slider-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.registry-slider-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.registry-slider-current {
    font-weight: 600;
}

.registry-slider-separator {
    opacity: 0.7;
}

.registry-slider-total {
    opacity: 0.7;
}

.registry-fullscreen-map {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.registry-fullscreen-map .registry-map-image {
    flex: 1;
    height: auto;
    object-fit: contain;
}

.registry-fullscreen-view3d {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

#view3d-container-fullscreen,
#yandex-panorama-container-fullscreen.registry-yandex-panorama-wrap {
    flex: 1 1 0%;
    width: 100%;
    position: relative;
    overflow: hidden;
    display: block;
    min-height: 0;
    align-self: stretch;
}

#view3d-container-fullscreen canvas {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    object-fit: cover;
    max-width: 100%;
    max-height: 100%;
}

/* Модальное окно для QR кода телефона */
.qr-phone-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10001;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.qr-phone-modal.active {
    display: flex;
    opacity: 1;
}

.qr-phone-modal-content {
    background: var(--bg);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.qr-phone-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.qr-phone-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
}

.qr-phone-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text);
    transition: all 0.2s;
}

.qr-phone-modal-close:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.qr-phone-modal-body {
    padding: 1rem;
    text-align: center;
}

/* Портал модального окна */
#schedule-modal-portal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    display: none;
}

#schedule-modal-portal.is-open {
    display: block;
}

/* Модальное окно для расписаний */
.schedule-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    overflow-y: hidden;
    overflow-x: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    box-sizing: border-box;
}

/* Overlay — фиксированный чёрный фон (не скроллится вместе с контентом) */
.schedule-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 0;
    cursor: pointer;
}

/* Белая карточка по центру */
.schedule-modal-content {
    position: relative;
    z-index: 1;
    background: var(--bg);
    max-width: 600px;
    width: 100%;
    margin: 120px auto;
    flex-shrink: 0;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    cursor: default;
}

/* Блокировка скролла основной страницы */
body.modal-open {
    position: fixed;
    left: 0;
    right: 0;
    /* Важно: overflow visible, чтобы фиксированный портал модалки не обрезался
       при сдвиге body (lockScroll через top: -scrollY). */
    overflow: visible;
    width: 100%;
    height: 100vh;
}

.schedule-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.schedule-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
}

.schedule-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text);
    font-size: 1.5rem;
    line-height: 1;
    transition: all 0.2s;
}

.schedule-modal-close:hover {
    background: var(--bg-light);
    color: var(--primary);
}

/* Модальное окно для просмотра фотографий */
.photo-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.photo-modal-content {
    position: relative;
    background: var(--bg);
    max-width: 90vw;
    width: 100%;
    height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 2rem;
}

.photo-modal-body {
    width: 90%;
    margin: 0 auto;
    display: flex;
    flex: 1;
    align-items: center;
    gap: 1rem;
    overflow: hidden;
    position: relative;
}

.photo-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text);
    font-size: 1.5rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10002;
}

.photo-modal-close:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.photo-modal-slider {
    position: relative;
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.photo-modal-slider-viewport {
    flex: 1;
    height: 100%;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.photo-modal-slider-track {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-modal-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-modal-slide.active {
    display: flex;
    opacity: 1;
    z-index: 1;
}

.photo-modal-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    width: auto;
    height: auto;
}

.photo-modal-slider-btn {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text);
    transition: all 0.2s;
    z-index: 10001;
    flex-shrink: 0;
}

.photo-modal-slider-btn:hover {
    background: var(--bg-white);
    border-color: var(--primary);
    color: var(--primary);
}

.photo-modal-slider-btn--prev {
    order: 1;
}

.photo-modal-slider {
    order: 2;
}

.photo-modal-slider-btn--next {
    order: 3;
}

.photo-modal-thumbnails {
    width: 140px;
    flex-shrink: 0;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
    padding-right: 0.5rem;
    align-self: flex-start;
}

.photo-modal-thumbnail {
    cursor: pointer;
    border: 2px solid var(--border);
    overflow: hidden;
    transition: all 0.2s;
    background: var(--bg);
}
.photo-modal-thumbnail:hover {
    border-color: var(--primary);
}
.photo-modal-thumbnail.active {
    border-color: #fc5808;
}
.photo-modal-thumbnail-img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    display: block;
}
.photo-modal-thumbnail-label {
    display: block;
    padding: 0.4rem;
    font-size: 0.7rem;
    color: var(--text);
    text-align: center;
    background: var(--bg-light);
    border-top: 1px solid var(--border);
}

.photo-modal-thumbnail.active .photo-modal-thumbnail-label {
    background: #fc5808;
    color: #fff;
    font-weight: 600;
}

.photo-modal-counter {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    z-index: 10001;
}

@media (max-width: 768px) {
    .photo-modal-content {
        padding: 1rem;
        height: auto;
        max-height: 95vh;
    }

    .photo-modal-body {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        flex: none;
    }

    .photo-modal-slider {
        order: 1;
        width: 100%;
        min-height: 300px;
        height: auto;
        flex: none;
        flex-direction: column !important;
        gap: 1rem;
        align-items: stretch;
    }

    .photo-modal-slider-viewport {
        width: 100%;
        height: 300px;
        flex: none;
        order: 1;
    }

    .photo-modal-slider-track {
        width: 100%;
        height: 100%;
    }

    .photo-modal-thumbnails {
        order: 2 !important;
        width: 100% !important;
        max-height: none;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        overflow-x: visible;
        overflow-y: visible;
        padding-right: 0;
        padding-bottom: 0.5rem;
        align-self: stretch;
        gap: 0.5rem;
    }

    .photo-modal-slider-btn {
        position: relative;
        flex-shrink: 0;
    }

    .photo-modal-slider-btn--prev {
        order: 3;
    }

    .photo-modal-slider-btn--next {
        order: 4;
    }

    .photo-modal-thumbnail {
        flex-shrink: 0;
        width: 120px;
    }

    .photo-modal-thumbnail-img {
        height: 80px;
    }

    .photo-modal-img {
        max-width: 100%;
        max-height: 60vh;
        width: auto;
        height: auto;
    }
}

.schedule-modal-body {
    padding: 1.5rem;
}

.schedule-modal-body .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.schedule-modal-body label {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
    color: var(--text-light);
    gap: 0.4rem;
}

.schedule-modal-body input,
.schedule-modal-body select,
.schedule-modal-body textarea {
    border: 1px solid var(--border);
    padding: 0.65rem 0.75rem;
    font-size: 0.9rem;
    background: #fff;
    font-family: inherit;
}

.schedule-modal-body input:focus,
.schedule-modal-body select:focus,
.schedule-modal-body textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.schedule-modal-body input:disabled,
.schedule-modal-body select:disabled,
.schedule-modal-body textarea:disabled,
.schedule-modal-body label input:disabled,
.schedule-modal-body label select:disabled,
.schedule-modal-body label textarea:disabled {
    background: var(--bg-light) !important;
    color: var(--text-light) !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
    border-color: #d1d5db !important;
}

.schedule-modal-body textarea {
    resize: vertical;
    min-height: 80px;
}

.qr-phone-loading {
    padding: 2rem;
    color: var(--text-secondary);
}

.qr-phone-image-wrapper {
    display: flex;
    justify-content: center;
}
.qr-phone-image {
    max-width: 100%;
    height: auto;
    padding: 1rem;
    background: white;
}
.qr-phone-info {

}
.qr-phone-hint:not(.form-hint) {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}
.qr-phone-hint.form-hint {
    margin: 0;
}
.registry-photos-gallery {
    position: absolute;
    height: 100%;
    overflow: hidden;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
}
.image-wrapper {
    height: 100%;
    overflow: hidden;
    flex: 1;
    /*z-index: 120;*/
}
.image-wrapper:before{
    content: '';
    display: block;
    width: auto;
    height: 100%;
    z-index: 1000;
    position: relative;
}
.image-wrapper:first-child > .image-item{
    display: block;
}
.image-item{
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 420px;
    display: none;
}
.slider-active-image{
    height: 5px;
    width: 93%;
    z-index: 130;
    position: relative;
    background: rgba(0,0,0, 0.15);
    margin: -15px auto 0;
}
.slider-active-image:before{
    content: '';
    display: block;
    width: 0;
    height: 5px;
    margin: 0 auto;
    background: #000;
    transition: width 0.3s ease;
}
.image-wrapper:hover > .slider-active-image:before{
    width: 100%;
}
.image-wrapper:hover > .image-item{
    z-index: 110;
    display: block;
}
.registry-photo-radio {
    display: none;
}
.registry-photo-image {
    width: 100%;
    height: 100%;
    /*display: none;*/
    object-fit: cover;
}
.image-wrapper:hover .registry-photo-image {
    display: block;
}
.registry-photo-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
}

.registry-photo-radio:checked + .registry-photo-slide {
    opacity: 1;
    pointer-events: auto;
}
.registry-photos-gallery:has(#photo-1:checked) .registry-photo-indicator:nth-child(1),
.registry-photos-gallery:has(#photo-2:checked) .registry-photo-indicator:nth-child(2),
.registry-photos-gallery:has(#photo-3:checked) .registry-photo-indicator:nth-child(3),
.registry-photos-gallery:has(#photo-4:checked) .registry-photo-indicator:nth-child(4),
.registry-photos-gallery:has(#photo-5:checked) .registry-photo-indicator:nth-child(5) {
    background: #fff;
    width: 24px;
    border-radius: 4px;
}


/* Если фотография одна, скрываем индикаторы и зоны наведения */
.registry-photos-gallery:has(.registry-photo-radio:only-of-type),
.registry-photos-gallery:has(.registry-photo-radio:only-of-type) .registry-photos-hover-left,
.registry-photos-gallery:has(.registry-photo-radio:only-of-type) .registry-photos-hover-right {
    display: none;
}

.registry-photos-gallery:has(.registry-photo-radio:only-of-type) .registry-photos-viewport {
    height: 100%;
}

.registry-photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    color: var(--text-light);
    padding: 2rem;
}
.registry-photos-card > .registry-photo-placeholder{
    min-height: 170px;
}
.registry-photo-placeholder svg {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    stroke: var(--text-light);
}

.registry-photo-placeholder p {
    margin: 0;
    font-size: 0.9rem;
}

.registry-map-meta {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: var(--text-light);
    border-top: 1px solid var(--border);
}
.registry-detail-section {
    background: var(--bg);
    padding: 0 7px;
}
.registry-detail-section h3,
.registry-detail-section h4 {
    font-size: 1rem;
    font-weight: 500;
    margin: 0 0 1rem 0;
    color: #333;
}
.registry-specs-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
}
.registry-spec-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 5px 0;
}
.registry-spec-row:last-child {
    border-bottom: none;
}
.registry-spec-row dt {
    font-size: 13px;
    color: #777;
    font-weight: 400;
    margin: 0;
    white-space: nowrap;
    flex-shrink: 0;
}
.registry-spec-dots {
    flex: 1;
    min-width: 0;
    height: 1px;
    border-bottom: 1px dotted #ccc;
    margin: 0 0.5rem;
    align-self: baseline;
}
.registry-spec-row dd {
    font-size: 0.875rem;
    color: #000;
    margin: 0;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    white-space: normal;
    flex-shrink: 1;
    flex-wrap: wrap;
    word-break: break-word;
    min-width: 0;
}

.registry-spec-row dd > span {
    word-break: break-word;
    white-space: normal;
    flex-shrink: 1;
    min-width: 0;
}

.registry-spec-dd--multiline {
    display: block;
    text-align: right;
    white-space: normal;
}

.registry-spec-multiline {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
}

.registry-spec-multiline-item {
    white-space: normal;
    word-break: break-word;
}

.registry-file-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 22px;
    min-width: 36px;
    padding: 0 8px;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.12);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.registry-file-badge--pdf {
    color: #b42318;
    border-color: rgba(180, 35, 24, 0.35);
    background: rgba(180, 35, 24, 0.06);
}

.registry-file-badge--pdf:hover {
    background: rgba(180, 35, 24, 0.12);
    border-color: rgba(180, 35, 24, 0.5);
    text-decoration: none;
}
.registry-spec-copy {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: #999;
    display: flex;
    align-items: center;
    transition: color 0.2s;
    opacity: 0.6;
}
.registry-spec-copy:hover {
    color: #333;
    opacity: 1;
}
.registry-spec-copy svg {
    width: 16px;
    height: 16px;
}
.registry-specs-more{
    margin: 5px 0;
    font-size: 14px;
    color: #0d61af;
}
.registry-specs-more:after{
    content: "\e99b";
}
.registry-specs-more:hover{
    text-decoration: none;
    color: #fc5808;
}
.registry-detail-task p {
    margin: 0;
    color: var(--text);
    line-height: 1.5;
}

.registry-detail-campaign {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.registry-detail-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.registry-detail-list li::before {
    content: '— ';
    color: var(--text-light);
}

.registry-detail-note {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-light);
    padding: 0.75rem;
    background: var(--bg-light);
}


.registry-agency-selection {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.registry-agency-selection h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: var(--text);
}

.registry-agency-hint {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0 0 1rem 0;
}

.registry-agency-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.registry-agency-item {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    background: white;
    transition: all 0.2s;
}

.registry-agency-item:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.registry-agency-item.selected {
    border-color: var(--primary);
    background: #f8f9ff;
}

.registry-agency-header {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.registry-agency-logo {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.registry-agency-info {
    flex: 1;
    min-width: 0;
}

.registry-agency-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.registry-agency-verified {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #10B981;
    color: white;
    font-size: 10px;
    font-weight: bold;
    flex-shrink: 0;
}

.registry-agency-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
}

.registry-agency-stars {
    display: flex;
    gap: 2px;
    align-items: center;
}

.registry-agency-stars svg {
    width: 12px;
    height: 12px;
    color: #ddd;
}

.registry-agency-stars svg.active {
    color: #FBBF24;
}

.registry-agency-rating-value {
    font-weight: 600;
    color: var(--text);
}

.registry-agency-reviews {
    color: var(--text-secondary);
}

.registry-agency-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.registry-agency-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
}

.registry-agency-detail-label {
    color: var(--text-secondary);
}

.registry-agency-detail-value {
    font-weight: 500;
    color: var(--text);
}

.registry-agency-select-btn {
    width: 100%;
    padding: 0.625rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.registry-agency-select-btn:hover {
    background: var(--primary-hover);
}

.registry-agency-select-btn.selected {
    background: #10B981;
}

.registry-agency-select-btn.selected:hover {
    background: #059669;
}

.registry-agency-actions {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.registry-agency-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

.registry-agency-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}
.registry-contact-meta {
    font-size: 0.8rem;
    color: var(--text-light);
}

.registry-contact-rating {
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.registry-contact-btn {
    width: 100%;
    display: inline-block;
    text-align: center;
    padding: 0.65rem 1rem;
    border: 1px solid var(--text);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.1rem;
    text-decoration: none;
    color: var(--text);
}

.registry-similar-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.registry-similar-list a {
    color: var(--text);
    text-decoration: none;
}

.registry-similar-list span {
    display: block;
    color: var(--text-light);
    margin-top: 0.25rem;
}

@media (max-width: 960px) {
    .registry-detail-layout {
        grid-template-columns: 1fr;
        grid-template-areas:
            "media"
            "content"
            "sidebar";
        gap: 1.5rem;
        padding: 0 1rem;
    }

    .registry-detail-media-wrapper,
    .registry-detail-content,
    .registry-detail-sidebar {
        width: 100%;
    }
    .btn-book-primary {
        width: 100%;
    }

    .registry-detail-delivery {
        flex-direction: column;
    }

    .registry-detail-title {
        font-size: 1.5rem;
    }

    .registry-price-value {
        font-size: 1.75rem;
    }
}

.code-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 0;
    color: var(--text);
    font-family: monospace;
    font-size: 0.75rem;
}

.scans-count {
    font-weight: 600;
    color: var(--primary);
}

.coords {
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--text-light);
}


.status-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 400;
    text-transform: lowercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    padding: 2px 5px;
}

.status-badge.status-free {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.status-occupied {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.status-releasing {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.status-maintenance {
    background: #e0e7ff;
    color: #3730a3;
}

.status-badge.status-reserved {
    background: #ddd6fe;
    color: #5b21b6;
}

.status-badge.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.status-pending_owner_approval {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge.status-pending_advertiser_approval {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.status-approved {
    background: #e8f5ec;
    color: #5e9c1c;
}
.status-badge.status-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.status-active {
    background-color: #e8f5ec;
    color: #5e9c1c;
}
.status-inactive {
    background-color: #fee2e2;
    color: #991b1b;
}
.status-available {
    background-color: #dbeafe;
    color: #1e40af;
}
.status-confirmed {
    background-color: #d1fae5;
    color: #065f46;
}
.status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.status-draft {
    background-color: #e5e7eb;
    color: #374151;
    border: 1px solid #cbd5f5;
}

/* Account */
.account-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
}
.account-sidebar {
    /*background: var(--bg);*/
    border-right: 1px dashed var(--border);
    padding: 1.5rem 1.5rem 1.5rem 0;
    min-height: calc(100vh - 180px);
}
.account-logo {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.2rem;
    color: var(--text);
}

.account-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.account-nav-link {
    text-decoration: none;
    color: var(--text);
    font-size: 14px;
    padding: 0 5px 0 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 400;
    border-left: 4px solid transparent;
    height: 40px;
    min-height: 40px;
}
.account-nav-link:hover{
    background: #F5F5F5;
    color: #000;
}
.account-nav-link svg,
.account-nav-link img.account-nav-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}
.account-nav-link .account-nav-arrow {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    transition: transform 0.2s;
}

.account-nav-link span:not(.account-nav-count) {
    flex: 1;
}

.account-nav-count {
    color: var(--text-light);
    padding: 0.25rem 0.5rem;
    font-weight: 400;
    font-size: 12px;
    min-width: 1.5rem;
    text-align: center;
}
.account-nav-link--active {
    font-weight: 600;
    color: #000;
    /*background: linear-gradient(90deg, #fff7f4 0%, transparent 100%);*/
    border-left-color: #ff6c37;
}
.account-nav-group {
    display: flex;
    flex-direction: column;
}

.account-nav-link--parent {
    cursor: pointer;
    position: relative;
}

.account-nav-group--active .account-nav-arrow {
    transform: rotate(180deg);
}

.account-nav-submenu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-left: 36px;
    /*margin-top: 4px;*/
    /*margin-bottom: 8px;*/
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.account-nav-group--active .account-nav-submenu {
    max-height: 350px;
}

.account-nav-sublink {
    text-decoration: none;
    color: var(--text-light);
    font-size: 13px;
    padding: 0 8px 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    transition: all 0.2s;
    font-weight: 400;
    height: 36px;
    min-height: 36px;
}

.account-nav-sublink:hover {
    color: var(--text);
    background: #F0F0F0;
}
.account-nav-sublink--active {
    color: #111;
    background: #F5F5F5;
    font-weight: 600;
}

.account-nav-sublink .account-nav-count {
    font-size: 11px;
}

.account-environment {
    margin-top: 2rem;
    padding: 0.75rem;
    background: #fef2f2;
    color: #991b1b;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
}

.account-content {
    display: flex;
    flex-direction: column;
    /*gap: 1.5rem;*/
    min-width: 0;
    overflow-x: hidden;
    min-height: calc(100vh - 100px);
}

.account-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg);
    padding: 1.25rem 35px 0;
    margin: 15px 0 0 0;
    gap: 2rem;
    min-width: 0;
    box-sizing: border-box;
}

.account-toolbar > div:first-child {
    flex: 1;
    min-width: 0;
}

.account-toolbar > div:last-child {
    flex-shrink: 0;
}
.account-toolbar-actions {
    display: flex;
    gap: 0.75rem;
}
.account-greeting {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111;
}
.account-meta {
    font-size: 0.85rem;
    color: var(--text-light);
}
.account-logout {
    border: 1px solid var(--border);
    background: var(--bg);
    padding: 9px 12px;
    font-size: 13px;
    color: #777;
    text-transform: lowercase;
    text-decoration: none;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 35px;
    box-sizing: border-box;
    cursor: pointer;
}
.account-logout:hover{
    border-color: #999;
    color: #222;
}

/* One-time highlight for "return back" link */
.account-logout.return-back-once {
    /* Очень быстрое мигание рамки несколько раз подряд */
    animation: returnBackOncePulse 0.14s ease-in-out 5;
}

@keyframes returnBackOncePulse {
    0% {
        border-color: #111;
    }
    50% {
        border-color: var(--border);
    }
    100% {
        border-color: #111;
    }
}
.account-secondary-btn {
    border: 1px solid var(--border);
    background: var(--bg);
    padding: 9px 12px;
    font-size: 13px;
    color: #777;
    text-transform: lowercase;
    text-decoration: none;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 35px;
    box-sizing: border-box;
    cursor: pointer;
    margin-left: 15px;
}
.account-secondary-btn:hover {
    border-color: #999;
    color: #222;
}
.account-primary-btn {
    background: #ff6c37;
    color: #FFF;
    padding: 9px 12px;
    font-size: 13px;
    cursor: pointer;
    border: none;
    text-transform: lowercase;
    outline: none;
    text-decoration: none;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 35px;
    box-sizing: border-box;
}
.account-primary-btn:hover {
    /*color: #000;*/
    /*border: #000 solid 1px;*/
}
.account-primary-btn--ghost {
    background: #F5F5F5;
    color: var(--text);
}
.account-primary-btn--ghost:hover {
    background: var(--bg-light);
}
.account-primary-btn:hover {
    opacity: 0.9;
}
#filter-structure-open{
    background: #FFF;
}
#filter-advertiser-open{
    background: #FFF;
}
.account-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}
.account-stats--compact .account-stat-card {
    min-height: auto;
}
.account-stat-card {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 1rem 1.25rem;
}
.account-stat-value {
    font-size: 2rem;
    font-weight: 700;
}
.account-stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
}

.account-panels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.account-card {
    background: var(--bg);
    padding: 1.25rem 10px 1.25rem 30px;
    min-height: 18px;
}
.account-card--wide {
    grid-column: span 2;
}
.account-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
}
.account-tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    bottom: -2px;
    text-decoration: none;
    display: inline-block;
}

.account-tab:hover {
    color: var(--text);
}

.account-tab.active {
    color: var(--text);
    border-bottom-color: var(--text);
    font-weight: 600;
}
.account-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.account-table th,
.account-table td {
    padding: 1rem 0.75rem;
    border-bottom: 1px solid #FFF;
    text-align: left;
}
#objects-table-body td{
    border-bottom: none;
}
.account-table tr{
    border-top: none;
    border-bottom: none;
}
.account-table tr:last-child{
    /*border-top: none;*/
}
.account-table tr:first-child{
    border-top: none;
    border-bottom: none;
}

.account-table th {
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    font-size: 0.75rem;
    color: var(--text-light);
}

.account-table-link {
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px dotted var(--text-light);
}

.account-table-link:hover {
    border-bottom-color: var(--text);
}

/* Поиск по таблице */
.table-search-wrapper {
    padding-bottom: 1rem;
}
.table-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.table-search-input {
    width: 100%;
    max-width: 100%;
    padding: 0.75rem 1rem;
    padding-right: 2.5rem;
    border: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--text);
    background-color: var(--bg);
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.table-search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}
.table-search-input::placeholder {
    color: var(--text-light);
}
.table-search-clear {
    position: absolute;
    right: 0.5rem;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border: none;
    background: none;
    color: var(--text-light);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}
.table-search-clear:hover {
    color: var(--text);
}
.table-pagination {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.table-pagination .pagination-wrapper {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.table-pagination .pagination-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    background-color: var(--bg);
    color: var(--text);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}
.table-pagination .pagination-btn:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
    background-color: rgba(96, 165, 250, 0.05);
}
.table-pagination .pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.table-pagination .pagination-pages {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}
.table-pagination .pagination-page {
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.5rem;
    border: 1px solid var(--border);
    background-color: var(--bg);
    color: var(--text);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.table-pagination .pagination-page:hover:not(.active) {
    border-color: var(--primary);
    color: var(--primary);
    background-color: rgba(96, 165, 250, 0.05);
}
.table-pagination .pagination-page.active {
    background-color: var(--primary);
    color: var(--bg);
    border-color: var(--primary);
    font-weight: 600;
}

.table-pagination .pagination-ellipsis {
    padding: 0 0.5rem;
    color: var(--text-light);
    font-size: 0.875rem;
}
.table-pagination .pagination-info {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-left: auto;
}
.account-form-card {
    flex: 2 1 0;
    max-width: none;
    min-width: 0;
}
.account-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.form-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0;
}
.form-tab-btn {
    background: none;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    font-size: 12px;
    padding: 0.9rem 0.9rem;
    cursor: pointer;
    color: var(--text-light);
    border: none;
    margin-bottom: -2px;
    text-decoration: none;
    display: inline-block;
}
.form-tab-btn:hover {
    color: var(--text);
}
.form-tab-btn.active {
    color: var(--text);
    border-bottom: 2px solid var(--text);
}
.form-tab-content {
    display: none;
    flex-direction: column;
    gap: .5rem;
}
.form-tab-content.active {
    display: flex;
}
.form-hint:not(.form-hint--create) {
    box-sizing: border-box;
    max-width: 100%;
    margin: 0 0 1rem;
    padding: 0.85rem 1rem;
    border: none;
    border-radius: 8px;
    background: #fff7e5;
}
.form-hint-inner {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    column-gap: 0.75rem;
    row-gap: 0.4rem;
    align-items: center;
}
.form-hint-icon {
    grid-row: 1;
    grid-column: 1;
    width: 24px;
    height: 24px;
}
.form-hint-title {
    grid-row: 1;
    grid-column: 2;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    color: #c4870a;
}
.form-hint-body {
    grid-row: 2;
    grid-column: 2;
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: #1f2937;
}
/* Поддержка docs-callout блоков на страницах кабинета (вне docs/handbook.css) */
.platform-docs__info-box {
    margin: 0 0 1rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
}
.platform-docs__info-box-inner {
    display: grid;
    grid-template-columns: 24px 1fr;
    column-gap: 0.75rem;
    row-gap: 0.4rem;
    align-items: center;
}
.platform-docs__info-box-icon {
    grid-row: 1;
    grid-column: 1;
    width: 24px;
    height: 24px;
}
.platform-docs__info-box-title {
    grid-row: 1;
    grid-column: 2;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
}
.platform-docs__info-box p {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: #1f2937;
}
.platform-docs__info-box-inner > p {
    grid-row: 2;
    grid-column: 2;
}
.platform-docs__info-box--tip {
    background: #eaf5ea;
}
.platform-docs__info-box--tip .platform-docs__info-box-title {
    color: #2f8f57;
}
.form-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.5rem;
}
.form-section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}
.form-section-description{
    font-size: 14px;
    color: #9ca3af;
    font-weight: 400;
}
.object-tabs {
    margin-bottom: 1rem;
}
.object-tab-btn {
    background: none;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    font-size: 0.75rem;
    padding: 0.75rem 0.9rem;
    cursor: pointer;
    color: var(--text-light);
    border: none;
}
.object-tab-btn.active {
    color: var(--text);
    border-bottom: 2px solid var(--text);
}
.object-tab-content {
    display: none;
    flex-direction: column;
    gap: 1.5rem;
}
.object-tab-content.active {
    display: flex;
}
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

/* Селектор сторон конструкции */
.sides-selector {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.sides-selector--grouped {
    align-items: flex-start;
    gap: 25px;
}
.sides-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.sides-group__items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
.sides-group__items .side-item:first-child .side-label {
    font-weight: 700;
}
.sides-selector--tabs.sides-selector--grouped {
    flex-wrap: nowrap;
    align-items: center;
    gap: 0;
    background: transparent;
    padding: 0;
    border: none;
    height: 100%;
}
.sides-group--tabs {
    flex-direction: row;
    align-items: center;
    gap: 0;
    padding: 0 0.75rem 0 0;
    margin: 0;
    background: transparent;
    border: none;
    border-right: 1px solid var(--border-color, #e5e7eb);
    border-radius: 0;
    height: 100%;
}
.sides-group--tabs:last-child {
    border-right: none;
    padding-right: 0;
}
.sides-group--tabs .sides-group__items {
    flex-wrap: nowrap;
    gap: 0;
    align-items: center;
}
.sides-group--tabs .side-item {
    width: auto;
    height: auto;
    overflow: visible;
    background: none;
}
.sides-group--tabs:not(:has(.side-item)) {
    display: none;
}
.form-row--full {
    grid-column: 1 / -1;
}
.form-row--structure-sale {
    margin-bottom: 2rem;
}
.structure-sale-fields {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.structure-sale-fields label {
    width: 100%;
}
.structure-sale-field:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
    opacity: 0.7;
}
.structure-sale-field:disabled::placeholder {
    color: #bbb;
}
.form-field-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.form-field-wrapper .form-field-label {
    font-size: 0.85rem;
    color: var(--text-light);
}
.side-item {
    position: relative;
    box-sizing: border-box;
    border-radius: 3px;
}
#booking_sides .side-item {
    width: 40px;
    height: 40px;
    overflow: hidden;
    background: linear-gradient(
        to bottom right,
        #FFF 0%,
        #FFF 50%,
        #F7F7F7 50%,
        #F7F7F7  100%
    );
}
.side-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
}

.side-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 3px;
    border: 2px solid var(--border);
    background: transparent;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-width 0.2s ease, border-color 0.2s ease;
    user-select: none;
    position: relative;
}


.side-label:hover {
    border-color: var(--text);
}

.side-checkbox:checked + .side-label {
    border-color: var(--text);
    border-width: 2px;
    color: #000;
}

.side-checkbox:focus + .side-label {
    outline: none !important;
    box-shadow: 0 0 0 2px var(--text), 0 0 0 4px transparent;
    animation: focusBoxShadowFade 0.5s ease-out forwards;
}

@keyframes focusBoxShadowFade {
    0% {
        box-shadow: 0 0 0 2px var(--text), 0 0 0 4px transparent;
    }
    100% {
        box-shadow: none;
    }
}
.account-form label {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
    color: var(--text-light);
    gap: 0.4rem;
}

/* Колонка «подпись + input»: подсказки (.inn-suggestions) должны быть вне <label>,
   чтобы клик не перекидывал фокус на поле через поведение label */
.account-form .form-field-inline {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    position: relative;
    flex: 1;
    min-width: 0;
}
.account-form input,
.account-form select,
.account-form textarea {
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 0.65rem 0.75rem;
    font-size: 0.9rem;
    background: #fff;
}

.account-form input:disabled,
.account-form select:disabled,
.account-form textarea:disabled,
.account-form label input:disabled,
.account-form label select:disabled,
.account-form label textarea:disabled {
    background: var(--bg-light) !important;
    color: var(--text-light) !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
    border-color: #d1d5db !important;
}
input[name="qr_url"]{
    width: 100%;
}
.account-form textarea {
    resize: vertical;
}
.form-field-with-helper {
    position: relative;
}
.form-field-with-helper--categories {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-light);
    overflow: visible;
}
.form-field-with-helper--code {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-light);
}
.form-field-with-helper--type {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-light);
}
.form-label-with-helper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-light);
}
.category-helper-toggle {
    border: none;
    background: transparent;
    font-size: 0.8rem;
    line-height: 1;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.category-helper-toggle:hover {
    background: var(--bg-light);
    color: var(--text);
}

.category-helper-toggle--inline {
    text-decoration: underline;
    color: var(--primary);
    background: none;
    border: none;
    cursor: pointer;
    font-size: inherit;
    padding: 0;
    width: auto;
    height: auto;
    border-radius: 0;
}

.category-helper-toggle--inline:hover {
    background: none;
    color: var(--primary);
    text-decoration: none;
}

.filter-checkbox-label .category-helper-toggle--inline {
    margin-left: 0.5rem;
    font-size: 0.9em;
    vertical-align: middle;
}

.category-reference-panel {
    padding: 1.25rem 1.25rem 1.25rem 1.5rem;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    flex: 0 0 520px;
    max-width: 520px;
    min-width: 0;
    box-sizing: border-box;
    max-height: calc(100vh - 180px); /* Ограничиваем высоту панели высотой viewport минус шапка */
    height: calc(100vh - 180px); /* Фиксируем высоту */
    overflow: hidden; /* Убираем скролл у самой панели */
}

/* Booking: allow panel to size naturally (no fixed height) */
#category-reference-panel[data-disable-panel-height="1"] {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}
.category-reference-panel--open {
    display: flex !important;
}
/* При открытой панели без активной секции (режим #required) — показывать все секции */
.category-reference-panel--open:not(.category-reference-panel--has-active) .category-hint {
    display: block;
}
/* При открытой панели с активной секцией — показывать только активную */
.category-reference-panel--open.category-reference-panel--has-active .category-hint {
    display: none;
}
.category-reference-panel--open.category-reference-panel--has-active .category-hint--active {
    display: block;
}
.category-reference-panel--open .category-reference-item {
    display: block;
}
.category-reference-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
    padding: 0 0 10px 0;
}
.category-reference-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}
.category-reference-close {
    background: transparent;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--text-light);
}

.category-reference-close:hover {
    background: var(--bg-light);
    color: var(--text);
}

.category-reference-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    flex: 1 1 auto;
    overflow-y: auto; /* Оставляем только вертикальный скролл */
    overflow-x: hidden; /* Убираем горизонтальный скролл */
    padding: 0 10px 0 0;
    min-height: 0; /* Важно для корректной работы flex с overflow */
}

.category-reference-item {
    padding: 0.5rem 0.25rem;
    border-bottom: 1px dashed var(--border);
}

.category-reference-item:last-child {
    border-bottom: none;
}
.info-image-wrapper{
    max-width: 100%;
    position: relative;
}
.info-image-wrapper > img{
    max-width: 100%;
}
.category-reference-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}
.category-reference-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #111;
}
.category-reference-chip {
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.category-reference-description {
    font-size: 0.8rem;
    color: var(--text-light);
    margin: 5px 0;
}
.category-reference-description strong{
    color: #111;
    font-size: 12px;
}

.category-reference-list {
    margin-top: 0.5rem;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.category-reference-list li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
    font-size: 0.85rem;
    line-height: 1.5;
}

.category-reference-list li:last-child {
    margin-bottom: 0;
}

.category-reference-list li strong {
    color: #111;
    font-size: 0.85rem;
}

/* Роли в настройках */
.roles-selection {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.category-hint {
    width: 100%;
    display: none;
}
.category-hint--active {
    display: block;
}
.form-tabs-wrapper {
    width: auto;
    background: var(--bg);
    border-bottom: 2px solid var(--border);
    margin: 0 30px;
}

.form-tabs-wrapper .form-tabs {
    max-width: 100%;
    padding: 0;
    border-bottom: none;
}

.account-form-layout {
    /*padding: 0 20px;*/
    display: flex;
    align-items: stretch;
    gap: .5rem;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    max-width: 100%;
}

@media (max-width: 960px) {
    .account-form-layout {
        flex-direction: column;
    }

    .category-reference-panel {
        width: 100%;
        margin-left: 0;
        flex: 1 1 auto;
        max-width: 100%;
    }
}

.form-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.form-actions--top {
    margin-bottom: 1.5rem;
    justify-content: flex-end;
}

.upload-dropzone {
    border: 2px dashed #CCC;
    background: #F9F9F9;
    padding: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    color: #000;
    cursor: pointer;
}
.upload-dropzone:hover{
    border: 2px dashed #1976d2;
    background: #F5F5F5;
}
.upload-dropzone svg {
    margin: 0 auto;
    color: #1976d2;
}

.upload-dropzone span {
    font-weight: 600;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.08rem;
}

.upload-dropzone small {
    color: var(--text-light);
}

.upload-dropzone--small {
    padding: 1rem;
}

.upload-dropzone--small svg {
    width: 24px;
    height: 24px;
}

.upload-dropzone--small span {
    font-size: 0.875rem;
}

.upload-dropzone--small small {
    font-size: 0.75rem;
}

.upload-hint {
    border-left: 2px solid var(--border);
    padding-left: 1rem;
    color: var(--text-light);
    font-size: 0.85rem;
}

.upload-hint ul {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
}


.booking-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.booking-card {
    border: 1px solid var(--border);
    background: var(--bg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.booking-card-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.booking-object {
    font-size: 1rem;
    font-weight: 600;
}

.booking-object-meta {
    font-size: 0.85rem;
    color: var(--text-light);
}

.booking-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
}

.booking-meta div {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.booking-meta dt {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-light);
    letter-spacing: 0.08rem;
}

.booking-meta dd {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text);
}

.booking-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.booking-timeline-step {
    border: 1px dashed var(--border);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: var(--text-light);
}

.booking-timeline-step.done {
    border-style: solid;
    border-color: var(--success);
    color: var(--text);
}

.booking-timeline-label {
    text-transform: uppercase;
    letter-spacing: 0.08rem;
    font-size: 0.7rem;
}

.booking-timeline-time {
    font-weight: 600;
    font-size: 0.9rem;
}

.booking-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.booking-created {
    font-size: 0.75rem;
    color: var(--text-light);
}

.booking-header-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.booking-quick-meta {
    list-style: none;
    margin: 1rem 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.9rem;
}

.booking-quick-meta li {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.booking-note {
    font-size: 0.85rem;
    color: var(--text-light);
}

.object-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}
.object-meta-card {
    border: 1px solid var(--border);
    background: var(--bg);
    padding: 1rem;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.object-meta-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    color: var(--text-light);
}
.object-meta-value {
    font-size: 0.95rem;
}
.object-map-placeholder {
    border: 1px dashed var(--border);
    padding: 2rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.85rem;
}
.object-availability table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.object-availability th,
.object-availability td {
    padding: 0.75rem;
    border-bottom: 1px dashed var(--border);
    text-align: left;
}
.object-availability tr:last-child td {
    border-bottom: 1px dashed transparent;
}
.account-card header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.account-card h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}
.account-card header span {
    font-size: 0.8rem;
    color: var(--text-light);
}
.chart-placeholder {
    border: 1px dashed var(--border);
    background: var(--bg-light);
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
}
.chart-placeholder--donut {
    border-radius: 50%;
    width: 160px;
    height: 160px;
    margin: 0 auto;
    position: relative;
}
.donut-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}
.donut-value--primary {
    font-size: 1.5rem;
    font-weight: 700;
}

.donut-value--label {
    font-size: 0.75rem;
    color: var(--text-light);
}

.storage-meta {
    list-style: none;
    margin-top: 1rem;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.storage-meta li {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text);
}

.account-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.link-card {
    border: 1px solid var(--border);
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg);
}

.link-card-title {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.05rem;
}

.link-card-text {
    font-size: 0.8rem;
    color: var(--text-light);
}

.link-card-action {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
}

.account-feed .feed-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.feed-time {
    color: var(--text-light);
    margin-right: 1rem;
}

.feed-text {
    color: var(--text);
}

@media (max-width: 960px) {
    .account-layout {
        grid-template-columns: 1fr;
    }

    .account-sidebar {
        min-height: auto;
    }

    .account-toolbar {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
    font-style: italic;
}

.btn-book {
    padding: 0.5rem 1rem;
    background-color: var(--primary);
    color: var(--bg);
    border: 1px solid var(--primary);
    border-radius: 0;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-book img {
    filter: brightness(0) invert(1);
}
.btn-book:hover {
    background-color: var(--primary-light);
}

.text-muted {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Теги анализа шаблона */
.analysis-tag {
    display: inline-block;
    padding: 0.4rem 0.75rem;
    background-color: var(--primary);
    color: var(--bg);
    border: 1px solid var(--primary);
    font-size: 0.85rem;
    text-transform: lowercase;
    letter-spacing: 0.05rem;
}

.analysis-tag::first-letter {
    text-transform: uppercase;
}

/* Поля для типов действий QR-кода */
.qr-action-fields {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border);
}

.qr-action-fields label {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
    color: var(--text-light);
    gap: 0.4rem;
}

.qr-action-fields input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

.qr-action-fields label:has(input[type="checkbox"]) {
    flex-direction: row;
    align-items: center;
}

/* Мультиселект объектов */
.objects-multiselect {
    position: relative;
    width: 100%;
}

.objects-multiselect-toggle {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border);
    background: var(--bg);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    min-height: 42px;
}

.objects-multiselect-toggle::after {
    content: '▼';
    font-size: 0.7rem;
    color: var(--text-light);
    margin-left: 0.5rem;
}

.objects-multiselect.is-open .objects-multiselect-toggle {
    border-color: var(--primary);
}

.objects-placeholder {
    color: var(--text-light);
}

.objects-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.object-tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: var(--primary);
    color: var(--bg);
    font-size: 0.75rem;
    border-radius: 2px;
}

.objects-multiselect-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    background: var(--bg);
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
}

.objects-multiselect.is-open .objects-multiselect-dropdown {
    display: block;
}

.object-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s;
}

.object-option:last-child {
    border-bottom: none;
}

.object-option:hover {
    background: var(--bg-light);
}

.object-option input[type="checkbox"] {
    margin-top: 0.25rem;
    cursor: pointer;
}

.object-option span {
    flex: 1;
    font-size: 0.85rem;
}

.object-option strong {
    color: var(--text);
    font-weight: 600;
}

/* Карточка QR-кода для объекта */
.qr-code-card {
    border: 1px solid var(--border);
    padding: 1rem;
    background: var(--bg);
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.qr-code-card-image {
    flex-shrink: 0;
}

.qr-code-card-image img {
    width: 150px;
    height: 150px;
    border: 1px solid var(--border);
    background: white;
    padding: 0.5rem;
}

.qr-code-card-info {
    flex: 1;
}

.qr-code-card-object {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.qr-code-card-object-type {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.qr-code-card-code {
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.qr-code-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.qr-code-card-actions button {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
}

/* Пагинация */
.pagination-wrapper {
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.pagination-info {
    font-size: 0.875rem;
    color: var(--text-light);
}

.pagination {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pagination-link {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    background-color: var(--bg);
    color: var(--text);
    text-decoration: none;
    font-size: 0.875rem;
    transition: border-color 0.2s, color 0.2s;
    display: inline-block;
}

.pagination-link:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination-current {
    background-color: var(--primary);
    color: var(--bg);
    border-color: var(--primary);
    font-weight: 600;
}

.pagination-current:hover {
    border-color: var(--primary);
    color: var(--bg);
}

.template-processing-grid {
    grid-template-columns: 350px 1fr;
    gap: 1rem;
    align-items: start;
    margin-top: 1rem;
    display: none;
}
.template-preview-controls {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    align-items: center;
}

.template-control-btn {
    display: none;
    padding: 0.5rem;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    cursor: pointer;
    color: var(--text);
    transition: all 0.2s;
    align-items: center;
    justify-content: center;
}

.template-control-btn:hover {
    background: var(--bg);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.template-control-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
#template-preview-wrapper{
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
}
.template-preview-box {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-height: 40px;
    background: var(--bg-light);
    overflow: hidden;
    box-sizing: border-box;
}
.template-preview-placeholder {
    position: absolute;
    inset: 0;
    padding: 1.5rem;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    text-align: left;
    background: linear-gradient(135deg, rgba(37,99,235,0.04), rgba(16,185,129,0.03));
}
.template-preview-text { max-width: 220px; }
.template-preview-title { margin: 0; font-weight: 700; }
.template-preview-subtitle { margin: 4px 0 0; color: var(--text-light); font-size: 0.9rem; }
.template-preview-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}
.template-status-panel {
    border-left: 1px dashed var(--border);
    background: var(--bg);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0 20px;
}
.template-status-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}
.template-meta-title { margin: 0; font-weight: 700; }
.template-meta-hint { margin: 4px 0 0; color: var(--text-light); font-size: 0.9rem; }
.template-meta-badge {
    padding: 4px 10px;
    border-radius: 14px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.8rem;
}
.template-status-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    flex-direction: column;
    gap: 0.5rem;
}
.template-status-list > li{
    display: inline-block;
    padding: 4px 8px;
    border: transparent solid 1px;
    font-size: 12px;
    text-transform: lowercase;
}
.template-status-list > li.active{
    border: #777 solid 1px !important;
}
.template-status-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
}
.template-status-step[data-state="pending"], .template-status-step {
    background: #f3f4f6;
    border-color: #e5e7eb;
}
.template-status-step[data-state="active"], .template-status-step.active {
    color: var(--primary);
    font-weight: 600;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.2);
}
.template-status-step[data-state="active"] .dot, .template-status-step.active .dot { background: var(--primary); }
.template-status-step[data-state="done"], .template-status-step.done {
    color: var(--success);
}
.template-status-step[data-state="done"] .dot, .template-status-step.done .dot { background: var(--success); }

.template-meta {
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
.template-meta-label {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.template-meta-name { margin: 0; font-weight: 600; }
.template-meta-size { margin: 2px 0 0; color: var(--text-light); font-size: 0.9rem; }
.template-tags { margin-top: 0.5rem; }
.template-tags-list { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-top: 0.35rem; }
.template-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.20rem 0.5rem;
    background: #F5F5F5;
    border: #F5F5F5 solid 2px;
    color: #111;
    font-size: 0.85rem;
}
.template-tag--muted {
    background: #f3f4f6;
    color: var(--text-light);
    font-weight: 500;
}
.template-tags-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}
.template-tag-input {
    flex: 1;
    min-width: 160px;
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.95rem;
}
.template-tag--removable {
    position: relative;
    padding-right: 1.5rem;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}
.template-tag--removable:hover {
    background: #e5e5e5;
    border-color: #E5E5E5;
}
.template-tag--editing {
    background: #e3f2fd !important;
    border: 1px solid #2196f3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}
.template-tag-close {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--text-light);
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    padding: 0;
}
.template-tag-close:hover {
    color: var(--text);
}
.template-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.25rem;
}

.pagination-ellipsis {
    padding: 0.5rem 0.25rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.pagination-prev,
.pagination-next {
    font-weight: 500;
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .time-chart {
        height: 150px;
    }
}

/* Корзина */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 35px;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.cart-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    align-items: start;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cart-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.cart-item-image {
    flex-shrink: 0;
    width: 150px;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-light);
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
}

.cart-item-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.cart-item-title a {
    color: var(--text);
    text-decoration: none;
}

.cart-item-title a:hover {
    color: var(--primary);
}

.cart-item-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.cart-item-code {
    font-weight: 500;
}

.cart-item-period {
    display: flex;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.cart-item-period-label {
    color: var(--text-light);
}

.cart-item-period-value {
    font-weight: 500;
    color: var(--text);
}

.cart-item-agency {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.cart-item-agency-label {
    color: var(--text-light);
}

.cart-item-agency-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-item-agency-logo {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
}

.cart-item-agency-name {
    font-weight: 500;
    color: var(--text);
}

.cart-item-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cart-item-price-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
}

.cart-item-remove-form {
    margin: 0;
}

.cart-item-remove-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.cart-item-remove-btn:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
}

.cart-sidebar {
    position: sticky;
    top: 2rem;
}

.cart-summary {
    padding: 1.5rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.cart-summary-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    color: var(--text);
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    font-size: 0.875rem;
}

.cart-summary-row:not(:last-child) {
    border-bottom: 1px solid var(--border);
}

.cart-summary-label {
    color: var(--text-light);
}

.cart-summary-value {
    font-weight: 500;
    color: var(--text);
}

.cart-summary-total {
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 2px solid var(--border);
    font-size: 1.125rem;
}

.cart-summary-total .cart-summary-label {
    font-weight: 600;
    color: var(--text);
}

.cart-summary-total .cart-summary-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
}

.btn-cart-checkout {
    width: 100%;
    margin-top: 1.5rem;
    padding: 0.875rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-cart-checkout:hover {
    background: #3b82f6;
}

.cart-continue-link {
    display: block;
    margin-top: 1rem;
    text-align: center;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.cart-continue-link:hover {
    color: #3b82f6;
    text-decoration: underline;
}

.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.cart-empty svg {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.cart-empty h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    color: var(--text);
}

.cart-empty p {
    color: var(--text-light);
    margin: 0 0 2rem 0;
}

.btn-primary {
    display: inline-block;
    padding: 0.875rem 2rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #3b82f6;
}

/* Вкладки корзины */
.cart-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}

.cart-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    position: relative;
}

.cart-tab:hover {
    color: var(--text);
}

.cart-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.cart-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 0.375rem;
    background: var(--text-light);
    color: var(--bg);
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.cart-tab.active .cart-tab-badge {
    background: var(--primary);
    color: var(--bg);
}

.cart-tab-content {
    position: relative;
}

.cart-tab-panel {
    display: none;
}

.cart-tab-panel.active {
    display: block;
}

/* Стили для броней */
.cart-item-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.cart-item-payment-status {
    font-size: 0.875rem;
    color: var(--text-light);
}

.cart-item-date {
    display: flex;
    gap: 0.5rem;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.cart-item-date-label {
    color: var(--text-light);
}

.cart-item-date-value {
    color: var(--text);
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

.btn-cart-view {
    padding: 0.5rem 1rem;
    background: var(--bg);
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-cart-view:hover {
    background: var(--primary);
    color: var(--bg);
}

/* Стили для аукционов */
.cart-item-auction {
    position: relative;
}

.auction-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: var(--success);
    color: var(--bg);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
}

.auction-badge-leading {
    background: #f59e0b;
}

.auction-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.auction-bid-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auction-bid-label {
    font-size: 0.875rem;
    color: var(--text-light);
}

.auction-bid-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary);
}

.auction-my-bid {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auction-my-bid-label {
    font-size: 0.875rem;
    color: var(--text-light);
}

.auction-my-bid-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.auction-my-bid-value.leading {
    color: #f59e0b;
}

/* Стили для моих аукционов (которые я создал) */
.cart-item-my-auction {
    position: relative;
}

.auction-status-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.375rem 0.75rem;
    color: var(--bg);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
}

.auction-status-badge.status-active {
    background: var(--success);
}

.auction-status-badge.status-no_bids {
    background: var(--text-light);
}

.auction-owner-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.auction-price-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.auction-price-label {
    color: var(--text-light);
}

.auction-price-value {
    font-weight: 500;
    color: var(--text);
}

.auction-price-current {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
}

/* Стили для страницы аукциона */
.auction-detail {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
    align-items: start;
}

.auction-detail-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.auction-header-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    gap: 1.5rem;
}

.auction-object-image {
    flex-shrink: 0;
    width: 200px;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-light);
}

.auction-object-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auction-object-info h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: var(--text);
}

.auction-object-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.auction-object-code {
    font-weight: 500;
    color: var(--text);
}

.auction-object-type,
.auction-object-city {
    padding: 0.25rem 0.75rem;
    background: var(--bg-light);
    border-radius: 4px;
    font-size: 0.875rem;
    color: var(--text);
}

.auction-object-address {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.auction-info-card,
.auction-bids-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
}

.auction-info-card h3,
.auction-bids-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    color: var(--text);
}

.auction-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.auction-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.auction-info-label {
    font-size: 0.875rem;
    color: var(--text-light);
}

.auction-info-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
}

.auction-description {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.auction-description h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    color: var(--text);
}

.auction-description p {
    color: var(--text);
    line-height: 1.6;
    margin: 0;
}

.auction-bids-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.auction-bid-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    position: relative;
}

.auction-bid-item--mine {
    background: #eff6ff;
    border: 1px solid var(--primary);
}

.auction-bid-avatar {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
}

.auction-bid-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auction-bid-info {
    flex: 1;
    min-width: 0;
}

.auction-bid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.auction-bid-name {
    font-weight: 500;
    color: var(--text);
}

.auction-bid-time {
    font-size: 0.875rem;
    color: var(--text-light);
}

.auction-bid-amount {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary);
}

.auction-bid-badge {
    padding: 0.375rem 0.75rem;
    background: var(--primary);
    color: var(--bg);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.auction-detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 2rem;
}

.auction-current-card,
.auction-bid-card,
.auction-owner-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
}

.auction-current-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.auction-current-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    color: var(--text);
}

.auction-time-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #f59e0b;
}

.auction-current-bid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.auction-current-bid-label {
    font-size: 0.875rem;
    color: var(--text-light);
}

.auction-current-bid-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.auction-bids-stats {
    margin-bottom: 1rem;
}

.auction-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.auction-stat-label {
    font-size: 0.875rem;
    color: var(--text-light);
}

.auction-stat-value {
    font-weight: 600;
    color: var(--text);
}

.auction-stat-value--price {
    font-size: 1.25rem;
    color: var(--primary);
}

.auction-my-bid-info {
    padding: 1rem;
    background: #eff6ff;
    border: 1px solid var(--primary);
    border-radius: 8px;
    margin-top: 1rem;
}

.auction-my-bid-label {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.auction-my-bid-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.auction-my-bid-amount.leading {
    color: #f59e0b;
}

.auction-leading-badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: #f59e0b;
    color: var(--bg);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.auction-bid-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    color: var(--text);
}

.auction-balance-info {
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
}

.auction-balance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.auction-balance-item:not(:last-child) {
    margin-bottom: 0.5rem;
}

.auction-balance-label {
    color: var(--text-light);
}

.auction-balance-value {
    font-weight: 600;
    color: var(--text);
}

.auction-balance-reserved {
    color: #f59e0b;
}

.auction-min-bid-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #fef3c7;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.auction-min-bid-label {
    font-size: 0.875rem;
    color: var(--text);
}

.auction-min-bid-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: #f59e0b;
}

.auction-insufficient-balance {
    padding: 0.75rem;
    background: #fee2e2;
    color: #dc2626;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.auction-bid-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-auction-bid-submit {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: var(--primary);
    color: var(--bg);
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-auction-bid-submit:hover:not(.disabled) {
    background: #3b82f6;
}

.btn-auction-bid-submit.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.auction-bid-hint {
    font-size: 0.75rem;
    color: var(--text-light);
    margin: 0;
    text-align: center;
}

.auction-owner-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: var(--text);
}

.auction-owner-card p {
    color: var(--text-light);
    margin: 0 0 1.5rem 0;
}

.auction-owner-stats {
    margin-bottom: 1.5rem;
}

@media (max-width: 968px) {
    .auction-detail {
        grid-template-columns: 1fr;
    }

    .auction-detail-sidebar {
        position: static;
    }

    .auction-header-card {
        flex-direction: column;
    }

    .auction-object-image {
        width: 100%;
        height: 300px;
    }

    .auction-info-grid {
        grid-template-columns: 1fr;
    }
}

.auction-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.auction-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

.btn-auction-bid {
    padding: 0.625rem 1.25rem;
    background: var(--primary);
    color: var(--bg);
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-auction-bid:hover {
    background: #3b82f6;
}

/* Баланс пользователя */
.cart-balance {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 1.5rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.cart-balance-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-balance-label {
    font-size: 0.875rem;
    color: var(--text-light);
}

.cart-balance-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
}

.cart-balance-reserved {
    color: #f59e0b;
}

.btn-balance-topup {
    padding: 0.625rem 1.25rem;
    background: var(--primary);
    color: var(--bg);
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-balance-topup:hover {
    background: #3b82f6;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    gap: 2rem;
}

.page-header h1 {
    margin: 0;
}

/* Аукцион - улучшенные стили */
.auction-bid-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.auction-min-bid {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.auction-min-bid-label {
    color: var(--text-light);
}

.auction-min-bid-value {
    font-weight: 600;
    color: var(--primary);
}

.auction-reserved-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    padding: 0.5rem;
    background: #fef3c7;
    border-radius: 4px;
}

.auction-reserved-label {
    color: var(--text-light);
}

.auction-reserved-value {
    font-weight: 600;
    color: #f59e0b;
}

.auction-insufficient-balance {
    padding: 0.5rem;
    background: #fee2e2;
    color: #dc2626;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.btn-auction-bid.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Модальные окна */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 2rem;
}

.modal-content {
    background: var(--bg);
    max-width: 500px;
    width: 100%;
    overflow-y: auto;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--bg-light);
    color: var(--text);
}

.modal-body {
    padding: 1.5rem;
}

.bid-form,
.topup-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.bid-info {
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 6px;
}

.bid-info p {
    margin: 0.5rem 0;
}
.bid-hint {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.75rem;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
}
.form-group input {
    padding: 0.75rem;
    border: 1px solid var(--border);
    font-size: 1rem;
    transition: border-color 0.2s;
}
.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group small {
    font-size: 0.75rem;
    color: var(--text-light);
}

.topup-amounts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.topup-amount-btn {
    padding: 0.875rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.topup-amount-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.topup-amount-btn.active {
    background: var(--primary);
    color: var(--bg);
    border-color: var(--primary);
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--bg-light);
}

/* Кнопка создания аукциона */
.cart-actions-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
}

.btn-create-auction {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: var(--bg);
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-create-auction:hover {
    background: #3b82f6;
}

.btn-create-auction svg {
    width: 16px;
    height: 16px;
}

/* Стили для формы создания аукциона */
.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.form-row {
    display: grid;
    /*grid-template-columns: repeat(2, 1fr);*/
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
}

.form-label.required::after {
    content: ' *';
    color: #dc2626;
}

.form-control {
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.875rem;
    color: var(--text);
    background: var(--bg);
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.form-control select {
    cursor: pointer;
}

.form-input-with-suffix {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input-with-suffix .form-control {
    padding-right: 3rem;
}

.form-input-suffix {
    position: absolute;
    right: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-light);
    pointer-events: none;
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
    margin-top: 0.25rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.form-checkbox span {
    font-size: 0.875rem;
    color: var(--text);
    line-height: 1.5;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 2rem;
}

.form-actions--top {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

@media (max-width: 968px) {
    .cart-content {
        grid-template-columns: 1fr;
    }

    .cart-sidebar {
        position: static;
    }

    .cart-item {
        flex-direction: column;
    }

    .cart-item-image {
        width: 100%;
        height: 200px;
    }

    .cart-item-price {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .cart-tabs {
        overflow-x: auto;
    }

    .cart-tab {
        flex-shrink: 0;
    }

    .cart-item-actions,
    .auction-actions {
        flex-direction: row;
        width: 100%;
        justify-content: space-between;
    }

    .page-header {
        flex-direction: column;
    }

    .cart-balance {
        flex-direction: column;
        align-items: stretch;
    }

    .cart-balance-item {
        justify-content: space-between;
    }

    .btn-balance-topup {
        width: 100%;
    }

    .modal-overlay {
        padding: 1rem;
    }

    .topup-amounts {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .account-primary-btn,
    .form-actions .account-logout {
        width: 100%;
    }
}

/* Предупреждение о работе только с Контур.Диадок ЭДО */
.edo-notice {
    width: 100%;
    border-bottom: 1px dashed var(--border);
    padding: 8px 1rem;
    position: relative;
}
.edo-notice-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.edo-notice-icon {
    flex-shrink: 0;
    font-size: 1.125rem;
}
.edo-notice-content p {
    margin: 0;
    font-size: 0.875rem;
    color: #000;
    line-height: 1.5;
}
.edo-notice-close {
    width: 30px;
    height: 30px;
    line-height: 30px;
    vertical-align: middle;
    flex-shrink: 0;
    margin-left: auto;
    padding: 4px;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    position: absolute;
    right: 10px;
    top: 4px;
}

.edo-notice-close:hover {
    opacity: 1;
}

/* Блок уведомления о Cookie и LocalStorage */
.cookie-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg);
    border-top: 1px solid var(--border);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    padding: 1rem;
}

.cookie-notice-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.cookie-notice-text {
    flex: 1;
}

.cookie-notice-text p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text);
    line-height: 1.5;
}

.cookie-notice-link {
    color: var(--primary);
    text-decoration: underline;
    transition: color 0.2s;
}

.cookie-notice-link:hover {
    color: var(--primary-light);
    text-decoration: none;
}
.cookie-notice-actions {
    flex-shrink: 0;
}
.cookie-notice-btn {
    padding: 8px 12px;
    background: var(--primary);
    background: transparent;
    border: #CCC dashed 1px;
    /*border: none;*/
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    color: #555;
    text-transform: capitalize;
    transition: background-color 0.2s;
}
.cookie-notice-btn:hover {
    color: #000;
    border-color: #000;
    /*background: var(--primary-light);*/
}

@media (max-width: 768px) {
    .cookie-notice-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .cookie-notice-actions {
        width: 100%;
    }

    .cookie-notice-btn {
        width: 100%;
    }

    body {
        padding-bottom: 120px; /* Больше отступ для мобильных */
    }
}

.bookings-advertiser-open,
.bookings-client-open {
    width: 100%;
    justify-content: space-between;
    text-align: left;
}

.bookings-advertiser-modal,
.bookings-client-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    overflow-y: auto;
}

.bookings-advertiser-modal-overlay,
.bookings-client-modal-overlay {
    display: none;
}

.bookings-advertiser-modal-content,
.bookings-client-modal-content {
    position: relative;
    width: min(560px, 100%);
    margin: auto;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.bookings-advertiser-modal-header,
.bookings-client-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.bookings-advertiser-modal-header h3,
.bookings-client-modal-header h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
}

.bookings-advertiser-modal-close,
.bookings-client-modal-close {
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #374151;
}

.bookings-advertiser-modal-tools,
.bookings-client-modal-tools {
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.bookings-advertiser-modal-search-input,
.bookings-client-modal-search-input {
    width: 100%;
    height: 40px;
    border: 1px solid #d1d5db;
    padding: 0 12px;
}

.bookings-advertiser-modal-list,
.bookings-client-modal-list {
    padding: 8px 16px 16px;
    overflow: auto;
    min-height: 140px;
    max-height: 50vh;
}

.bookings-advertiser-option,
.bookings-client-option {
    width: 100%;
    border: 1px solid #e5e7eb;
    background: #fff;
    text-align: left;
    padding: 10px 12px;
    margin-top: 8px;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.bookings-advertiser-option:first-child,
.bookings-client-option:first-child {
    margin-top: 0;
}

.bookings-advertiser-option:hover,
.bookings-client-option:hover {
    border-color: #f97316;
}

.bookings-advertiser-option.is-selected,
.bookings-client-option.is-selected {
    border-color: #f97316;
    background: #fff7ed;
}

.bookings-advertiser-option-name,
.bookings-client-option-name {
    display: block;
    color: #111827;
    font-size: 14px;
}

.bookings-advertiser-modal-empty,
.bookings-client-modal-empty {
    margin: 14px 0 0;
    color: #6b7280;
    font-size: 14px;
}

.bookings-advertiser-modal-actions,
.bookings-client-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 14px 16px 16px;
    border-top: 1px solid #e5e7eb;
}

.bookings-structure-open {
    width: 100%;
    justify-content: space-between;
    text-align: left;
}

.bookings-structure-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 0;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    overflow-y: auto;
}

.bookings-structure-modal-overlay {
    display: none;
}

.bookings-structure-modal-content {
    position: relative;
    width: min(560px, 100%);
    margin: auto;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.bookings-structure-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.bookings-structure-modal-header h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
}

.bookings-structure-modal-close {
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #374151;
}

.bookings-structure-modal-tools {
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.bookings-structure-modal-search-input {
    width: 100%;
    height: 40px;
    border: 1px solid #d1d5db;
    padding: 0 12px;
}

.bookings-structure-modal-list {
    padding: 8px 16px 16px;
    min-height: 140px;
}

.bookings-structure-option {
    width: 100%;
    border: 1px solid #e5e7eb;
    background: #fff;
    text-align: left;
    padding: 10px 12px;
    margin-top: 8px;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.bookings-structure-option:first-child {
    margin-top: 0;
}

.bookings-structure-option:hover {
    border-color: #f97316;
}

.bookings-structure-option.is-selected {
    border-color: #f97316;
    background: #fff7ed;
}

.bookings-structure-option-code {
    display: block;
    color: #111827;
    font-size: 14px;
    font-weight: 600;
}

.bookings-structure-option-hash {
    display: block;
    color: #6b7280;
    font-size: 12px;
    margin-top: 4px;
}

.bookings-structure-modal-empty {
    margin: 14px 0 0;
    color: #6b7280;
    font-size: 14px;
}

.bookings-structure-modal-actions {
    display: flex;
    flex-direction: row;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
    padding: 14px 16px 16px;
    border-top: 1px solid #e5e7eb;
}

.bookings-structure-modal-actions .account-primary-btn {
    width: auto;
    min-height: 32px;
    padding: 6px 12px;
    font-size: 12px;
    line-height: 1.2;
    text-transform: none;
}

html.bookings-modal-open,
body.bookings-modal-open {
    overflow: hidden !important;
}

html.bookings-modal-open::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

html.bookings-modal-open body,
html.bookings-modal-open .main,
html.bookings-modal-open .account-content,
html.bookings-modal-open .account-layout {
    overflow: hidden !important;
}

.chat-widget-toggle {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1300;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    background: #f97316;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.chat-widget-toggle:hover {
    background: #ea580c;
}
.chat-widget-toggle.is-active {
    background: #334155;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.35);
}
.chat-widget-toggle.is-active .chat-widget-toggle-icon {
    transform: scale(1.05);
}
.chat-widget-toggle-badge {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    font-weight: 700;
}
.chat-widget-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    line-height: 1;
}
.chat-widget-toggle-icon svg {
    display: block;
    width: 14px;
    height: 14px;
    stroke-width: 3;
}
.chat-widget-panel {
    position: fixed;
    right: 20px;
    bottom: 70px;
    width: 360px;
    max-width: calc(100vw - 24px);
    height: 560px;
    background: #fff;
    z-index: 2010;
    display: none;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}
.chat-widget-panel.is-open {
    display: flex;
}
.chat-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
}

.chat-widget-close {
    border: 0;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.chat-widget-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border);
    background: var(--bg);
    padding: 0 8px;
    margin: 10px 0 0 0;
}
.chat-widget-tab {
    background: none;
    border: none;
    margin-bottom: -2px;
    text-transform: uppercase;
    letter-spacing: 0.08rem;
    font-size: 11px;
    padding: 0.75rem 0.6rem;
    cursor: pointer;
    color: var(--text-light);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.chat-widget-tab--chat {
    max-width: 170px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chat-widget-tab.active {
    color: var(--text);
    border-bottom: 2px solid var(--text);
    font-weight: 600;
}
.chat-widget-tab:hover {
    color: var(--text);
}
.chat-widget-tab-badge {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #ef4444;
    color: transparent;
    font-size: 0;
    line-height: 0;
    flex: 0 0 auto;
}
.chat-widget-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.chat-widget-view {
    display: none;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.chat-widget-view.is-active {
    display: flex;
    flex-direction: column;
}
.chat-widget-thread-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}
.chat-widget-thread-empty {
    padding: 1.25rem 1rem 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
}
.chat-widget-thread-empty-text {
    margin: 0;
    font-size: 13px;
    color: var(--text-light, #64748b);
    line-height: 1.45;
}
.chat-widget-empty-support-btn {
    width: 100%;
    max-width: 260px;
    justify-content: center;
}
.chat-widget-thread-item {
    width: 100%;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    text-align: left;
    border: 0;
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    padding: 8px 10px;
    cursor: pointer;
}
.chat-widget-thread-content {
    min-width: 0;
}
.chat-widget-thread-avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #e5e7eb;
    color: #111827;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    overflow: hidden;
}
.chat-widget-thread-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.chat-widget-thread-item.active {
    background: #f1f5f9;
}
.chat-widget-thread-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
}
.chat-widget-thread-unread {
    display: inline-block;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    line-height: 16px;
    text-align: center;
    font-weight: 700;
}
.chat-widget-thread-last {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chat-widget-messages {
    flex: 1;
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    padding: 10px 10px 28px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 8px;
    background: #fafafa;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}
.chat-widget-thread-list::-webkit-scrollbar,
.chat-widget-messages::-webkit-scrollbar {
    width: 6px;
}
.chat-widget-thread-list::-webkit-scrollbar-track,
.chat-widget-messages::-webkit-scrollbar-track {
    background: transparent;
}
.chat-widget-thread-list::-webkit-scrollbar-thumb,
.chat-widget-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}
.chat-widget-thread-list::-webkit-scrollbar-thumb:hover,
.chat-widget-messages::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
.chat-widget-chat-topbar {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid #e5e7eb;
    padding: 8px 10px;
    background: #fff;
}
.chat-widget-chat-avatar {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #e5e7eb;
    color: #111827;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    overflow: hidden;
}
.chat-widget-chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.chat-widget-back-btn {
    border: 0;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 12px;
}
.chat-widget-chat-title {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    text-decoration: none;
}
.chat-widget-chat-title:hover {
    text-decoration: underline;
}
.chat-widget-chat-title--disabled,
.chat-widget-chat-title--disabled:hover {
    color: #111827;
    text-decoration: none;
    cursor: default;
    pointer-events: none;
}
.chat-widget-fullscreen-btn {
    margin-left: auto;
    margin-right: 0;
    margin-top: 0;
    margin-bottom: 0;
    width: 24px;
    height: 24px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: #6b7280;
    text-decoration: none;
    flex: 0 0 24px;
}

.chat-widget-fullscreen-btn svg {
    width: 14px;
    height: 14px;
}

.chat-widget-fullscreen-btn:hover {
    color: #374151;
    background: #f3f4f6;
}
.chat-widget-typing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 12px;
    background: transparent;
    margin-left: 10px;
    margin-bottom: 4px;
    pointer-events: none;
    position: absolute;
    bottom: 65px;
}
.chat-widget-typing-pencil {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transform-origin: 50% 90%;
    animation: chat-widget-pencil-write 1s ease-in-out infinite;
}
.chat-widget-typing-text {
    white-space: nowrap;
}

@keyframes chat-widget-pencil-write {
    0%, 100% { transform: translateY(0) rotate(-6deg); opacity: 0.8; }
    50% { transform: translateY(-1px) rotate(6deg); opacity: 1; }
}

.chat-widget-message {
    align-self: flex-start;
    max-width: 80%;
    background: #eef2ff;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 13px;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.chat-widget-message.own {
    margin-left: auto;
    background: #dcfce7;
}
.chat-widget-message-meta {
    font-size: 11px;
    color: #64748b;
    margin-top: 3px;
}
.chat-widget-form {
    border-top: 1px solid #e5e7eb;
    padding: 8px;
    display: grid;
    grid-template-columns: 1fr auto auto;
    grid-template-rows: auto auto;
    gap: 8px;
}
.chat-widget-form textarea {
    border: 1px solid #d1d5db;
    padding: 8px;
    resize: none;
    grid-column: 1 / 2;
    grid-row: 1 / 3;
}
.chat-widget-attach-btn {
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #fff;
    color: #334155;
}
.chat-widget-attach-btn:not(.chat-widget-attach-btn--disabled):hover{
    border-color: #444;
}
.chat-widget-file-input {
    display: none;
}
.chat-char-counter {
    grid-column: 2 / 4;
    grid-row: 2 / 3;
    justify-self: end;
    align-self: center;
    font-size: 11px;
    color: #64748b;
    line-height: 1;
    user-select: none;
}
.chat-char-counter--danger {
    color: #b91c1c;
}
.chat-widget-file-card {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    border: 1px dashed #dbeafe;
    background: #fafafa;
    border-radius: 10px;
    padding: 8px;
    text-decoration: none;
    color: #0f172a;
}
button.chat-widget-file-card {
    font: inherit;
    text-align: left;
    width: 100%;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}
.chat-widget-file-card:hover{
    border: 1px dashed #989898;
}
.chat-widget-message.own .chat-widget-file-card {
    background: #ecfdf5;
    border-color: #bbf7d0;
}
.chat-widget-file-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}
.chat-widget-file-icon svg {
    width: 16px;
    height: 16px;
    display: block;
}
.chat-widget-file-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.chat-widget-file-kind {
    font-size: 11px;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.chat-widget-file-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-widget-file-size {
    font-size: 11px;
    color: #64748b;
}

.chat-widget-upload-placeholder {
    min-width: 220px;
}

.chat-widget-upload-title {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
}

.chat-widget-upload-progress {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: #dbeafe;
    overflow: hidden;
}

.chat-widget-upload-progress-bar {
    height: 100%;
    background: #2563eb;
    border-radius: 999px;
    transition: width .15s ease;
}

.chat-widget-upload-percent {
    margin-top: 4px;
    font-size: 11px;
    color: #475569;
    text-align: right;
}

/*
 * document-view-modal — копия public/css/account/structure/documents.css
 * (модалка просмотра документа). Чат: #chat-attachment-modal + вложенные блоки превью.
 */
.document-view-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    overflow-y: auto;
    padding: 2rem 0;
}

.document-view-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.document-view-modal-content {
    position: relative;
    background: #fff;
    width: 90%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 10001;
    margin: auto;
}

.document-view-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.document-view-modal-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 1rem;
}

.document-view-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    flex-shrink: 0;
}

.document-view-modal-close:hover {
    color: #333;
}

.document-view-modal-body {
    flex: 1;
    padding: 0;
    min-height: 400px;
}

.document-view-modal-body > iframe,
.document-view-modal-body > img {
    width: 100%;
    height: 100%;
    min-height: 400px;
    border: none;
    display: block;
}

.document-view-modal-body .pdf-viewer-container {
    width: 100%;
    height: 100%;
    overflow: auto;
    padding: 1rem;
}

.document-view-modal-body .pdf-viewer-controls {
    position: sticky;
    top: 0;
    background: #fff;
    padding: 0.5rem;
    border-bottom: 1px solid #e0e0e0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.document-view-modal-body .pdf-viewer-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.document-view-modal-body #pdf-canvas-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
}

.document-view-modal-body #pdf-canvas-container canvas {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.document-view-modal-body .document-view-error {
    padding: 3rem;
    text-align: center;
    color: #666;
}

.document-view-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e0e0e0;
    flex-shrink: 0;
}

#chat-attachment-modal.document-view-modal {
    z-index: 12000;
    /* Всегда резервируем полосу прокрутки — контент не сдвигается при появлении/исчезновении скролла */
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

#chat-attachment-modal .document-view-modal-content {
    z-index: 12001;
}

#chat-attachment-modal.document-view-modal .document-view-modal-body > iframe {
    height: min(72vh, 720px);
    min-height: 400px;
}

#chat-attachment-modal .document-view-modal-body .chat-attachment-modal__preview--image {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 1rem;
    min-height: 400px;
    box-sizing: border-box;
}

#chat-attachment-modal .document-view-modal-body .chat-attachment-modal__preview--image .chat-attachment-modal__img {
    max-width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#chat-attachment-modal .document-view-modal-body .chat-attachment-modal__preview--audio {
    display: flex;
    justify-content: center;
    align-items: stretch;
    padding: 1rem;
    box-sizing: border-box;
}

#chat-attachment-modal .document-view-modal-body .chat-attachment-modal__player {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    padding: 0.5rem 0.65rem 0.55rem;
}

#chat-attachment-modal .document-view-modal-body .chat-attachment-modal__player-top {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    margin-bottom: 0.4rem;
    color: #334155;
    min-width: 0;
}

#chat-attachment-modal .document-view-modal-body .chat-attachment-modal__player-icon {
    display: inline-flex;
    color: #f97316;
    flex-shrink: 0;
    margin-top: 1px;
}

#chat-attachment-modal .document-view-modal-body .chat-attachment-modal__player-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

#chat-attachment-modal .document-view-modal-body .chat-attachment-modal__player-label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
    line-height: 1.2;
}

#chat-attachment-modal .document-view-modal-body .chat-attachment-modal__player-name {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#chat-attachment-modal .document-view-modal-body .chat-attachment-modal__player-controls {
    width: 100%;
}

#chat-attachment-modal .document-view-modal-body .chat-attachment-modal__audio {
    display: block;
    width: 100%;
}

@media (max-width: 768px) {
    #chat-attachment-modal.document-view-modal .document-view-modal-content {
        width: 95%;
    }

    #chat-attachment-modal.document-view-modal .document-view-modal-body {
        min-height: 300px;
    }
}


