/* ==========================================================================
   Админ-панель «Три зайца» v2 — Премиум-стили и No-Code WYSIWYG
   ========================================================================== */

:root {
    --bg: #120e0b;
    --surface: #1c1511;
    --surface-2: #2a211c;
    --primary: #5c4538;
    --primary-hover: #75594a;
    --text: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.55);
    --gold: #D4AF37;
    --danger: #c84e4e;
    --success: #27ae60;
    --border: rgba(212, 175, 55, 0.15);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.3);
    --shadow-gold: 0 0 25px rgba(212, 175, 55, 0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Montserrat', Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    overflow: hidden;
    height: 100vh;
}

.hidden { display: none !important; }

/* LAYOUT */
.admin-layout {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* SIDEBAR */
.sidebar {
    width: 280px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    flex-shrink: 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 2rem;
}

.brand-icon { font-size: 28px; }
.brand-name { font-weight: 800; font-size: 1.1rem; color: #fff; letter-spacing: 0.05em; text-transform: uppercase; }
.brand-sub { font-size: 0.75rem; color: var(--gold); letter-spacing: 0.1em; text-transform: uppercase; }

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1rem;
    background: var(--surface-2);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--gold);
    color: #120e0b;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.user-name { font-weight: 700; font-size: 0.9rem; }
.user-role { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
    overflow-y: auto;
}

.sidebar-link {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-muted);
    padding: 12px 16px;
    text-align: left;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.sidebar-link:hover, .sidebar-link.active {
    background: var(--surface-2);
    color: var(--text);
    border-left: 3px solid var(--gold);
    padding-left: 20px;
}

/* Внешняя ссылка на модуль (например, QR-генератор) в сайдбаре */
.nav-link {
    display: block;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-muted);
    padding: 12px 16px;
    text-align: left;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    margin-top: 4px;
}

.nav-link:hover {
    background: var(--surface-2);
    color: var(--text);
    border-left: 3px solid var(--gold);
    padding-left: 20px;
}

/* MAIN CONTENT */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

.tab-content { display: none; height: 100%; }
.tab-content.active { display: flex; flex-direction: column; }

.tab-header { margin-bottom: 1.5rem; }
.tab-header-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.tab-title { font-size: 1.6rem; font-weight: 800; color: #fff; }
.tab-desc { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }

/* FORMS AND INPUTS */
.input, .field input, .field textarea, .field select {
    width: 100%;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    outline: none;
    font-family: inherit;
    font-size: 0.9rem;
    transition: var(--transition);
}

.input:focus, .field input:focus, .field textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.15);
}

.field { margin-bottom: 1.25rem; }
.field label { display: block; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px; letter-spacing: 0.05em; }

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

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--text);
    border: 1px solid var(--border);
    font-weight: 700;
    padding: 10px 20px;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn:hover { background: var(--primary-hover); transform: translateY(-1px); }
.btn--primary { background: var(--gold); color: #120e0b; border-color: var(--gold); }
.btn--primary:hover { background: #e3c458; box-shadow: var(--shadow-gold); }
.btn--danger { background: var(--danger); border-color: var(--danger); }
.btn--danger:hover { background: #e05e5e; }
.btn--secondary { background: var(--surface-2); }
.btn--sm { padding: 6px 12px; font-size: 0.75rem; }

/* STATUS MESSAGES */
.status-msg {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    display: none;
}

.status-msg.success { background: rgba(39, 174, 96, 0.15); border: 1px solid var(--success); color: var(--success); }
.status-msg.error { background: rgba(200, 78, 78, 0.15); border: 1px solid var(--danger); color: #e05e5e; }

.toolbar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

/* ==========================================================================
   LIVE VISUAL PREVIEW & SPLIT-SCREEN CONSTRUCTOR STYLES
   ========================================================================== */
.visual-editor-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
    height: calc(100vh - 190px);
    width: 100%;
}

@media (min-width: 1024px) {
    .visual-editor-container {
        flex-direction: row;
        align-items: stretch;
    }
}

.editor-forms-panel {
    flex: 0 0 100%;
    display: flex;
    flex-direction: column;
}

@media (min-width: 1024px) {
    .editor-forms-panel {
        flex: 0 0 420px;
        border-right: 1px solid var(--border);
        padding-right: 1.5rem;
    }
}

.content-list-scroll {
    overflow-y: auto;
    flex: 1;
    padding-right: 5px;
}

.editor-preview-panel {
    flex: 1;
    display: none;
    flex-direction: column;
    background: #110d0a;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

@media (min-width: 1024px) {
    .editor-preview-panel {
        display: flex;
    }
}

.preview-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
}

.preview-header-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.preview-viewport-controls {
    display: flex;
    gap: 6px;
}

.viewport-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.viewport-btn:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
}

.viewport-btn.active {
    background: var(--gold);
    color: #120e0b !important;
    border-color: var(--gold);
}

.preview-iframe-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1512;
    padding: 1.5rem;
    overflow: hidden;
    position: relative;
}

.preview-iframe {
    width: 100%;
    height: 100%;
    background: #ffffff;
    border: none;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1), height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.preview-iframe-wrapper.mobile-mode .preview-iframe {
    width: 375px;
    height: 667px;
    border: 12px solid #2b211c;
    border-radius: 36px;
}

.content-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    padding: 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
    transition: var(--transition);
}

.content-card-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; color: var(--gold); margin-bottom: 0.25rem; letter-spacing: 0.05em; }
.content-card-key { font-size: 0.65rem; color: var(--text-muted); margin-bottom: 0.75rem; }

.content-card.flash-highlight {
    border-color: var(--gold) !important;
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.45) !important;
    transform: scale(1.02);
}

/* MODAL */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(18, 14, 11, 0.85);
    backdrop-filter: blur(8px);
}

.modal-container {
    background: var(--surface);
    border: 1px solid var(--border);
    width: 100%;
    max-width: 600px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    position: relative;
    padding: 2.25rem;
    z-index: 10;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover { color: var(--gold); }
.modal-title { font-size: 1.3rem; font-weight: 800; color: #fff; margin-bottom: 1.5rem; }
.modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 0.75rem; margin-top: 1.75rem; border-top: 1px solid var(--border); padding-top: 1.25rem; }

/* CHROMATIC COLOR PREVIEW GRID */
.colors-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.25rem; }
.color-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.25rem; display: flex; flex-direction: column; gap: 8px; }
.color-card label { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.color-row { display: flex; gap: 8px; }
.color-row input[type="color"] { width: 44px; height: 38px; border: 1px solid var(--border); background: transparent; cursor: pointer; border-radius: var(--radius-xs); }
.color-row input[type="text"] { flex: 1; padding: 6px; }

/* ROOMS LIST */
.rooms-list-grid { display: flex; flex-direction: column; gap: 0.75rem; }
.room-card { display: flex; align-items: center; gap: 1.25rem; padding: 0.75rem; background: var(--surface-2); border-radius: var(--radius-md); border: 1px solid var(--border); transition: var(--transition); }
.room-card:hover { border-color: var(--gold); box-shadow: var(--shadow-gold); }
.room-card-thumb { width: 85px; height: 85px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.room-card-info { flex: 1; }
.room-card-title { font-weight: 700; font-size: 1rem; color: #fff; }
.room-card-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }
.room-card-actions { display: flex; gap: 0.5rem; }

/* REVIEWS LIST */
.reviews-list-grid { display: flex; flex-direction: column; gap: 0.75rem; }
.review-card { display: flex; align-items: start; gap: 1.25rem; padding: 1.25rem; background: var(--surface-2); border-radius: var(--radius-md); border: 1px solid var(--border); }
.review-avatar { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--gold); object-fit: cover; }
.review-avatar-placeholder { width: 48px; height: 48px; border-radius: 50%; background: var(--gold); color: #120e0b; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.1rem; }
.review-body { flex: 1; }
.review-author { font-weight: 700; font-size: 0.95rem; color: #fff; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.review-stars { color: var(--gold); font-size: 0.85rem; }
.review-meta { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.3rem; }
.review-text { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.5rem; line-height: 1.5; }
.review-actions { display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-end; }
.review-private-box { margin-top: 0.75rem; padding: 0.6rem 0.75rem; background: rgba(212,175,55,0.05); border: 1px dashed rgba(212,175,55,0.35); border-radius: 8px; }
.review-private-title { color: var(--gold); font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.4rem; }
.review-private-row { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; word-break: break-word; }
.review-private-notes { color: rgba(255,255,255,0.75); }

/* Кнопки модерации отзывов (Одобрить / Отклонить) */
.review-mod-btn { width: 100%; justify-content: flex-start; font-size: 0.72rem; padding: 6px 10px; min-height: 30px; line-height: 1.2; }
.review-mod-approve { background: rgba(39, 174, 96, 0.12); border: 1px solid rgba(39, 174, 96, 0.4); color: #2ecc71; }
.review-mod-approve:hover { background: rgba(39, 174, 96, 0.25); border-color: #27ae60; box-shadow: 0 0 12px rgba(39, 174, 96, 0.25); }
.review-mod-reject { background: rgba(231, 76, 60, 0.1); border: 1px solid rgba(231, 76, 60, 0.4); color: #e05e5e; }
.review-mod-reject:hover { background: rgba(231, 76, 60, 0.2); border-color: #e74c3c; }
.review-mod-btn.active.review-mod-approve { background: #27ae60; color: #fff; border-color: #27ae60; }
.review-mod-btn.active.review-mod-reject { background: #e74c3c; color: #fff; border-color: #e74c3c; }
.review-mod-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.review-actions .review-mod-btn + .review-mod-btn { margin-top: 2px; }
.review-actions {
  min-width: 110px;
}
.review-admin-private textarea,
.review-admin-private input[type="email"] { width: 100%; padding: 10px 12px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 8px; color: #fff; font-size: 0.85rem; font-family: inherit; box-sizing: border-box; transition: border-color 0.2s; }
.review-admin-private textarea:focus,
.review-admin-private input[type="email"]:focus { outline: none; border-color: var(--gold); }
.review-admin-private label { display: block; font-size: 0.75rem; color: rgba(255,255,255,0.7); margin-bottom: 4px; }
.review-admin-private .field { margin-bottom: 10px; }
.review-admin-private .field:last-child { margin-bottom: 0; }
.review-admin-private textarea { min-height: 70px; resize: vertical; }

/* TOGGLE SLIDER */
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; inset: 0; background-color: var(--surface); border: 1px solid var(--border); border-radius: 24px; transition: .3s; }
.toggle-slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 3px; bottom: 3px; background-color: var(--text-muted); border-radius: 50%; transition: .3s; }
.toggle input:checked + .toggle-slider { background-color: var(--gold); border-color: var(--gold); }
.toggle input:checked + .toggle-slider:before { transform: translateX(20px); background-color: #120e0b; }

/* SHAHMATKA (CALENDAR GRID) */
.bookings-grid-container { overflow-x: auto; background: var(--surface); border-radius: var(--radius-md); border: 1px solid var(--border); }
.bookings-table { width: 100%; border-collapse: collapse; min-width: 900px; text-align: left; }
.bookings-table th, .bookings-table td { border: 1px solid var(--border); padding: 0.75rem; font-size: 0.8rem; position: relative; }
.bookings-table th { background: var(--surface-2); font-weight: 700; text-transform: uppercase; font-size: 0.7rem; color: var(--text-muted); }
.bookings-table th.weekend, .bookings-table td.weekend { background: rgba(255,255,255,0.015); }
.room-name-cell { font-weight: 700; width: 160px; background: var(--surface-2) !important; color: #fff; }
.day-cell { width: 42px; cursor: cell; height: 48px; }
.day-cell:hover { background: rgba(212,175,55,0.05); }

.booking-bar {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    border-radius: var(--radius-xs);
    color: #120e0b;
    font-weight: 700;
    font-size: 0.7rem;
    padding: 0 8px;
    display: flex;
    align-items: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    z-index: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.booking-bar.confirmed { background: var(--success); color: #fff; }
.booking-bar.pending { background: var(--gold); color: #120e0b; }
.booking-bar.cancelled { background: var(--danger); color: #fff; }

/* GALLERY ADMIN LIST */
.gallery-admin-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.gallery-admin-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.gallery-admin-card:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-gold);
}

.gallery-admin-thumb {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-xs);
    object-fit: cover;
    background: var(--surface-2);
    flex-shrink: 0;
}

.gallery-admin-info {
    flex: 1;
    min-width: 0;
}

.gallery-admin-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-admin-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.gallery-admin-actions {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}

/* LOGIN SCREEN */
.login-screen {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0d0a08;
    padding: 1.5rem;
}

.login-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.login-logo { font-size: 44px; margin-bottom: 1rem; }
.login-title { font-size: 1.5rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: #fff; margin-bottom: 4px; }
.login-subtitle { font-size: 0.8rem; color: var(--gold); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1.5rem; }

/* GALLERY STUDIO: PRESETS SCROLL & RANGE SLIDERS */
.presets-scroll {
    display: flex; gap: 8px; overflow-x: auto;
    padding-bottom: 8px; margin-bottom: 12px;
    -webkit-overflow-scrolling: touch;
}
.preset-btn {
    flex-shrink: 0; background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1); color: rgba(255,255,255,0.6);
    padding: 5px 14px; border-radius: 50px; font-size: 11px; font-weight: 500;
    cursor: pointer; transition: all 0.3s; white-space: nowrap;
}
.preset-btn:hover, .preset-btn.active { background: rgba(212,175,55,0.15); border-color: #D4AF37; color: #fff; }
input[type="range"] { width:100%; height:4px; -webkit-appearance:none; appearance:none; background:rgba(255,255,255,0.1); border-radius:2px; outline:none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance:none; appearance:none; width:14px; height:16px; border-radius:50%; background:#D4AF37; cursor:pointer; border:1px solid #1c1511; }
input[type="range"]::-moz-range-thumb { width:14px; height:16px; border-radius:50%; background:#D4AF37; cursor:pointer; border:1px solid #1c1511; }

/* RESPONSIVE SCROLLBAR */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }
/* Language Tabs (Admin multilingual) */
.lang-tabs {
  display: flex;
  gap: 4px;
  align-items: center;
}

.lang-tab-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.lang-tab-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(212, 175, 55, 0.08);
}

.lang-tab-btn.active {
  background: var(--gold);
  color: #120e0b;
  border-color: var(--gold);
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.25);
}

/* ==========================================================================
   Читаемость: карточки, поля, таблицы (22.10.2026)
   Классы .card / .card-title / .card-header использовались в разметке,
   но не были описаны в CSS — блоки выглядели как сплошной текст.
   ========================================================================== */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}
.card-header { margin-bottom: 1rem; }
.card-title { font-size: 1.05rem; font-weight: 800; color: #fff; letter-spacing: 0.01em; }

.input, .field input, .field textarea, .field select {
    padding: 12px 14px;
    font-size: 1rem;
    line-height: 1.4;
}
.field input, .field select, select.input { min-height: 46px; }
textarea.input, .field textarea { min-height: 96px; line-height: 1.5; }
.field label { font-size: 0.82rem; margin-bottom: 8px; }
.field { margin-bottom: 1.4rem; }
.grid--2 { gap: 1.25rem; }
.tab-desc { font-size: 0.9rem; }
.btn { padding: 11px 20px; font-size: 0.9rem; }
.bookings-table th, .bookings-table td { padding: 0.85rem; font-size: 0.92rem; }
.bookings-table th { font-size: 0.78rem; }
/* Карта Leaflet в «Контроле броней»: тёмный вид поверх OSM-тайлов */
.ctl-map-dark { background: #17110d !important; }
.ctl-map-dark .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(0.86) contrast(0.92) saturate(0.6); }
.ctl-map-dark .leaflet-control-attribution { background: rgba(20,15,11,0.75) !important; color: #b7ada2 !important; }
.ctl-map-dark .leaflet-control-attribution a { color: #d9c08a !important; }
.ctl-map-dark .leaflet-bar a { background: #241a14; color: #e7d9c4; border-color: rgba(212,175,55,0.2); }
/* Leaflet 1.9 рисует в подписи сине-жёлтый «флажок» — убираем, оставляя текст ссылки */
.leaflet-container .leaflet-control-attribution .leaflet-attribution-flag { display: none !important; }
/* ===== Цветовая разметка разделов (Контроль броней и Статистика) ===== */
.card--gold   { border-left: 3px solid #D4AF37; }
.card--green  { border-left: 3px solid #8fd18f; }
.card--amber  { border-left: 3px solid #e0b877; }
.card--red    { border-left: 3px solid #e5786f; }
.card--blue   { border-left: 3px solid #7fa7d9; }
.card--violet { border-left: 3px solid #b294d6; }
.card--grey   { border-left: 3px solid #8a8279; }

/* зебра в таблицах для читаемости */
#ctlTable tr:nth-child(even) td { background: rgba(255,255,255,0.038); }
#stLast tr:nth-child(even) td { background: rgba(255,255,255,0.038); }
#ctlTable tr:hover td { background: rgba(212,175,55,0.06); }
#stLast tr:hover td { background: rgba(212,175,55,0.06); }
/* ===== Шахматка бронирований (лента месяцев) ===== */
.board-scroll { overflow-x: auto; padding-bottom: 6px; min-height: 540px; background: #1b1511; border: 1px solid rgba(212,175,55,.16); border-radius: 12px; }
.board-grid { min-width: max-content; }
.board-hrow { display: flex; align-items: stretch; }
.board-corner { width: var(--blabel); flex: 0 0 var(--blabel); position: sticky; left: 0; z-index: 7;
    background: #1a1310; padding: 6px 10px; font-size: 11px; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .05em; box-sizing: border-box; }
.board-months { position: sticky; top: 0; z-index: 6; background: #1a1310; }
.board-days { position: sticky; top: 26px; z-index: 6; background: #1a1310; border-bottom: 1px solid rgba(255,255,255,.08); }
.board-track { position: relative; display: flex; }
.board-month { text-align: center; font-size: 11.5px; font-weight: 700; color: #d9c7a5; padding: 5px 0;
    border-left: 1px solid rgba(255,255,255,.08); white-space: nowrap; overflow: hidden; flex: 0 0 auto; box-sizing: border-box; }
.board-cell-h { width: var(--bcell); flex: 0 0 var(--bcell); text-align: center; padding: 4px 0;
    border-left: 1px solid rgba(255,255,255,.05); box-sizing: border-box; line-height: 1.15; }
.board-day-num { display: block; font-size: 11px; color: var(--text-muted); }
.board-day-dow { display: block; font-size: 8.5px; color: rgba(255,255,255,.32); }
.board-cell-h.weekend .board-day-num { color: #c9a86a; }
.board-cell-h.today { background: rgba(212,175,55,.13); }
.board-cell-h.today .board-day-num { color: #D4AF37; font-weight: 800; }
.board-row { display: flex; min-height: 60px; border-top: 1px solid rgba(255,255,255,.12); }
.board-label { width: var(--blabel); flex: 0 0 var(--blabel); position: sticky; left: 0; z-index: 5;
    background: #1a1310; padding: 6px 10px; font-size: 12.5px; font-weight: 600; box-sizing: border-box;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; flex-direction: column; justify-content: center; }
.board-label-price { font-size: 9.5px; font-weight: 400; color: var(--text-muted); }
.board-cell { width: var(--bcell); flex: 0 0 var(--bcell); border-left: 1px solid rgba(255,255,255,.11); box-sizing: border-box; background: rgba(255,255,255,.012); }
.board-cell.weekend { background: rgba(212,175,55,.055); }
.board-cell.today { background: rgba(212,175,55,.13); }
.board-bar { position: absolute; top: 9px; height: 42px; border-radius: 9px; color: #100d0a; font-size: 12px; font-weight: 700; box-shadow: 0 2px 8px rgba(0,0,0,.25);
    display: flex; align-items: center; gap: 6px; padding: 0 8px; overflow: hidden; white-space: nowrap; cursor: grab;
    box-shadow: 0 2px 6px rgba(0,0,0,.35); z-index: 2; }
.board-bar:active { cursor: grabbing; }
.board-bar-name { overflow: hidden; text-overflow: ellipsis; }
.board-bar-sum { opacity: .82; font-weight: 600; }
.board-bar-conflict { outline: 2px solid #e5786f; outline-offset: -2px; }
.board-dragging { opacity: .45; }
.board-drop-hover { background: rgba(212,175,55,.12); }
.board-load { border-top: 1px solid rgba(255,255,255,.09); }
.board-load-cell { width: var(--bcell); flex: 0 0 var(--bcell); text-align: center; font-size: 10.5px; padding: 5px 0;
    border-left: 1px solid rgba(255,255,255,.05); box-sizing: border-box; color: rgba(255,255,255,.75); }
.board-chip { display: flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 10px;
    background: rgba(224,184,119,.12); border: 1px solid rgba(224,184,119,.35); cursor: grab; font-size: 12px; }
.board-chip:active { cursor: grabbing; }
.board-chip-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.board-chip-name { font-weight: 600; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-chip-dates { color: var(--text-muted); font-size: 11px; }
.board-legend { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-top: 10px; font-size: 11.5px; color: var(--text-muted); }
.board-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: middle; }
.board-legend-note { color: #e5786f; }
.board-bar-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(16,12,9,.55); display: inline-block; }
/* ===== Бейджи раздела «Страницы» ===== */
.chb { display: inline-block; padding: 1px 7px; border-radius: 8px; font-size: 10px; font-weight: 700; letter-spacing: .02em; }
.chb-site { background: rgba(143,209,143,.16); color: #8fd18f; }
.chb-locale { background: rgba(224,184,119,.16); color: #e0b877; }
.chb-dead { background: rgba(229,120,111,.16); color: #e5786f; }
.chb-empty { background: rgba(127,167,217,.16); color: #7fa7d9; }
/* ===== Менеджер фотографий раздела «Страницы» ===== */
.ph-box { display: flex; flex-direction: column; gap: 8px; }
.ph-row { display: flex; gap: 10px; align-items: flex-start; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07); border-radius: 10px; padding: 8px; }
.ph-img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex: 0 0 auto; }
.ph-fields { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ph-name { font-size: 11px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-inp { width: 100%; background: #120e0b; color: #e7d9c4; border: 1px solid rgba(212,175,55,.2); border-radius: 7px; padding: 5px 8px; font-size: 12px; }
.ph-actions { display: flex; flex-direction: column; gap: 3px; }
.ph-actions button { width: 26px; height: 24px; padding: 0; font-size: 11px; border-radius: 6px; border: 1px solid rgba(212,175,55,.25); background: rgba(255,255,255,.05); color: #e7d9c4; cursor: pointer; }
.ph-actions button:hover { background: rgba(212,175,55,.16); }
.ph-bad { font-size: 10px; color: #e5786f; }
/* ===== Удобное редактирование полей ===== */
.content-card { position: relative; cursor: pointer; }
.content-card input[type="text"]:not([data-field]), .content-card textarea { font-size: 14px; line-height: 1.55; }
.content-card textarea { min-height: 90px; resize: vertical; }
/* поля карточки занимают всю ширину: без этого textarea оставалась 177px по cols по умолчанию */
.content-card textarea,
.content-card input[type="text"]:not([data-field]):not(.ph-inp) { width: 100%; box-sizing: border-box; }
.content-card-edit { position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; border-radius: 7px;
    border: 1px solid rgba(212,175,55,.3); background: rgba(255,255,255,.04); color: #e7d9c4; cursor: pointer; font-size: 13px; line-height: 1; }
.content-card-edit:hover { background: rgba(212,175,55,.18); }
/* ===== Страницы сайта: строки списка ===== */
.page-row {
    display: grid;
    grid-template-columns: 40px 40px minmax(180px, 1fr) 150px 120px auto;
    gap: 8px;
    align-items: center;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 12px;
    padding: 8px 12px;
    margin-bottom: 8px;
}
.page-row .input { padding: 8px 12px; font-size: 14px; }
.page-row a { overflow: hidden; text-overflow: ellipsis; }
.page-move { padding: 6px 10px; min-width: 34px; }
.page-row .btn[disabled] { opacity: .35; cursor: default; }
@media (max-width: 1280px) {
    .page-row { grid-template-columns: 40px 40px minmax(160px, 1fr) auto; }
    .page-row > a { display: none; }
}

/* ===== Шахматка v3: плитки-кнопки и модальные окна с информацией (23.10.2026) ===== */
.board-tile {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
    background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
    border: 1px solid rgba(255,255,255,.08);
    border-left: 3px solid var(--tile-accent, var(--gold));
    border-radius: 12px;
    padding: 10px 13px;
    transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.board-tile:hover {
    transform: translateY(-1px);
    border-color: rgba(212,175,55,.35);
    background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.03));
}
.board-tile:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.board-tile:active { transform: translateY(0); }
.board-tile-value { font-size: 21px; font-weight: 700; line-height: 1.2; color: var(--tile-accent, var(--gold)); }
.board-tile-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.board-tile-sub { font-size: 10.5px; color: rgba(255,255,255,.38); margin-top: 1px; }

.board-bar-meta { display: block; font-size: 9.5px; font-weight: 600; opacity: .72; line-height: 1.1;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-bar-initials { font-size: 10px; letter-spacing: .02em; }
.board-bar { padding: 4px 7px; box-sizing: border-box; overflow: hidden; white-space: nowrap;
    flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; }
.board-bar-name { display: block; max-width: 100%; line-height: 1.15; }

.info-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,.66);
    display: flex; align-items: center; justify-content: center; padding: 24px;
    animation: infoFade .14s ease;
}
@keyframes infoFade { from { opacity: 0; } to { opacity: 1; } }
.info-box {
    background: #1c1511;
    border: 1px solid rgba(212,175,55,.25);
    border-radius: 16px;
    width: 100%;
    max-width: 900px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 70px rgba(0,0,0,.55);
    overflow: hidden;
}
.info-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
    padding: 18px 20px 12px; border-bottom: 1px solid rgba(255,255,255,.07);
    background: rgba(255,255,255,.02);
}
.info-title { font-size: 19px; font-weight: 800; color: #fff; }
.info-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; }
.info-close { padding: 6px 12px; }
.info-body { padding: 6px 20px 18px; overflow: auto; }
.info-foot { padding: 12px 20px; border-top: 1px solid rgba(255,255,255,.07); font-size: 12.5px; color: var(--text-muted); }
.info-empty { padding: 26px 4px; color: var(--text-muted); font-size: 14px; }
.info-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.info-table th {
    text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em;
    color: var(--text-muted); padding: 8px 8px 6px 0; position: sticky; top: 0;
    background: #1c1511; z-index: 1;
}
.info-table td { padding: 8px 8px 8px 0; border-top: 1px solid rgba(255,255,255,.07); vertical-align: top; }
.info-table .num { text-align: right; white-space: nowrap; }
.info-table .nowrap { white-space: nowrap; }
.info-row { cursor: pointer; }
.info-row:hover td { background: rgba(212,175,55,.07); }
.info-row--day { cursor: pointer; }
.info-badge {
    display: inline-block; border-radius: 9px; padding: 2px 8px; font-size: 11px;
    color: #fff; white-space: nowrap;
}
.info-badge--ghost { background: rgba(255,255,255,.08); color: rgba(255,255,255,.8); }
.info-badge--warn { background: rgba(217,116,140,.24); color: #f0b7c6; }
.info-dim { color: var(--text-muted); font-size: 12px; }
.info-warn { color: #e5786f; font-weight: 600; }
.info-card-top { padding: 16px 0 8px; }
.info-guest { font-size: 22px; font-weight: 800; margin-top: 2px; }
.info-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0 26px; margin-top: 10px;
}
@media (max-width: 720px) { .info-grid { grid-template-columns: 1fr; } }
.info-line { display: flex; gap: 10px; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,.07); }
.info-k { width: 140px; flex: 0 0 140px; color: var(--text-muted); font-size: 12.5px; }
.info-v { flex: 1; font-size: 13px; overflow-wrap: anywhere; }
.info-assignbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.info-assign { font-size: 12.5px; padding: 6px 8px; }
.info-rooms { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-top: 12px; }
.info-room {
    border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 10px 12px;
    background: rgba(255,255,255,.03); font-size: 13px; line-height: 1.45;
}
.info-room--busy { border-color: rgba(212,175,55,.45); background: rgba(212,175,55,.09); }
.info-room-name { font-weight: 700; margin-bottom: 3px; }
.info-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 10px; margin: 14px 0 6px; }
.info-col { border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 10px 12px; background: rgba(255,255,255,.03); }
.info-num { font-size: 19px; font-weight: 700; color: var(--gold); }

/* ===== Шахматка v4 (23.10.2026): каналы как в TravelLine, строки «без номера», плавающие подписи ===== */
.board-bar { overflow: visible; }
.board-bar:hover { z-index: 8; }
.board-bar-name {
    position: relative;
    z-index: 3;
    display: inline-block;
    max-width: none;
    background: inherit;
    color: inherit;
    padding: 0 5px;
    border-radius: 6px;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .28);
}
.board-bar-meta { position: relative; z-index: 2; max-width: 100%; }
.board-bar--cancelled {
    background: #4b5155 !important;
    color: #e9e9e9 !important;
    background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.12) 0 6px, rgba(255,255,255,0) 6px 12px) !important;
}
.board-bar--cancelled .board-bar-name { text-decoration: line-through; }
.board-bar--new { box-shadow: inset 0 0 0 2px rgba(255,255,255,.6); }
.board-bar--no-show { box-shadow: inset 0 0 0 2px #ff8b80; }
.board-bar--unassigned { border: 1px dashed rgba(255,255,255,.7); }
.board-bar--sub { top: 4px; height: 26px; font-size: 11px; }

.board-row.board-subrow {
    min-height: 34px;
    background: rgba(255, 255, 255, .018);
    border-top: 1px dashed rgba(255, 255, 255, .1);
}
.board-label--sub {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted);
    padding-left: 22px;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
}
.board-sub-count {
    display: inline-block;
    min-width: 16px;
    padding: 0 5px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .08);
    font-size: 10px;
    text-align: center;
}
.board-chip--past { opacity: .55; }
.board-chip-past { font-size: 10px; color: #e5786f; margin-left: 4px; white-space: nowrap; }
.board-channel-legend {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 6px;
    font-size: 11.5px;
    color: var(--text-muted);
}
.board-channel-legend i {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    margin-right: 5px;
    vertical-align: middle;
}
.board-legend-sep { width: 1px; height: 12px; background: rgba(255,255,255,.15); display: inline-block; }

/* ===== Шахматка v5 (24.10.2026): доступность «1/0», теги, черновики, форма брони ===== */
.board-cell-num {
    display: block;
    font-size: 10.5px;
    line-height: 1;
    padding-top: 6px;
    text-align: center;
    color: rgba(255, 255, 255, .28);
    pointer-events: none;
}
.board-cell-num.is-busy { color: rgba(229, 120, 111, .75); font-weight: 700; }
.board-cell.is-busy { background: rgba(229, 120, 111, .07); }
.board-free .board-load-cell { background: rgba(143, 209, 143, .10); color: #a8e2a8; }
.board-free .board-load-cell.is-full { background: rgba(229, 120, 111, .28); color: #ffb4ab; font-weight: 700; }
.board-bar--draft { border: 2px dotted rgba(255, 255, 255, .85); }

.info-draft {
    margin: 4px 0 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(217, 116, 140, .14);
    border: 1px solid rgba(217, 116, 140, .45);
    color: #f2c3d0;
    font-size: 12.5px;
    line-height: 1.45;
}
/* «создал: кто, устройство, место» в карточке брони */
.info-attrib {
    margin: 10px 0 2px;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(127, 167, 217, .10);
    border: 1px solid rgba(127, 167, 217, .32);
    font-size: 12.5px;
    line-height: 1.45;
}
.info-draft--ok {
    background: rgba(63, 158, 107, .14);
    border-color: rgba(63, 158, 107, .45);
    color: #bfe8cf;
}
.info-tags { margin-top: 14px; }
.info-tags-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.info-tag-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.info-tag {
    font: inherit;
    font-size: 11.5px;
    padding: 2px 9px;
    border-radius: 9px;
    border: 1px solid rgba(212, 175, 55, .35);
    background: rgba(212, 175, 55, .12);
    color: #ecd9a6;
    cursor: pointer;
}
.info-tag:hover { background: rgba(217, 116, 140, .22); border-color: rgba(217, 116, 140, .5); color: #f0b7c6; }
.info-tag-add { display: flex; gap: 8px; margin-top: 8px; }

.info-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
    margin-top: 6px;
}
@media (max-width: 720px) { .info-form { grid-template-columns: 1fr; } }
.info-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-muted); }
.info-form-wide { grid-column: 1 / -1; }
.info-form input, .info-form select { font-size: 13.5px; }


/* ===== Комментарий с переводом ===== */
.info-orig-box { margin-top: 6px; }
.info-orig-box summary {
    cursor: pointer;
    font-size: 11.5px;
    color: var(--text-muted);
    list-style: none;
    display: inline-block;
    padding: 1px 8px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
}
.info-orig-box summary::-webkit-details-marker { display: none; }
.info-orig-box summary:hover { color: var(--gold); border-color: rgba(212, 175, 55, .4); }
.info-orig { margin-top: 6px; font-size: 12px; color: rgba(255, 255, 255, .62); line-height: 1.45; }