:root {
    --primary: #2c6ef2;
    --primary-hover: #1d5bd5;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ff9800;
    --border: #dcdfe6;
    --bg: #f5f7fa;
    --text: #2c3e50;
    --muted: #6c757d;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    padding: 10px 0 14px;

    margin-bottom: 8px;

    background: transparent;
    border-bottom: none;
}

.topbar h1 {
    font-size: 22px;
    margin: 0;
    color: #1f2937;
    font-weight: 700;
}

.topbar p {
    margin: 6px 0 0;
    color: #6b7280;
    font-size: 14px;
}

.topbar nav {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}

.topbar nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    height: 36px;
    padding: 0 16px;

    border-radius: 8px;

    color: #4b5563;
    text-decoration: none;

    transition: 0.15s;
}

.topbar nav a:hover {
    background: #eef2ff;
}

.topbar nav a.active {
    background: #2563eb;
    color: #ffffff;
    font-weight: 600;
}
.topbar nav a:hover {
    background: #f3f4f6;
}

.topbar nav a.active {
    background: var(--primary);
    color: #fff;
}
.topbar-right { display: flex; align-items: center; gap: 12px; }

.container { max-width: 1400px; margin: 0 auto; padding: 24px; }

button {
    cursor: pointer;
    border: 1px solid var(--border);
    background: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}
button:hover { background: #f0f2f5; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-secondary { background: #fff; }
.btn-link { background: none; border: none; color: var(--primary); padding: 0; }

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-card {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    width: 400px;
}
.login-card h1 { margin: 0 0 8px; text-align: center; }
.login-card .subtitle { text-align: center; color: var(--muted); margin-bottom: 24px; }
.login-card label { display: block; margin-bottom: 16px; }
.login-card input {
    width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 4px;
    font-size: 14px; font-family: inherit;
}
.login-card button { width: 100%; padding: 12px; margin-top: 8px; }

.controls {
    background: #fff; padding: 16px; border-radius: 6px;
    display: flex; flex-wrap: wrap; gap: 24px; margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.control-group { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.control-group label { display: flex; align-items: center; gap: 6px; }
.control-group input, .control-group select {
    padding: 6px 10px; border: 1px solid var(--border); border-radius: 4px;
}

.status-bar { padding: 12px 16px; border-radius: 4px; margin-bottom: 16px; }
.status-info    { background: #e3f2fd; color: #1565c0; }
.status-success { background: #e8f5e9; color: #2e7d32; }
.status-warn    { background: #fff3cd; color: #856404; }
.status-error   { background: #f8d7da; color: #721c24; }

.quarter-section { background: #fff; padding: 16px; border-radius: 6px; margin-bottom: 20px; }
.quarter-section h2 { margin-top: 0; }
.kudir-table { width: 100%; border-collapse: collapse; }
.kudir-table th, .kudir-table td {
    border: 1px solid var(--border); padding: 6px; text-align: left; vertical-align: middle;
}
.kudir-table thead th { background: #f5f7fa; font-weight: 600; text-align: center; }
.col-idx { width: 40px; text-align: center; }
.col-date input, .col-doc input { width: 100%; border: none; padding: 4px; font: inherit; }
.col-op textarea { width: 100%; border: none; padding: 4px; resize: vertical; font: inherit; }
.col-money input { width: 100%; border: none; padding: 4px; text-align: right; font: inherit; }
.col-flags { width: 110px; text-align: center; }
.col-actions { width: 40px; text-align: center; }
.btn-delete {
    border: none; background: transparent; color: var(--danger);
    font-size: 18px; cursor: pointer; padding: 0 6px;
}
.total-row td { background: #f9fafb; padding: 10px 6px; }
.right { text-align: right; }

.err-cell {
    background: #ffebee !important; color: #c62828 !important;
    font-weight: bold; text-align: center;
}

.badge {
    display: inline-block; padding: 2px 6px; margin: 0 2px;
    border-radius: 10px; font-size: 12px; cursor: help;
}
.badge-err     { background: #ffcdd2; color: #b71c1c; }
.badge-edit    { background: #fff9c4; color: #f57f17; }
.badge-del     { background: #e0e0e0; color: #424242; }
.badge-restore { background: #c8e6c9; color: #1b5e20; }
.badge-manual  { background: #bbdefb; color: #0d47a1; }

.card {
    background: #fff; padding: 20px; border-radius: 6px; margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.card h2 { margin-top: 0; }
.card label { display: block; margin-bottom: 12px; font-weight: 500; }
.card input, .card select, .card textarea {
    display: block; width: 100%; padding: 8px; border: 1px solid var(--border);
    border-radius: 4px; font: inherit; margin-top: 4px;
}
.account-row {
    display: flex; justify-content: space-between; padding: 8px;
    border-bottom: 1px solid var(--border);
}

.key-status-ok { color: var(--success); font-weight: 600; }
.key-status-missing { color: var(--muted); }
.test-ok { color: var(--success); margin-top: 8px; }
.test-error { color: var(--danger); margin-top: 8px; }

.modal {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center; z-index: 100;
}
.modal-content {
    background: #fff; padding: 24px; border-radius: 8px;
    width: 450px; max-width: 90%;
}
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

.error-message {
    background: #f8d7da; color: #721c24;
    padding: 10px; border-radius: 4px; margin-top: 12px;
}

@media print {
    .topbar,
    .controls,
    .status-bar,
    .no-print,
    .col-flags,
    .col-actions,
    .btn-delete,
    .badge,
    #btn-uon-help {
        display: none !important;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    .quarter-section {
        box-shadow: none;
        page-break-after: always;
        padding: 0;
    }

    .kudir-table input,
    .kudir-table textarea {
        border: none !important;
        padding: 0 !important;
        background: transparent !important;
        resize: none !important;
        overflow: hidden !important;
        appearance: none !important;
        -webkit-appearance: none !important;
    }

    .err-cell {
        background: transparent !important;
        color: transparent !important;
        text-shadow: none !important;
    }
}

.inn-row {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 420px;
}

.inn-row input {
    width: 320px;
    flex: none;
}

.inn-row button {
    flex: none;
    height: 38px;
    padding: 0 18px;
}


.checkbox-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 8px !important;
    white-space: nowrap;
}

.admin-table th,
.admin-table td {
    vertical-align: top;
    font-size: 14px;
}

.input-error {
    border: 2px solid #e53935 !important;
    background: #fff5f5;
}

.modal[hidden] {
    display: none !important;
}

.admin-sticky-panel {
    position: sticky;
    top: 0;
    z-index: 20;
}

.admin-filters {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 0.7fr auto auto auto auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 16px;
}

.admin-filters label {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-filters .checkbox-row {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
}

.admin-total {
    margin-top: 12px;
    padding: 10px 14px;
    background: #eef3ff;
    border-radius: 6px;
    font-size: 15px;
}

.admin-period {
    min-height: 34px;
    margin-bottom: 4px;
    line-height: 1.35;
}

.admin-period.muted {
    color: #8a94a6;
}

.grant-access {
    min-width: 150px;
}

.grant-access .grant-comment {
    width: 100%;
    box-sizing: border-box;
    margin-top: 8px;
}

.grant-access .quarter-row {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    margin: 4px 0;
    padding: 7px 8px;
    border-radius: 6px;
}

.grant-access .quarter-row span {
    flex: 1;
    text-align: left;
    font-weight: 600;
}

.grant-access .quarter-row input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    max-width: 16px !important;
    flex: 0 0 16px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.grant-access .quarter-paid {
    background: #e2f5e2;
}

.grant-access .quarter-paid span {
    color: #138a36;
}

.grant-access .quarter-manual {
    background: #eef3ff;
}

.grant-access .quarter-manual span {
    color: #315fd6;
}

/*    */
.table-wrap {
    max-height: 600px;
    overflow-y: auto;
}

/*   */
.admin-table thead th {
    position: sticky;
    top: 0;
    background: #eaf3ff; /*  */
    z-index: 20;
    color: #1f3a5f;
    font-weight: 600;
}

/*   */
.admin-table thead th {
    border-bottom: 1px solid #c7d7f2;
}

/*     */
.admin-table {
    border-collapse: separate;
}


/* ===== :      ===== */

body .topbar nav {
    display: inline-flex;
    align-items: center;
    gap: 0;
}

body .topbar nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: auto;
    min-height: 30px;
    padding: 6px 12px;
    margin-right: 16px;
    border-radius: 4px;
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
}

body .topbar nav a.active {
    background: var(--primary);
    color: #fff;
}

body .topbar nav a:hover {
    background: #f3f4f6;
}

body .topbar nav a.active:hover {
    background: var(--primary);
    color: #fff;
}

/* ===== :     ===== */

.admin-sticky-panel .admin-filters {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-end !important;
    gap: 12px !important;
}

.admin-sticky-panel .admin-filters > label {
    flex: 0 0 auto !important;
    width: auto !important;
}

.admin-sticky-panel .admin-filters > label:first-child {
    width: 320px !important;
}

.admin-sticky-panel .admin-filters input[type="text"] {
    width: 320px !important;
}

.admin-sticky-panel .admin-filters input[type="date"] {
    width: 170px !important;
}

.admin-sticky-panel .admin-filters input[type="number"] {
    width: 90px !important;
}

.admin-sticky-panel .admin-filters .checkbox-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px !important;
    padding-bottom: 8px !important;
}

.admin-sticky-panel .admin-filters .checkbox-row input {
    width: auto !important;
}

/* ===== :     ===== */

.admin-sticky-panel .admin-filters input[type="text"],
.admin-sticky-panel .admin-filters input[type="date"],
.admin-sticky-panel .admin-filters input[type="number"] {
    display: inline-block !important;
    width: auto !important;
}

.admin-sticky-panel .admin-filters #search {
    width: 320px !important;
}

.admin-sticky-panel .admin-filters #date-from,
.admin-sticky-panel .admin-filters #date-to {
    width: 170px !important;
}

.admin-sticky-panel .admin-filters #access-year {
    width: 90px !important;
}

.admin-sticky-panel .admin-filters input[type="checkbox"] {
    display: inline-block !important;
    width: auto !important;
    margin-top: 0 !important;
}

/* =====   : , ,    ===== */

.kudir-sticky-toolbar {
    position: sticky;
    top: 58px;
    z-index: 900;

    background: #f4f6f8;
    padding-top: 16px;
    padding-bottom: 10px;
}

/* =====       ===== */

/*  :  /  /  /   /  */
.topbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 2000 !important;

    background: #fff !important;
    border-bottom: 1px solid var(--border) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
}

/*        */
.topbar + .container {
    margin-top: 58px !important;
}

/*  : , , , ,  */
.kudir-sticky-toolbar {
    position: sticky !important;
    top: 58px !important;
    z-index: 1500 !important;

    background: #f4f6f8 !important;
    padding-top: 16px !important;
    padding-bottom: 10px !important;
}

/* ===== -   ===== */

.admin-beta-box {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 10px 0 16px 0;
    padding: 10px 12px;
    background: #fff5f5;
    border: 1px solid #ffcdd2;
    border-left: 5px solid #e53935;
    border-radius: 6px;
}

.admin-beta-box .checkbox-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
    white-space: nowrap;
}

.admin-beta-box input[type="checkbox"] {
    width: auto !important;
    margin: 0 !important;
}

.admin-beta-note {
    color: #8a1f1f;
    font-size: 13px;
}

.grant-access .quarter-beta {
    background: #ffebee;
    border: 1px solid #ffcdd2;
}

.grant-access .quarter-beta span {
    color: #c62828;
    font-weight: 700;
}

.admin-period-beta,
.admin-quarter-beta {
    background: #ffebee;
    color: #c62828;
}

/* =====     ===== */

.status-bar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.status-close {
    border: none;
    background: transparent;
    color: inherit;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    opacity: 0.7;
}

.status-close:hover {
    opacity: 1;
}


/* =====  - ===== */

.status-bar[hidden] {
    display: none !important;
}

.status-bar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.status-close {
    border: none;
    background: transparent;
    color: inherit;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    opacity: 0.7;
}

.status-close:hover {
    opacity: 1;
}

.status-bar[hidden] {
    display: none !important;
}

.status-bar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.status-close {
    border: none;
    background: transparent;
    color: inherit;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    opacity: 0.7;
}

.status-close:hover {
    opacity: 1;
}

.price-history-header {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.price-history-header h2 {
    margin: 0 0 6px;
}

.price-history-header p {
    margin: 0;
    color: var(--muted);
}

.price-history-actions {
    display: flex;
    gap: 8px;
}

.price-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 12px;
}

.price-filter-actions {
    margin-top: 14px;
    display: flex;
    gap: 8px;
}

.price-history-summary {
    display: flex;
    gap: 16px;
    align-items: center;
}

.price-history-table-wrap {
    overflow-x: auto;
}

.price-history-table {
    width: 100%;
    border-collapse: collapse;
}

.price-history-table th,
.price-history-table td {
    border: 1px solid var(--border);
    padding: 8px;
    vertical-align: top;
}

.price-history-table th {
    background: #f5f7fa;
    text-align: center;
}

.hotel-cell {
    font-weight: 600;
}

.price-cell {
    text-align: right;
    white-space: nowrap;
    font-weight: 600;
}

.price-history-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--muted);
}

.price-import-modal label {
    display: block;
    margin-bottom: 12px;
}

.price-import-modal input {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-top: 4px;
}

.price-page {
    max-width: 1500px;
}

.price-search-layout {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    margin: 18px 0;
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 28px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.price-form-row {
    display: grid;
    grid-template-columns: 190px 320px 1fr;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
}

.price-form-row label {
    font-weight: 600;
}

.price-form-row input,
.price-form-row select {
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: #fff;
}

.price-form-row .hint {
    color: var(--muted);
    font-size: 13px;
}

.price-form-row input:nth-child(3) {
    width: 140px;
}

.price-search-buttons {
    margin-top: 20px;
    display: flex;
    gap: 14px;
    padding-left: 190px;
}

.green-btn {
    background: #138a43;
    color: #fff;
    border: 0;
    border-radius: 4px;
    padding: 10px 46px;
    font-weight: 700;
    cursor: pointer;
}

.light-btn {
    background: #fff;
    color: #111827;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 10px 34px;
    font-weight: 600;
    cursor: pointer;
}

.stats-box {
    border: 1px solid #f0c36d;
    background: #fff8e5;
}

.stats-title,
.stats-row {
    display: grid;
    grid-template-columns: 1fr 120px;
    padding: 10px 16px;
    border-bottom: 1px solid #eadfbf;
}

.stats-title {
    font-weight: 700;
    font-size: 16px;
}

.stats-title strong {
    color: #1d4ed8;
    font-size: 18px;
}

.stats-row:last-child {
    border-bottom: 0;
}

.last-update-box {
    margin-top: 28px;
    border: 1px solid #93c5fd;
    background: #eff6ff;
    padding: 12px 16px;
    display: grid;
    grid-template-columns: 1fr 160px;
}

.results-section {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
}

.results-title {
    background: #dbeafe;
    color: #1e3a8a;
    text-align: center;
    font-weight: 800;
    padding: 8px;
    border-bottom: 1px solid #93c5fd;
}

.price-history-table-wrap {
    overflow-x: auto;
}

.excel-style-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.excel-style-table th {
    background: #eaf2fb;
    border: 1px solid #cbd5e1;
    padding: 8px;
    text-align: center;
    white-space: nowrap;
}

.excel-style-table td {
    border: 1px solid #d8dee8;
    padding: 8px;
    vertical-align: middle;
}

.hotel-cell {
    font-weight: 700;
    min-width: 220px;
}

.price-cell {
    text-align: right;
    white-space: nowrap;
    font-weight: 700;
}

.price-history-empty {
    text-align: center;
    color: var(--muted);
    padding: 18px;
}

@media (max-width: 1100px) {
    .price-search-layout {
        grid-template-columns: 1fr;
    }

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

    .price-search-buttons {
        padding-left: 0;
    }
}

.price-page {
    max-width: 1520px;
    margin: 0 auto;
    padding: 0 18px 30px;
}

.price-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 14px;
}

.price-toolbar > div {
    background: #ffffff;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    min-width: 190px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.price-toolbar strong {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
}

.price-toolbar span {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

#importBtn {
    height: auto;
    padding: 0 22px;
    border-radius: 8px;
    font-weight: 700;
}

.price-search-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    margin: 0 0 18px;
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 28px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.price-form-row {
    display: grid;
    grid-template-columns: 190px 320px 1fr;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
}

.price-form-row label {
    font-weight: 600;
}

.price-form-row input {
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: #fff;
    width: 100%;
}

.price-form-row .hint {
    color: var(--muted);
    font-size: 13px;
}

.two-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.autocomplete-wrap {
    position: relative;
}

.suggest-box {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 20;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
    overflow: hidden;
}

.suggest-box button {
    width: 100%;
    border: 0;
    background: #ffffff;
    padding: 9px 12px;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
}

.suggest-box button:hover {
    background: #eff6ff;
}

.price-search-buttons {
    margin-top: 20px;
    display: flex;
    gap: 14px;
    padding-left: 190px;
}

.green-btn {
    background: #138a43;
    color: #fff;
    border: 0;
    border-radius: 4px;
    padding: 10px 46px;
    font-weight: 700;
    cursor: pointer;
}

.light-btn {
    background: #fff;
    color: #111827;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 10px 34px;
    font-weight: 600;
    cursor: pointer;
}

.eye-btn {
    width: 42px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #ffffff;
    cursor: pointer;
    font-size: 18px;
}

.eye-btn.eye-active {
    background: #dbeafe;
    border-color: #2563eb;
}

.stats-box {
    border: 1px solid #f0c36d;
    background: #fff8e5;
}

.stats-title,
.stats-row {
    display: grid;
    grid-template-columns: 1fr 120px;
    padding: 10px 16px;
    border-bottom: 1px solid #eadfbf;
}

.stats-title {
    font-weight: 700;
    font-size: 16px;
}

.stats-title strong {
    color: #1d4ed8;
    font-size: 18px;
}

.stats-row:last-child {
    border-bottom: 0;
}

.charts-section {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 18px;
}

.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    padding: 18px;
}

.chart-card {
    position: relative;
    border: 1px solid #d8dee8;
    border-radius: 8px;
    padding: 16px;
    background: #ffffff;
    min-height: 190px;
}

.chart-card.wide-chart {
    grid-column: 1 / -1;
}

.chart-card h3 {
    margin: 0 0 14px;
    font-size: 16px;
}

.chart-placeholder {
    min-height: 130px;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 6px;
    padding: 12px;
    font-weight: 700;
}

.pro-badge {
    position: absolute;
    right: 14px;
    top: 14px;
    background: #111827;
    color: #fff;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 800;
}

.pro-locked {
    opacity: 0.82;
}

.results-section {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
}

.results-title {
    background: #dbeafe;
    color: #1e3a8a;
    text-align: center;
    font-weight: 800;
    padding: 8px;
    border-bottom: 1px solid #93c5fd;
}

.price-history-table-wrap {
    overflow-x: auto;
}

.excel-style-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.excel-style-table th {
    background: #eaf2fb;
    border: 1px solid #cbd5e1;
    padding: 8px;
    text-align: center;
    white-space: nowrap;
}

.excel-style-table td {
    border: 1px solid #d8dee8;
    padding: 8px;
    vertical-align: middle;
}

.hotel-cell {
    font-weight: 700;
    min-width: 220px;
}

.price-cell {
    text-align: right;
    white-space: nowrap;
    font-weight: 800;
    color: #0f172a;
}

.disabled-link {
    color: #9ca3af;
    cursor: not-allowed;
}

.price-history-empty {
    text-align: center;
    color: var(--muted);
    padding: 18px;
}

@media (max-width: 1100px) {
    .price-toolbar,
    .price-search-card,
    .charts-grid {
        grid-template-columns: 1fr;
    }

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

    .price-search-buttons {
        padding-left: 0;
    }
}

.price-page-v2 {
    max-width: 1560px;
    margin: 0 auto;
    padding: 18px 22px 34px;
}

.price-head-v2 {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
}

.price-head-v2 h1 {
    margin: 0;
    font-size: 26px;
    color: #111827;
    font-weight: 800;
}

.price-head-v2 p {
    margin: 5px 0 0;
    color: #6b7280;
    font-size: 14px;
}

.price-head-stats {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.head-stat-card {
    min-width: 160px;
    background: #fff;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    padding: 9px 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.head-stat-card span {
    font-size: 12px;
    color: #6b7280;
}

.head-stat-card strong {
    margin-top: 3px;
    font-size: 14px;
    color: #111827;
}

.refresh-btn {
    background: #fff;
    border: 1px solid #2563eb;
    color: #2563eb;
    border-radius: 8px;
    padding: 0 18px;
    font-weight: 700;
    cursor: pointer;
}

.filter-panel-v2 {
    background: #fff;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.filter-grid-v2 {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px 14px;
}

.filter-grid-v2 label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 700;
    font-size: 13px;
    color: #111827;
}

.filter-grid-v2 > label,
.filter-actions-v2,
.autocomplete-wrap {
    min-width: 0;
}

.filter-grid-v2 input {
    width: 100%;
    box-sizing: border-box;
    height: 36px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0 10px;
    background: #fff;
    font-size: 14px;
}

.filter-grid-v2 .filter-popup-trigger {
    width: 100%;
    box-sizing: border-box;
}

.filter-actions-v2 {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.build-chart-btn {
    background: #2563eb;
    color: #fff;
    border: 0;
    border-radius: 6px;
    height: 38px;
    padding: 0 22px;
    font-weight: 700;
    cursor: pointer;
}

.reset-filter-btn {
    background: #fff;
    color: #111827;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    height: 38px;
    padding: 0 22px;
    cursor: pointer;
}

.admin-eye-btn {
    margin-left: auto;
    width: 42px;
    height: 38px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 17px;
}

.admin-eye-btn.eye-active {
    background: #dbeafe;
    border-color: #2563eb;
}

.autocomplete-wrap {
    position: relative;
}

.suggest-box {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 50;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
    overflow: hidden;
}

.suggest-box button {
    width: 100%;
    border: 0;
    background: #ffffff;
    padding: 9px 12px;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
}

.suggest-box button:hover {
    background: #eff6ff;
}

.summary-row-v2 {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.summary-row-v2 div {
    background: #fff8e5;
    border: 1px solid #f0c36d;
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.summary-row-v2 span {
    color: #374151;
    font-size: 13px;
}

.summary-row-v2 strong {
    color: #111827;
    font-size: 14px;
}

.analytics-panel-v2 {
    background: #fff;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

.analytics-head-v2 {
    padding: 12px 16px;
    border-bottom: 1px solid #dbe3ef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.analytics-head-v2 h2 {
    margin: 0;
    font-size: 18px;
}

.analytics-head-v2 h2 span {
    display: inline-flex;
    margin-left: 6px;
    background: #fbbf24;
    color: #111827;
    border-radius: 5px;
    padding: 3px 7px;
    font-size: 12px;
}

.pro-hint-v2 {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #374151;
    font-size: 13px;
}

.pro-hint-v2 button {
    background: #fbbf24;
    border: 0;
    border-radius: 6px;
    padding: 8px 14px;
    font-weight: 700;
    cursor: pointer;
}

.charts-grid-v2 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    padding: 12px;
}

.chart-card-v2 {
    position: relative;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    padding: 12px;
    background: #fff;
    min-height: 210px;
    cursor: pointer;
}

.chart-card-v2 h3 {
    margin: 0 30px 10px 0;
    font-size: 13px;
    color: #111827;
}

.chart-box-v2 {
    min-height: 150px;
    background: #f8fafc;
    border-radius: 7px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    gap: 8px;
    font-size: 14px;
}

.lock-badge {
    width: 42px;
    height: 42px;
    background: #6b7280;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-expand-btn {
    position: absolute;
    right: 10px;
    top: 10px;
    border: 1px solid #cbd5e1;
    background: #fff;
    border-radius: 5px;
    cursor: pointer;
    width: 26px;
    height: 24px;
    z-index: 2;
}

.analytics-note-v2 {
    border-top: 1px solid #dbe3ef;
    background: #f8fafc;
    padding: 10px 14px;
    color: #374151;
    font-size: 13px;
}

.table-panel-v2 {
    background: #fff;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    overflow: hidden;
}

.table-wrap-v2 {
    overflow-x: auto;
}

.price-table-v2 {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.price-table-v2 th {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 9px 8px;
    text-align: center;
    font-weight: 800;
    white-space: nowrap;
}

.price-table-v2 td {
    border: 1px solid #e2e8f0;
    padding: 9px 8px;
    vertical-align: middle;
}

.check-col {
    width: 34px;
    text-align: center;
}

.hotel-cell {
    min-width: 170px;
    font-weight: 700;
}

.price-cell {
    text-align: right;
    white-space: nowrap;
    font-weight: 900;
    font-size: 16px;
    color: #111827;
}

.disabled-link {
    color: #9ca3af;
    cursor: not-allowed;
}

.price-history-empty {
    text-align: center;
    color: #6b7280;
    padding: 18px;
}

.pagination-v2 {
    border-top: 1px solid #e2e8f0;
    padding: 12px 14px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
}

.pages-v2 {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.pages-v2 button {
    min-width: 32px;
    height: 32px;
    border: 1px solid #cbd5e1;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
}

.pages-v2 button.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.pagination-v2 label {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-v2 select {
    height: 34px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
}

.chart-modal-v2 {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.chart-modal-card-v2 {
    width: min(1100px, 96vw);
    height: min(720px, 90vh);
    background: #fff;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 70px rgba(0,0,0,0.25);
}

.chart-modal-head-v2 {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chart-modal-head-v2 h2 {
    margin: 0;
    font-size: 20px;
}

.chart-modal-head-v2 button {
    border: 0;
    background: transparent;
    font-size: 30px;
    cursor: pointer;
}

.chart-modal-body-v2 {
    flex: 1;
    padding: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-modal-body-v2 .lock-badge {
    width: 70px;
    height: 70px;
    font-size: 28px;
}

.chart-modal-body-v2 strong {
    font-size: 20px;
}

@media (max-width: 1250px) {
    .filter-grid-v2 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .charts-grid-v2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .summary-row-v2 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 800px) {
    .price-head-v2,
    .price-head-stats {
        flex-direction: column;
    }

    .filter-grid-v2,
    .charts-grid-v2,
    .summary-row-v2 {
        grid-template-columns: 1fr;
    }

    .pagination-v2 {
        grid-template-columns: 1fr;
    }

    .pagination-v2 label {
        justify-self: start;
    }
}

.price-top-menu {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.price-top-menu a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    height: 36px;
    padding: 0 16px;

    border-radius: 8px;

    background: #ffffff;

    border: 1px solid #dbe3ef;

    color: #374151;

    text-decoration: none;

    font-size: 14px;
    font-weight: 600;

    transition: 0.15s;
}

.price-top-menu a:hover {
    background: #eff6ff;
    border-color: #2563eb;
    color: #2563eb;
}

.price-top-menu a.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.price-head-v2 {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: start;
}

.price-top-menu {
    display: flex !important;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    position: relative;
    z-index: 5;
}

.table-toolbar {
    display: flex;
    justify-content: flex-end;
    padding: 10px 12px 0;
}

.icon-eye-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 16px;
}

.icon-eye-btn:hover,
.icon-eye-btn.eye-active {
    background: #eff6ff;
    border-color: #2563eb;
}

#companyHeader {
    width: 170px;
    min-width: 170px;
    white-space: normal;
    word-break: break-word;
}

.filter-inline-actions {
    display: flex;
    align-items: end;
    gap: 12px;
    padding-top: 28px;
}

.admin-eye-btn {
    width: 42px;
    height: 42px;

    border: 1px solid #dbe3ef;
    border-radius: 10px;

    background: #fff;

    cursor: pointer;

    font-size: 18px;

    transition: 0.15s;
}

.admin-eye-btn:hover,
.admin-eye-btn.eye-active {
    background: #eff6ff;
    border-color: #2563eb;
}

.reset-filter-btn {
    min-width: 80px;
    height: 40px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 20px;

    border: 1px solid #dbe3ef;
    border-radius: 10px;

    background: #f8fafc;

    font-weight: 700;
    font-size: 15px;

    color: #334155;

    cursor: pointer;

    transition: 0.15s;
}

.reset-filter-btn:hover {
    background: #eef2ff;
    border-color: #2563eb;
    color: #2563eb;
}

/* ===== Price history access controls 2026-05-15 ===== */
.admin-price-history-box {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) repeat(2, minmax(220px, auto)) auto;
    gap: 12px;
    align-items: end;
}

.admin-price-history-box h3 {
    grid-column: 1 / -1;
    margin: 0 0 4px;
}

.grant-price-history-access {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 290px;
}

.price-history-feature-row {
    display: grid;
    grid-template-columns: 78px 1fr;
    gap: 8px;
    align-items: center;
}

.price-history-feature-row strong {
    font-size: 12px;
}

.price-history-feature-quarters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.grant-price-history-comment {
    width: 100%;
    min-width: 240px;
}

.mini-chart-bars {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 6px;
}

.mini-bar-row {
    display: grid;
    grid-template-columns: minmax(70px, 140px) 1fr minmax(80px, auto);
    gap: 8px;
    align-items: center;
    font-size: 12px;
}

.mini-bar-row span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-bar-row i {
    display: block;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, #dbeafe, #2563eb);
}

.mini-bar-row b {
    text-align: right;
    white-space: nowrap;
}

.chart-empty {
    padding: 16px;
    color: #64748b;
    text-align: center;
}

@media (max-width: 1100px) {
    .admin-price-history-box {
        grid-template-columns: 1fr;
    }
}


/* ===== Admin access table scroll + price history highlights 2026-05-15 ===== */
.admin-sticky-panel {
    position: static !important;
}

.table-wrap {
    width: 100%;
    max-height: 72vh;
    overflow: auto !important;
    border: 1px solid #d6e0ef;
    border-radius: 8px;
    background: #fff;
}

.admin-table {
    min-width: 1500px;
}

.admin-table thead th {
    position: sticky;
    top: 0;
    z-index: 5;
}

.admin-table th:last-child,
.admin-table td:last-child {
    min-width: 330px;
}

.grant-price-history-access {
    min-width: 310px;
}

.price-history-feature-row {
    background: #f8fafc;
    border-radius: 8px;
    padding: 6px;
}

.price-history-feature-row strong {
    color: #0f2742;
}

.grant-price-history-access .quarter-row {
    min-width: 58px;
    justify-content: center;
    gap: 4px;
    border: 1px solid transparent;
}

.grant-price-history-access .quarter-row span {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.grant-price-history-access .quarter-paid {
    background: #dcfce7 !important;
    border-color: #86efac !important;
}

.grant-price-history-access .quarter-paid span {
    color: #166534 !important;
}

.grant-price-history-access .quarter-manual {
    background: #e0ecff !important;
    border-color: #93c5fd !important;
}

.grant-price-history-access .quarter-manual span {
    color: #1d4ed8 !important;
}

.grant-price-history-access .quarter-beta {
    background: #fef3c7 !important;
    border-color: #facc15 !important;
}

.grant-price-history-access .quarter-beta span {
    color: #92400e !important;
}

.grant-price-history-access input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.85;
}

.admin-access-legend {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
    font-size: 12px;
}

.admin-access-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.admin-access-legend i {
    width: 16px;
    height: 12px;
    border-radius: 4px;
    display: inline-block;
}

.admin-access-legend .legend-manual { background: #e0ecff; border: 1px solid #93c5fd; }
.admin-access-legend .legend-paid { background: #dcfce7; border: 1px solid #86efac; }
.admin-access-legend .legend-beta { background: #fef3c7; border: 1px solid #facc15; }


/* ===== Compact price history access matrix 2026-05-15 ===== */
.admin-table th:last-child,
.admin-table td:last-child {
    min-width: 360px !important;
    max-width: 420px;
}

.price-history-compact-access {
    min-width: 340px !important;
    max-width: 390px;
    display: grid !important;
    gap: 4px !important;
}

.price-history-compact-head,
.price-history-compact-row {
    display: grid;
    grid-template-columns: 78px 1fr;
    align-items: center;
    column-gap: 8px;
}

.price-history-compact-head {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    padding: 0 4px;
}

.price-history-compact-head > div,
.price-history-compact-quarters {
    display: grid;
    grid-template-columns: repeat(4, minmax(52px, 1fr));
    gap: 4px;
    align-items: center;
}

.price-history-compact-row {
    background: #f8fafc;
    border-radius: 6px;
    padding: 4px;
}

.price-history-compact-row strong {
    font-size: 12px;
    color: #0f2742;
    white-space: nowrap;
}

.price-history-quarter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 26px;
    padding: 2px 4px;
    border: 1px solid #dbe7f5;
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
}

.price-history-quarter span {
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.price-history-quarter input {
    width: 15px !important;
    height: 15px !important;
    min-width: 13px !important;
    margin: 0 !important;
}

.price-history-compact-access .grant-price-history-comment {
    height: 30px;
    margin-top: 4px;
    width: 100%;
}

.price-history-compact-access .quarter-paid {
    background: #dcfce7 !important;
    border-color: #86efac !important;
}

.price-history-compact-access .quarter-paid span {
    color: #166534 !important;
}

.price-history-compact-access .quarter-manual {
    background: #e0ecff !important;
    border-color: #93c5fd !important;
}

.price-history-compact-access .quarter-manual span {
    color: #1d4ed8 !important;
}

.price-history-compact-access .quarter-beta {
    background: #fef3c7 !important;
    border-color: #facc15 !important;
}

.price-history-compact-access .quarter-beta span {
    color: #92400e !important;
}

.price-history-compact-access input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.85;
}


/* ===== Price history tariff stack compact layout 2026-05-15 ===== */
.admin-table th:last-child,
.admin-table td:last-child {
    min-width: 430px !important;
    max-width: 520px !important;
}

.price-history-tariff-stack {
    width: 410px !important;
    min-width: 410px !important;
    max-width: 410px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    overflow: visible !important;
}

.price-history-tariff-block {
    display: block !important;
    padding: 4px 6px !important;
    border-radius: 7px !important;
    background: #f8fafc !important;
    border: 1px solid #edf2f7 !important;
}

.price-history-tariff-title {
    font-size: 12px !important;
    font-weight: 800 !important;
    color: #0f2742 !important;
    line-height: 1.1 !important;
    margin: 0 0 4px 0 !important;
    white-space: nowrap !important;
}

.price-history-tariff-quarters {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 5px !important;
    overflow: visible !important;
}

.price-history-tariff-quarter {
    display: inline-flex !important;
    flex: 0 0 92px !important;
    height: 25px !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    padding: 2px 5px !important;
    margin: 0 !important;
    border-radius: 5px !important;
    border: 1px solid #dbe7f5 !important;
    background: #fff !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    white-space: nowrap !important;
}

.price-history-tariff-quarter span {
    font-size: 11px !important;
    line-height: 1 !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
}

.price-history-tariff-quarter input[type="checkbox"] {
    width: 13px !important;
    height: 13px !important;
    min-width: 13px !important;
    max-width: 13px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.price-history-tariff-stack .grant-price-history-comment {
    height: 28px !important;
    min-height: 28px !important;
    width: 100% !important;
    margin-top: 2px !important;
    padding: 4px 8px !important;
    box-sizing: border-box !important;
}

.price-history-tariff-stack .quarter-paid {
    background: #dcfce7 !important;
    border-color: #86efac !important;
}

.price-history-tariff-stack .quarter-paid span {
    color: #166534 !important;
}

.price-history-tariff-stack .quarter-manual {
    background: #e0ecff !important;
    border-color: #93c5fd !important;
}

.price-history-tariff-stack .quarter-manual span {
    color: #1d4ed8 !important;
}

.price-history-tariff-stack .quarter-beta {
    background: #fef3c7 !important;
    border-color: #facc15 !important;
}

.price-history-tariff-stack .quarter-beta span {
    color: #92400e !important;
}

.price-history-tariff-stack input[type="checkbox"]:disabled {
    cursor: not-allowed !important;
    opacity: 0.85 !important;
}

/* Старые сеточные стили не должны ломать новый компактный блок */
.price-history-compact-access,
.price-history-feature-row,
.price-history-compact-row,
.price-history-compact-head {
    max-height: none !important;
    overflow: visible !important;
}

.table-wrap {
    overflow: auto !important;
}


/* ===== Price history matrix without vertical scroll 2026-05-15 ===== */
.admin-table th:last-child,
.admin-table td:last-child {
    min-width: 250px !important;
    max-width: 280px !important;
    width: 260px !important;
}

.price-history-matrix {
    width: 238px !important;
    min-width: 238px !important;
    max-width: 238px !important;
    display: grid !important;
    grid-template-columns: 46px 54px 54px !important;
    grid-auto-rows: 22px !important;
    column-gap: 5px !important;
    row-gap: 3px !important;
    align-items: center !important;
    overflow: visible !important;
    max-height: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.price-history-matrix-head {
    height: 18px !important;
    line-height: 18px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    color: #0f2742 !important;
    text-align: center !important;
    white-space: nowrap !important;
}

.price-history-matrix-quarter {
    height: 22px !important;
    line-height: 22px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #334155 !important;
    text-align: left !important;
    white-space: nowrap !important;
}

.price-history-matrix-cell {
    height: 22px !important;
    min-height: 22px !important;
    max-height: 22px !important;
    width: 54px !important;
    min-width: 54px !important;
    max-width: 54px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid #dbe7f5 !important;
    border-radius: 5px !important;
    background: #fff !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer !important;
    overflow: hidden !important;
}

.price-history-matrix-cell input[type="checkbox"] {
    width: 13px !important;
    height: 13px !important;
    min-width: 13px !important;
    max-width: 13px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.price-history-matrix .grant-price-history-comment {
    grid-column: 1 / -1 !important;
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 1px 0 0 0 !important;
    padding: 3px 7px !important;
    font-size: 12px !important;
}

.price-history-matrix .quarter-paid {
    background: #dcfce7 !important;
    border-color: #86efac !important;
}

.price-history-matrix .quarter-manual {
    background: #e0ecff !important;
    border-color: #93c5fd !important;
}

.price-history-matrix .quarter-beta {
    background: #fef3c7 !important;
    border-color: #facc15 !important;
}

.price-history-matrix input[type="checkbox"]:disabled {
    cursor: not-allowed !important;
    opacity: 0.85 !important;
}

.grant-price-history-access,
.price-history-compact-access,
.price-history-tariff-stack,
.price-history-feature-row,
.price-history-compact-row,
.price-history-tariff-block,
.price-history-compact-head {
    overflow: visible !important;
    max-height: none !important;
}

/* чтобы таблица скроллилась только как таблица, а не внутри ячейки истории цен */
.admin-table td {
    overflow: visible !important;
}


/* ===== Admin table simplified columns 2026-05-15 ===== */
.admin-table th:nth-child(9),
.admin-table td:nth-child(9) {
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
}

.admin-table th:nth-child(10),
.admin-table td:nth-child(10) {
    width: 135px !important;
    min-width: 135px !important;
    max-width: 135px !important;
}

.admin-table th:nth-child(11),
.admin-table td:nth-child(11) {
    width: 265px !important;
    min-width: 265px !important;
    max-width: 265px !important;
}

.grant-access {
    min-width: 125px !important;
    max-width: 125px !important;
}

.grant-access .quarter-row {
    min-height: 23px !important;
    height: 23px !important;
    padding: 3px 7px !important;
    margin: 3px 0 !important;
}

.grant-access .grant-comment {
    height: 27px !important;
    min-height: 27px !important;
    padding: 4px 8px !important;
}

.table-wrap {
    max-height: none !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
}

.admin-table td:last-child {
    overflow: visible !important;
}

.price-history-matrix {
    width: 238px !important;
    min-width: 238px !important;
    max-width: 238px !important;
    grid-template-columns: 46px 54px 54px !important;
    grid-auto-rows: 22px !important;
    row-gap: 3px !important;
    overflow: visible !important;
    max-height: none !important;
}


/* ===== Admin table no horizontal scroll + compact access 2026-05-15 ===== */
.table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
}

.admin-table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
}

.admin-table th,
.admin-table td {
    padding: 6px 7px !important;
    box-sizing: border-box !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
}

.admin-table th:nth-child(1), .admin-table td:nth-child(1) { width: 32px !important; }
.admin-table th:nth-child(2), .admin-table td:nth-child(2) { width: 88px !important; }
.admin-table th:nth-child(3), .admin-table td:nth-child(3) { width: 145px !important; }
.admin-table th:nth-child(4), .admin-table td:nth-child(4) { width: 145px !important; }
.admin-table th:nth-child(5), .admin-table td:nth-child(5) { width: 88px !important; }
.admin-table th:nth-child(6), .admin-table td:nth-child(6) { width: 36px !important; text-align: center !important; }
.admin-table th:nth-child(7), .admin-table td:nth-child(7) { width: 62px !important; }
.admin-table th:nth-child(8), .admin-table td:nth-child(8) { width: 112px !important; }
.admin-table th:nth-child(9), .admin-table td:nth-child(9) { width: 94px !important; }
.admin-table th:nth-child(10), .admin-table td:nth-child(10) { width: 108px !important; }
.admin-table th:nth-child(11), .admin-table td:nth-child(11) { width: 230px !important; }

.grant-access {
    min-width: 96px !important;
    max-width: 98px !important;
}

.grant-access .quarter-row {
    height: 22px !important;
    min-height: 22px !important;
    margin: 2px 0 !important;
    padding: 2px 5px !important;
}

.grant-access .grant-comment {
    height: 25px !important;
    min-height: 25px !important;
    padding: 3px 6px !important;
}

.price-history-matrix {
    width: 214px !important;
    min-width: 214px !important;
    max-width: 214px !important;
    grid-template-columns: 42px 50px 50px 50px !important;
    grid-auto-rows: 21px !important;
    column-gap: 4px !important;
    row-gap: 2px !important;
    overflow: visible !important;
    max-height: none !important;
}

.price-history-matrix-head {
    font-size: 10px !important;
    height: 16px !important;
    line-height: 16px !important;
}

.price-history-matrix-quarter {
    font-size: 10px !important;
    height: 21px !important;
    line-height: 21px !important;
}

.price-history-matrix-cell {
    width: 50px !important;
    min-width: 50px !important;
    max-width: 50px !important;
    height: 21px !important;
    min-height: 21px !important;
    max-height: 21px !important;
}

.price-history-matrix .grant-price-history-comment {
    height: 23px !important;
    min-height: 23px !important;
    padding: 3px 6px !important;
    font-size: 11px !important;
}

.admin-table td,
.admin-table td:last-child {
    overflow: visible !important;
}

/* ===== Qui-Quo import modal reconnect 2026-05-15 ===== */
.price-import-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.45);
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.price-import-card {
    width: min(560px, 96vw);
    max-height: 92vh;
    overflow: auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
    padding: 18px;
}
.price-import-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.price-import-head h2 { margin: 0; font-size: 20px; }
.price-import-head button {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #fff;
    font-size: 22px;
    cursor: pointer;
}
.price-import-card label {
    display: block;
    margin-top: 12px;
    font-weight: 700;
}
.price-import-card input {
    width: 100%;
    box-sizing: border-box;
    margin-top: 6px;
    padding: 9px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
}
.price-warning-box,
.import-validation-message {
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    background: #fffbeb;
    color: #92400e;
}
.import-period-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.import-progress-box {
    margin-top: 12px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
}
.import-progress-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-weight: 700;
}
.import-progress-track {
    height: 10px;
    border-radius: 999px;
    background: #dbeafe;
    overflow: hidden;
    margin-top: 8px;
}
.import-progress-fill {
    height: 100%;
    background: #2563eb;
}
.import-progress-details {
    margin-top: 8px;
    color: #475569;
}
.price-import-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

/* ===== Full period logic modal 2026-05-15 ===== */
#missingPeriodModal .price-warning-box {
    line-height: 1.45;
}

/* Аналитика цен: карточка контроля дат */
.coverage-card strong {
    line-height: 1.25;
    max-width: 230px;
}
.coverage-card.coverage-ok {
    border-color: #86efac;
    background: #f0fdf4;
}
.coverage-card.coverage-ok strong {
    color: #15803d;
}
.coverage-card.coverage-warning {
    border-color: #f59e0b;
    background: #fffbeb;
}
.coverage-card.coverage-warning strong {
    color: #b45309;
}
.coverage-card.coverage-empty {
    border-color: #dbe3ef;
    background: #fff;
}

/* Стабильный прогресс импорта Qui-Quo */
#importProgressBox:not([hidden]) {
    display: block !important;
}
.import-progress-track {
    position: relative;
    overflow: hidden;
}
.import-progress-fill {
    display: block !important;
    min-height: 100%;
    transition: width 0.2s ease;
}

/* Аналитика цен: постоянный прогресс загрузки Qui-Quo на странице */
.page-import-progress {
    margin: 12px 0 14px 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
.page-import-progress[hidden] {
    display: none !important;
}
.import-progress-box[hidden] {
    display: none !important;
}
.import-validation-success {
    border-color: #86efac !important;
    background: #f0fdf4 !important;
    color: #15803d !important;
}
.status-bar-success {
    border-color: #86efac !important;
    background: #f0fdf4 !important;
    color: #15803d !important;
}

/* Unified top menu buttons and support dropdown */
.topbar nav,
.price-top-menu {
    align-items: center;
}

.topbar nav a,
.price-top-menu a,
.support-menu > summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 16px;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #ffffff;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    list-style: none;
    transition: background-color .15s, border-color .15s, color .15s;
}

.support-menu > summary::-webkit-details-marker {
    display: none;
}

.topbar nav a:hover,
.price-top-menu a:hover,
.support-menu > summary:hover {
    background: #eff6ff;
    border-color: #2563eb;
    color: #2563eb;
}

.topbar nav a.active,
.price-top-menu a.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.support-menu {
    position: relative;
    display: inline-flex;
    margin: 0;
    padding: 0;
}

.support-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 1000;
    min-width: 230px;
    padding: 10px;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .16);
}

.support-dropdown a {
    display: flex !important;
    align-items: center;
    justify-content: flex-start !important;
    gap: 8px;
    width: 100%;
    min-height: 34px;
    padding: 8px 10px !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    color: #334155 !important;
    font-weight: 600 !important;
    white-space: nowrap;
}

.support-dropdown a:hover {
    background: #eff6ff !important;
    color: #2563eb !important;
}

.support-max-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 20px;
    border-radius: 6px;
    background: #2563eb;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .3px;
}


/* ===== Unified bordered top menus and feedback dropdown 2026-05-21-v2 ===== */
.app-topbar.topbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 18px !important;
    padding: 12px 40px !important;
    margin: 0 0 18px 0 !important;
    background: #ffffff !important;
    border-bottom: 1px solid #dbe3ef !important;
}

.app-topbar .topbar-left {
    display: flex !important;
    align-items: center !important;
    gap: 24px !important;
    min-width: 0 !important;
}

.app-topbar h1 {
    margin: 0 !important;
    transform: none !important;
    font-size: 22px !important;
    color: #1f2937 !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

.app-topbar .topbar-right {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-left: auto !important;
    padding-right: 0 !important;
    white-space: nowrap !important;
}

.main-top-menu,
.price-top-menu {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin: 0 !important;
    position: relative !important;
    z-index: 20 !important;
}

.main-top-menu a,
.price-top-menu a,
.main-top-menu .support-menu > summary,
.price-top-menu .support-menu > summary {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 16px !important;
    border: 1px solid #dbe3ef !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    color: #374151 !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    cursor: pointer !important;
    list-style: none !important;
    transition: background-color .15s, border-color .15s, color .15s !important;
}

.main-top-menu a:hover,
.price-top-menu a:hover,
.main-top-menu .support-menu > summary:hover,
.price-top-menu .support-menu > summary:hover {
    background: #eff6ff !important;
    border-color: #2563eb !important;
    color: #2563eb !important;
}

.main-top-menu a.active,
.price-top-menu a.active {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
}

.support-menu {
    position: relative !important;
    display: inline-flex !important;
    margin: 0 !important;
    padding: 0 !important;
}

.support-menu > summary {
    list-style: none !important;
}

.support-menu > summary::-webkit-details-marker {
    display: none !important;
}

.support-menu > summary::marker {
    content: "" !important;
    font-size: 0 !important;
}

.support-dropdown {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 0 !important;
    z-index: 2000 !important;
    min-width: 230px !important;
    padding: 10px !important;
    border: 1px solid #dbe3ef !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .16) !important;
}

.support-dropdown a {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    width: 100% !important;
    min-height: 34px !important;
    height: auto !important;
    padding: 8px 10px !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    color: #334155 !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
}

.support-dropdown a:hover {
    background: #eff6ff !important;
    color: #2563eb !important;
}

.support-max-logo {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 30px !important;
    height: 20px !important;
    border-radius: 6px !important;
    background: #2563eb !important;
    color: #ffffff !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    letter-spacing: .3px !important;
}

@media (max-width: 900px) {
    .app-topbar.topbar {
        padding: 12px 16px !important;
        align-items: flex-start !important;
        flex-direction: column !important;
    }
    .app-topbar .topbar-left {
        align-items: flex-start !important;
        flex-direction: column !important;
        gap: 12px !important;
    }
    .app-topbar .topbar-right {
        margin-left: 0 !important;
    }
}

.admin-maintenance-box {
    margin-top: 14px;
}

.maintenance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    margin: 12px 0;
}

.maintenance-panel,
.maintenance-meals {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    background: #fff;
}

.maintenance-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.maintenance-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.maintenance-empty,
.maintenance-item,
.maintenance-meal-row {
    border: 1px solid #eef2f7;
    border-radius: 10px;
    padding: 10px;
    background: #f8fafc;
}

.maintenance-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.maintenance-item small,
.maintenance-meal-row small {
    color: #64748b;
}

.maintenance-meal-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.maintenance-meal-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.maintenance-meal-actions select {
    min-width: 140px;
}

@media (max-width: 760px) {
    .maintenance-panel-head,
    .maintenance-meal-row,
    .maintenance-meal-actions {
        align-items: stretch;
        flex-direction: column;
    }
}

.maintenance-page {
    max-width: 1500px;
}

.maintenance-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.maintenance-title-row h2,
.maintenance-service-card h3,
.maintenance-meals h3 {
    margin: 0 0 6px 0;
}

.maintenance-service-card {
    min-width: 0;
}

.maintenance-kpi-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0;
}

.maintenance-kpi-row div {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f8fafc;
    padding: 10px;
}

.maintenance-kpi-row strong {
    display: block;
    font-size: 22px;
    line-height: 1.1;
}

.maintenance-kpi-row span {
    display: block;
    color: #64748b;
    font-size: 12px;
    margin-top: 4px;
}

.maintenance-item-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.maintenance-item-title span {
    color: #64748b;
    font-size: 12px;
    white-space: nowrap;
}

.maintenance-error {
    color: #b91c1c !important;
}

.maintenance-filters-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin: 10px 0 12px;
}

.maintenance-filters-row label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 600;
}

.maintenance-filters-row select {
    min-width: 220px;
}

.btn-danger-soft {
    border-color: #fecaca !important;
    background: #fff1f2 !important;
    color: #991b1b !important;
}

@media (max-width: 760px) {
    .maintenance-title-row,
    .maintenance-item-title {
        align-items: stretch;
        flex-direction: column;
    }

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

.maintenance-meal-row {
    align-items: stretch;
    flex-direction: column;
}

.maintenance-meal-main {
    width: 100%;
}

.maintenance-meal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.maintenance-meal-examples {
    margin-top: 10px;
}

.maintenance-meal-examples-title {
    margin-bottom: 6px;
    color: #475569;
    font-size: 13px;
    font-weight: 800;
}

.maintenance-meal-table-wrap {
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
}

.maintenance-meal-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 820px;
    font-size: 13px;
}

.maintenance-meal-table th,
.maintenance-meal-table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
}

.maintenance-meal-table th {
    background: #eef2ff;
    color: #334155;
    font-weight: 800;
    white-space: nowrap;
}

.maintenance-meal-table tr:last-child td {
    border-bottom: none;
}

.maintenance-meal-table a {
    font-weight: 800;
}

.maintenance-meal-no-examples {
    margin-top: 10px;
}

@media (max-width: 760px) {
    .maintenance-meal-head {
        align-items: stretch;
        flex-direction: column;
    }
}

.maintenance-issue-table {
    min-width: 1250px;
}

.maintenance-issue-table textarea,
.maintenance-issue-table select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 7px 8px;
    font: inherit;
    background: #fff;
}

.maintenance-issue-table textarea {
    min-width: 190px;
    resize: vertical;
}

.maintenance-issue-table .issue-room-input {
    min-width: 260px;
}

.maintenance-issue-table .issue-resort-input {
    min-width: 150px;
}

.maintenance-issue-table .issue-operator-input {
    min-width: 170px;
}

.maintenance-issue-table .issue-meal-group-select {
    min-width: 120px;
}

.maintenance-action-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
}

.maintenance-action-stack button {
    width: 100%;
}

/* Qui-Quo CRM integration in settings */
.integration-status {
    margin: 10px 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #d8e3f2;
}
.quiquo-url-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 10px 0;
}
.quiquo-url-row input {
    flex: 1;
    min-width: 280px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.quiquo-actions-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.small-note {
    font-size: 13px;
}

.maintenance-recheck-box {
    margin: 14px 0;
    padding: 12px;
    border: 1px solid #dbe7f7;
    border-radius: 12px;
    background: #f8fbff;
}

.maintenance-recheck-box h4 {
    margin: 0 0 6px;
    font-size: 15px;
}

.maintenance-recheck-form {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) minmax(120px, 0.6fr) auto;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
}

.maintenance-recheck-form input {
    width: 100%;
    min-height: 38px;
    border: 1px solid #cbd8ea;
    border-radius: 8px;
    padding: 8px 10px;
    background: #fff;
}

@media (max-width: 900px) {
    .maintenance-recheck-form {
        grid-template-columns: 1fr;
    }
}

/* Тарифы аналитики цен и подсказки сервиса */
.help-service-btn {
    white-space: nowrap;
}

.price-history-admin-status {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0 0 8px;
    font-size: 12px;
    line-height: 1.35;
    color: #475569;
}

.price-history-admin-status strong {
    font-size: 13px;
    color: #0f172a;
}

.pro-reminder-card ul {
    margin: 8px 0 0 20px;
    padding: 0;
}

.pro-reminder-card li {
    margin: 4px 0;
}

.service-help-text p {
    margin: 0 0 10px;
    line-height: 1.5;
}

.service-help-text p:last-child {
    margin-bottom: 0;
}

.status-bar-error {
    border-color: #fecaca !important;
    background: #fef2f2 !important;
    color: #991b1b !important;
}

/* Price/admin commercial settings 2026-05-31 */
.admin-price-fields {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 10px;
    align-items: end;
}

.admin-price-fields label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 13px;
    color: #0f172a;
}

.admin-price-fields input {
    min-height: 34px;
}

.admin-price-fields small {
    color: #8a1f1f;
    font-size: 12px;
}

.admin-registration-status {
    grid-column: 1 / -1;
}

#importBtn {
    white-space: nowrap;
    min-width: max-content;
}

@media (max-width: 1100px) {
    .admin-price-fields {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
}

.refresh-btn.locked-action {
    opacity: 0.75;
    border-color: #94a3b8;
    color: #475569;
}

/* Price history PRO locks and admin registration limit alignment 2026-05-31-3 */
.chart-card-v2.chart-locked-pro {
    cursor: default;
}

.chart-card-v2.chart-locked-pro .chart-box-v2 {
    opacity: 0.58;
}

.chart-lock-overlay {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 44px;
    bottom: 12px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 7px;
    background: rgba(248, 250, 252, 0.76);
    color: #4b5563;
    font: inherit;
    text-align: center;
    cursor: pointer;
}

.chart-lock-overlay:hover {
    background: rgba(248, 250, 252, 0.86);
}

.price-import-head button,
.chart-modal-head-v2 button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    padding: 0 !important;
    text-align: center !important;
}

.table-sort-btn.sort-desc-locked .sort-arrow {
    color: #94a3b8;
}

.table-sort-btn.sort-desc-locked .sort-arrow::after {
    content: " 🔒";
    font-size: 11px;
}

.registration-weekly-limit-field .registration-weekly-limit-line {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.registration-weekly-limit-field .registration-weekly-limit-line input {
    flex: 1 1 110px;
    min-width: 0;
}

.registration-weekly-limit-field .registration-weekly-limit-line small {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* Регистрация: адреса агентств */
.register-agencies-box {
    margin: 12px 0;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
}
.register-agencies-head,
.admin-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.field-help {
    margin: 6px 0 10px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.35;
}
.agency-addresses-list {
    display: grid;
    gap: 10px;
}
.agency-address-row {
    display: grid;
    gap: 6px;
}
.agency-address-line {
    display: flex;
    align-items: center;
    gap: 8px;
}
.agency-address-line input {
    flex: 1;
}
.btn-small {
    padding: 7px 10px;
    font-size: 13px;
    line-height: 1.1;
}
.registration-limited-card {
    max-width: 460px;
}

/* Админка: ожидание и агентства */
.admin-waitlist-card {
    margin-top: 16px;
}
.agency-summary {
    margin: 8px 0;
    color: #334155;
    font-size: 13px;
}
.agency-admin-list {
    display: grid;
    gap: 8px;
    margin: 8px 0 10px;
    padding: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f8fafc;
}
.agency-admin-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto auto auto auto auto auto;
    gap: 8px;
    align-items: center;
    font-size: 13px;
}
.agency-admin-row label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    margin: 0;
}
.agency-address {
    color: #0f172a;
    word-break: break-word;
}
.agency-admin-empty {
    color: #64748b;
    font-size: 13px;
}
.pro-plan-options {
    display: grid;
    gap: 10px;
    margin: 12px 0;
}
.pro-plan-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
}
.pro-plan-option span {
    display: grid;
    gap: 3px;
}
.pro-plan-option small {
    color: #64748b;
}

.pro-agencies-box {
    margin: 14px 0;
    padding: 12px;
    border: 1px solid #f0d48a;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.75);
}

.pro-agencies-box p {
    margin: 0 0 8px;
}

.pro-agencies-list {
    display: grid;
    gap: 8px;
    margin-bottom: 10px;
}

.pro-agency-option {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border: 1px solid #d8e0ed;
    border-radius: 8px;
    background: #fff;
}

.pro-agency-option.is-disabled {
    opacity: 0.72;
    background: #f7f8fb;
}

.pro-agency-option strong {
    display: block;
    color: #26384f;
}

.pro-agency-option small {
    display: block;
    color: #637083;
    margin-top: 2px;
}

.pro-new-agency-row input[type="text"] {
    width: 100%;
    min-width: 0;
}

.pro-agency-count {
    margin-top: 10px !important;
    color: #34465e;
}

/* ===== Price history full table width fix 2026-05-31 ===== */
.price-page-v2 {
    max-width: none !important;
    width: 100% !important;
}

.table-panel-v2 {
    overflow: visible !important;
}

.table-wrap-v2 {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
}

.price-table-v2 {
    min-width: 1680px !important;
    width: 100% !important;
}

.price-table-v2 th,
.price-table-v2 td {
    overflow: visible !important;
}

.price-table-v2 th:last-child,
.price-table-v2 td:last-child {
    min-width: 96px !important;
    white-space: nowrap !important;
}

.price-table-v2 th:nth-last-child(2),
.price-table-v2 td:nth-last-child(2) {
    min-width: 105px !important;
    white-space: nowrap !important;
}


/* ===== Admin one-page compact layout 2026-05-31 ===== */
.admin-page .container {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 8px 10px 16px !important;
    box-sizing: border-box !important;
}
.admin-page .card {
    padding: 10px 12px !important;
}
.admin-page .topbar {
    padding: 8px 12px !important;
}
.admin-page .admin-sticky-panel {
    margin-bottom: 10px !important;
}
.admin-page .admin-waitlist-card {
    margin-top: 8px !important;
}
.admin-page .table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
}
.admin-page .admin-table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
}
.admin-page .admin-table th,
.admin-page .admin-table td {
    padding: 5px 6px !important;
    font-size: 12px !important;
    line-height: 1.25 !important;
}
.admin-page .admin-table th:nth-child(1), .admin-page .admin-table td:nth-child(1) { width: 34px !important; }
.admin-page .admin-table th:nth-child(2), .admin-page .admin-table td:nth-child(2) { width: 92px !important; }
.admin-page .admin-table th:nth-child(3), .admin-page .admin-table td:nth-child(3) { width: 150px !important; }
.admin-page .admin-table th:nth-child(4), .admin-page .admin-table td:nth-child(4) { width: 150px !important; }
.admin-page .admin-table th:nth-child(5), .admin-page .admin-table td:nth-child(5) { width: 90px !important; }
.admin-page .admin-table th:nth-child(6), .admin-page .admin-table td:nth-child(6) { width: 38px !important; text-align: center !important; }
.admin-page .admin-table th:nth-child(7), .admin-page .admin-table td:nth-child(7) { width: 66px !important; }
.admin-page .admin-table th:nth-child(8), .admin-page .admin-table td:nth-child(8) { width: 115px !important; }
.admin-page .admin-table th:nth-child(9), .admin-page .admin-table td:nth-child(9) { width: 96px !important; }
.admin-page .admin-table th:nth-child(10), .admin-page .admin-table td:nth-child(10) { width: 110px !important; }
.admin-page .admin-table th:nth-child(11), .admin-page .admin-table td:nth-child(11) { width: 300px !important; }
.admin-page .price-history-admin-status {
    gap: 2px !important;
    margin-bottom: 4px !important;
    font-size: 11px !important;
}
.admin-page .price-history-admin-status span {
    display: block !important;
}
.admin-page .agency-summary {
    margin: 3px 0 4px !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
}
.admin-page .agency-admin-list {
    display: block !important;
    margin: 4px 0 6px !important;
    padding: 5px !important;
    max-height: 110px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    border-radius: 7px !important;
}
.admin-page .agency-admin-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 62px 50px 64px 52px 22px 22px !important;
    gap: 3px !important;
    align-items: center !important;
    min-height: 28px !important;
    padding: 3px 0 !important;
    font-size: 12px !important;
    border-bottom: 1px solid #e9eef6 !important;
}
.admin-page .agency-admin-row:last-child {
    border-bottom: 0 !important;
}
.admin-page .agency-admin-row label {
    gap: 2px !important;
    font-size: 12px !important;
}
.admin-page .agency-admin-row input[type="checkbox"] {
    width: 13px !important;
    height: 13px !important;
    margin: 0 !important;
}
.admin-page .agency-address {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: 12px !important;
}
.admin-page .agency-paid-date {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: 11px !important;
    color: #64748b !important;
}
.admin-page .edit-agency,
.admin-page .delete-agency {
    padding: 0 !important;
    width: 18px !important;
    min-width: 18px !important;
    height: 18px !important;
    line-height: 18px !important;
    text-align: center !important;
    font-size: 14px !important;
}
.admin-page .price-history-matrix {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    grid-template-columns: 42px 1fr 1fr !important;
    grid-auto-rows: 23px !important;
    column-gap: 3px !important;
    row-gap: 2px !important;
}
.admin-page .price-history-matrix-head,
.admin-page .price-history-matrix-quarter {
    font-size: 12px !important;
    height: 23px !important;
    line-height: 23px !important;
}
.admin-page .price-history-matrix-cell {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 23px !important;
    min-height: 23px !important;
    max-height: 23px !important;
    padding: 0 !important;
}
.admin-page .price-history-matrix .grant-price-history-comment {
    height: 26px !important;
    min-height: 26px !important;
    font-size: 13px !important;
    padding: 2px 5px !important;
}
.admin-page .grant-access {
    min-width: 0 !important;
    max-width: 100% !important;
}
.admin-page .grant-access .quarter-row {
    height: 19px !important;
    min-height: 19px !important;
    margin: 1px 0 !important;
    padding: 1px 5px !important;
}
.admin-page .grant-access .grant-comment {
    height: 22px !important;
    min-height: 22px !important;
    padding: 2px 5px !important;
}
@media (max-width: 1250px) {
    .admin-page .table-wrap { overflow-x: auto !important; }
    .admin-page .admin-table { min-width: 1180px !important; }
}


/* Referral program */
.referral-card {
    max-width: 760px;
}
.referral-link-box {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 12px;
    align-items: end;
    margin: 16px 0 8px;
}
.referral-link-box input {
    width: 100%;
}
@media (max-width: 700px) {
    .referral-link-box {
        grid-template-columns: 1fr;
    }
}

/* 2026-06-01: меню и реферальная программа */
a.admin-only-link {
    display: none !important;
}
body.menu-admin-visible a.admin-only-link {
    display: inline-flex !important;
}
.admin-price-history-switches {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 28px;
    align-items: center;
    margin: 10px 0 14px;
}
.admin-price-history-switches .checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    white-space: nowrap;
}
.admin-price-history-switches input[type="checkbox"] {
    flex: 0 0 auto;
}
.referral-settings-grid {
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(280px, 1fr);
    gap: 16px;
    align-items: end;
}
.referral-balance-box {
    border: 1px solid #d7e3f4;
    border-radius: 8px;
    padding: 12px;
    background: #f8fbff;
}
.referral-balance-box span {
    display: block;
    color: #5b6b82;
    font-size: 13px;
    margin-bottom: 6px;
}
.referral-balance-box strong {
    font-size: 28px;
    color: #12345a;
}
@media (max-width: 760px) {
    .referral-settings-grid {
        grid-template-columns: 1fr;
    }
}
.pro-referral-points-box {
    border: 1px dashed #c8d7ee;
    background: #f8fbff;
    border-radius: 8px;
    padding: 10px;
    margin: 10px 0;
}
.pro-referral-points-box label {
    display: flex;
    gap: 10px;
    align-items: center;
    font-weight: 700;
}
.pro-referral-points-box input {
    width: 140px;
}

.maintenance-problem-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
    margin: 10px 0 12px;
}
.maintenance-problem-filter-row label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-weight: 600;
    color: #0f2a44;
}
.maintenance-problem-filter-row select,
.maintenance-problem-filter-row input {
    min-width: 220px;
    height: 34px;
    border: 1px solid #c9d7ea;
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 14px;
}
.maintenance-problem-filter-row input {
    min-width: 120px;
    width: 120px;
}
.maintenance-problem-quotes-table td {
    vertical-align: top;
}

/* Admin editing for price history table */
.hotel-cell {
    position: relative;
}
.tour-edit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-right: 6px;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    background: #eff6ff;
    color: #1d4ed8;
    cursor: pointer;
    font-weight: 800;
    line-height: 1;
    vertical-align: top;
}
.tour-edit-btn:hover {
    background: #dbeafe;
}
.tour-edit-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 12000;
}
.tour-edit-modal.visible {
    display: block;
}
.tour-edit-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}
.tour-edit-dialog {
    position: relative;
    width: min(920px, calc(100vw - 32px));
    max-height: calc(100vh - 36px);
    overflow: auto;
    margin: 18px auto;
    padding: 18px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.28);
}
.tour-edit-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}
.tour-edit-head h3 {
    margin: 0;
    font-size: 20px;
    color: #0f2942;
}
.tour-edit-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}
.tour-edit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.tour-edit-grid label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-weight: 700;
    color: #0f2942;
    font-size: 13px;
}
.tour-edit-grid input,
.tour-edit-grid textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 9px 10px;
    font: inherit;
    font-weight: 500;
    color: #0f172a;
}
.tour-edit-wide {
    grid-column: 1 / -1;
}
.tour-edit-error {
    min-height: 20px;
    margin-top: 10px;
    color: #b91c1c;
    font-weight: 700;
}
.tour-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
}
@media (max-width: 760px) {
    .tour-edit-grid {
        grid-template-columns: 1fr;
    }
}


.maintenance-duplicate-logs-table {
    min-width: 1450px;
}

.duplicate-row-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-width: 360px;
}

.duplicate-row-details small {
    color: #64748b;
    line-height: 1.35;
}

.maintenance-duplicate-logs-table td:nth-child(3),
.maintenance-duplicate-logs-table td:nth-child(4) {
    min-width: 300px;
}

.admin-referral-points-used {
    display: inline-block;
    margin-top: 2px;
    color: #166534;
    font-weight: 700;
}

.admin-company-bonus-balance {
    display: inline-block;
    margin-top: 5px;
    color: #166534;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 800;
}

.admin-company-bonus-balance.muted {
    color: #64748b;
    font-weight: 700;
}


.success-message {
    background: #dcfce7;
    color: #166534;
    padding: 10px;
    border-radius: 4px;
    margin-top: 12px;
}

.auth-link-muted {
    margin-top: 6px;
    font-size: 14px;
    color: #64748b;
}

.password-reset-hint a,
.auth-link-muted a {
    font-weight: 800;
}


/* address row fix */
.agency-address-line {
    display:flex;
    align-items:center;
    gap:10px;
    width:100%;
}
.agency-address-line .agency-address-input,
.agency-address-line input{
    flex:1 1 auto;
    min-width:0;
}
.remove-agency-address{
    width:24px;
    min-width:24px;
    height:24px;
    border:0;
    background:transparent;
    color:#dc2626;
    font-size:20px;
    font-weight:700;
    cursor:pointer;
    padding:0;
    margin:0;
    line-height:24px;
    flex-shrink:0;
}


/* cross alignment fix */
.agency-address-line{
    display:flex !important;
    align-items:center !important;
    gap:6px !important;
    width:100% !important;
}
.remove-agency-address{
    flex:0 0 18px !important;
    width:18px !important;
    height:18px !important;
    min-width:18px !important;
    font-size:16px !important;
    line-height:18px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    align-self:center !important;
    margin:0 !important;
    padding:0 !important;
}

/* Hotel normalisation maintenance block */
.maintenance-hotel-groups-table {
    min-width: 1180px;
}

.maintenance-hotel-groups-table .hotel-group-display-input,
.maintenance-hotel-groups-table .hotel-group-target-input {
    width: 100%;
    box-sizing: border-box;
    min-height: 36px;
}

.maintenance-hotel-groups-table .hotel-group-target-input {
    min-width: 150px;
}

.maintenance-hotel-alias {
    display: block;
    margin-bottom: 4px;
}

/* 2026-06-05: isolated scroll windows and filtered Qui-Quo repair controls */
.maintenance-scroll-window {
    max-height: 430px;
    overflow: auto;
    border: 1px solid #d8e3f0;
    border-radius: 8px;
    background: #fff;
}

.maintenance-scroll-window-compact {
    max-height: 240px;
}

.maintenance-scroll-window .maintenance-meal-table-wrap {
    overflow: visible;
}

.maintenance-scroll-window table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #f7fafe;
    box-shadow: inset 0 -1px 0 #dbe5f0;
}

.maintenance-issue-filter-panel {
    margin: 12px 0;
    padding: 12px;
    border: 1px solid #d8e3f0;
    border-radius: 8px;
    background: #f8fbff;
}

.maintenance-issue-filter-title {
    margin: 2px 0 8px;
    color: #0f2a44;
    font-size: 13px;
    font-weight: 800;
}

.maintenance-issue-filter-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-bottom: 12px;
}

.maintenance-issue-filter-checkboxes label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #0f2a44;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.maintenance-issue-filter-checkboxes input[type="checkbox"],
.maintenance-checkbox-cell input[type="checkbox"] {
    width: 15px;
    height: 15px;
    margin: 0;
}

.maintenance-issue-recheck-box {
    margin-top: 8px;
}

.maintenance-issue-scroll-window {
    max-height: 560px;
}

.maintenance-checkbox-cell {
    width: 34px;
    min-width: 34px;
    text-align: center;
}

.maintenance-issue-meta {
    display: block;
    margin-top: 3px;
    color: #64748b;
    line-height: 1.35;
}

.maintenance-issue-table {
    min-width: 2080px;
}

.maintenance-issue-table td {
    vertical-align: top;
}

@media (max-width: 760px) {
    .maintenance-scroll-window {
        max-height: 360px;
    }

    .maintenance-issue-scroll-window {
        max-height: 480px;
    }
}

.maintenance-problem-recheck-progress {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid #d8e1ef;
    border-radius: 8px;
    background: #f8fafc;
    color: #526176;
    font-size: 13px;
}

.maintenance-problem-recheck-progress.is-active {
    background: #f4f8ff;
    border-color: #a9c4f6;
    color: #1f365c;
}

.maintenance-problem-recheck-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 7px;
}

.maintenance-problem-recheck-progress-track {
    height: 8px;
    overflow: hidden;
    margin-bottom: 7px;
    border-radius: 999px;
    background: #dce6f6;
}

.maintenance-problem-recheck-progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #2563eb;
    transition: width 0.25s ease;
}


/* legal documents and footer */
.site-footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 24px 18px;
    margin-top: 28px;
    font-size: 13px;
    line-height: 1.45;
}
.site-footer__inner {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(220px, 1.1fr) minmax(280px, 1.7fr) minmax(260px, 1.2fr);
    gap: 18px 28px;
    align-items: start;
}
.site-footer__brand,
.site-footer__contacts,
.site-footer__links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.site-footer strong {
    color: #fff;
    font-size: 16px;
}
.site-footer a {
    color: #bfdbfe;
    text-decoration: none;
}
.site-footer a:hover {
    text-decoration: underline;
}
.legal-consent-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 8px 0 14px;
    padding: 12px;
    border: 1px solid #dbe4f0;
    border-radius: 8px;
    background: #f8fafc;
}
.login-card .checkbox-label,
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 0;
    font-size: 13px;
    line-height: 1.4;
    color: #334155;
    font-weight: 500;
}
.login-card .checkbox-label input[type="checkbox"],
.checkbox-label input[type="checkbox"] {
    width: auto;
    min-width: 16px;
    height: 16px;
    margin-top: 2px;
}
.checkbox-label a {
    color: #2563eb;
    font-weight: 700;
}
.legal-page {
    background: #f3f6fb;
    color: #0f172a;
}
.legal-document {
    max-width: 980px;
    margin: 0 auto;
    padding: 32px 18px 10px;
}
.legal-card {
    background: #fff;
    border: 1px solid #dbe4f0;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(15,23,42,.06);
    padding: 30px;
}
.legal-card h1 {
    margin-top: 0;
    color: #10233f;
}
.legal-card h2 {
    margin-top: 28px;
    color: #10233f;
}
.legal-card p,
.legal-card li {
    line-height: 1.62;
}
.legal-card table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0 20px;
}
.legal-card th,
.legal-card td {
    border: 1px solid #dbe4f0;
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}
.legal-card th {
    width: 260px;
    background: #f8fafc;
}
.legal-back-link {
    display: inline-block;
    margin-bottom: 16px;
    color: #2563eb;
    font-weight: 700;
    text-decoration: none;
}
.legal-back-link:hover {
    text-decoration: underline;
}
@media (max-width: 900px) {
    .site-footer__inner {
        grid-template-columns: 1fr;
    }
    .legal-card {
        padding: 22px 16px;
    }
    .legal-card th,
    .legal-card td {
        display: block;
        width: auto;
    }
}
