/* Шахматка, модалки (без scale-рывка, вызывавшего двойной hover), лайтбокс, тултипы и тосты */
.lh-chess-sheet { background: var(--surface); border: 1px solid var(--divider); border-radius: var(--radius-surface); display: flex; flex-direction: column; overflow: hidden; }
.lh-chess-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--divider); flex-wrap: wrap; }
.lh-chess-table-box { display: flex; flex-direction: column; position: relative; }
.lh-chess-header-wrap { position: sticky; top: 0; z-index: 30; overflow: hidden; background: var(--surface); border-bottom: 1px solid var(--divider); }
.lh-chess-body-wrap { overflow-x: auto; overflow-y: visible; user-select: none; position: relative; }
.lh-fixed-table { border-collapse: collapse; font-size: 12px; line-height: 16px; border: 0; table-layout: fixed; }
.lh-fixed-table th, .lh-fixed-table td { height: 37px; padding: 2px 4px; text-align: left; border: 0; border-bottom: 1px solid var(--divider); border-right: 1px solid var(--divider); vertical-align: middle; transition: background-color 110ms ease, color 110ms ease; }
.lh-col-apt { width: 224px; } .lh-col-day { width: var(--col-w, 80px); }
.lh-today-line { position: absolute; top: 0; bottom: 0; width: 2px; background: #ef4444; left: var(--today-line-x, calc(224px + (var(--today-col, 0) + var(--today-frac, 0.5)) * var(--col-w, 80px))); z-index: 26; pointer-events: none; transition: left 220ms linear; }
.lh-today-line-knob { position: absolute; top: -4px; left: -4px; width: 10px; height: 10px; border-radius: 50%; background: #ef4444; border: 2px solid #ffffff; }
.lh-today-badge { display: inline-block; background: #ef4444; color: #fff; font-size: 7.5px; font-weight: 700; padding: 1px 4px; border-radius: 3px; text-transform: uppercase; line-height: 10px; white-space: nowrap; }
.lh-today-head-pin { position: absolute; bottom: 0; left: var(--today-frac-pct, 50%); width: 6px; height: 6px; border-radius: 50%; background: #ef4444; transform: translate(-50%, 50%); pointer-events: none; z-index: 4; }
.lh-month-th { height: 24px !important; padding: 0 !important; overflow: hidden; position: relative; background: var(--surface) !important; border-bottom: 1px solid var(--divider); border-right: 1px solid var(--divider); }
.lh-month-ruler-track { position: absolute; inset: 0; pointer-events: none; display: flex; align-items: center; justify-content: center; }
.lh-month-line { position: absolute; left: 3px; right: 3px; height: 1px; background: var(--divider); top: calc(50% - 0.5px); }
.lh-month-tick { position: absolute; width: 1px; height: 4px; background: var(--muted-text); top: calc(50% - 2px); }
.lh-month-tick.is-left { left: 3px; } .lh-month-tick.is-right { right: 3px; }
.lh-month-label { position: relative; z-index: 2; display: inline-block; white-space: nowrap; font-size: 10.5px; font-weight: 600; color: var(--secondary-text); letter-spacing: 0.05em; text-transform: uppercase; padding: 0 8px; background: var(--surface); pointer-events: none; }
.lh-day-th { position: relative; height: 28px !important; padding: 1px 2px !important; text-align: center !important; background: var(--surface); width: var(--col-w, 80px); cursor: pointer; user-select: none; }
.lh-day-th:hover { background: var(--canvas); }
.lh-day-th.is-today { background: #fdecec; border-bottom: 2px solid #ef4444; }
.lh-day-th.is-weekend, .lh-day-th.is-weekend .lh-day-num, .lh-day-th.is-weekend .lh-day-weekday { color: #dc2626; }
.lh-day-weekday { display: block; font-size: 8.5px; font-weight: 600; text-transform: uppercase; line-height: 9px; color: var(--secondary-text); }
.lh-day-num { display: block; font-size: 10.5px; font-weight: 600; line-height: 12px; }
th.lh-apt-sticky-col[rowspan="2"], td.lh-apt-sticky-col { position: sticky; left: 0; background: var(--surface); width: 224px; min-width: 224px; max-width: 224px; }
th.lh-apt-sticky-col[rowspan="2"] { z-index: 45; padding: 0 10px !important; }
td.lh-apt-sticky-col { z-index: 32; cursor: pointer; padding: 3px 8px 3px 10px !important; }
.lh-apt-cell-inner { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; }
.lh-apt-cell-text { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lh-apt-cell-text strong { display: block; overflow: hidden; text-overflow: ellipsis; font-size: 12px; font-weight: 600; color: var(--text); }
.lh-apt-title-row { display: inline-flex !important; align-items: center; gap: 5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.lh-apt-title-row > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lh-apt-archive-lock { color: var(--muted-text); display: inline-flex; align-items: center; flex-shrink: 0; }
td.lh-apt-sticky-col.is-archived-apt .lh-apt-cell-text strong, td.lh-apt-sticky-col.is-archived-apt .lh-apt-title-row { color: var(--muted-text) !important; font-weight: 500; }
tr.is-archived-row td.lh-cell-free { color: #b4b4bd; background: var(--canvas); }
.lh-apt-info-btn { width: 22px; height: 22px; border-radius: 6px; border: 0; background: transparent; color: var(--secondary-text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0.6; flex-shrink: 0; }
td.lh-apt-sticky-col:hover .lh-apt-info-btn { opacity: 1; background: var(--field); color: var(--text); }

td.lh-cell-day-slot { position: relative; overflow: visible !important; }
.lh-day-price-lbl { pointer-events: none; transition: opacity 140ms ease; }
.lh-day-price-lbl.is-hidden-price { opacity: 0; visibility: hidden; }
.lh-day-price-lbl.is-morning-checkout { padding-left: 48%; font-size: 9.5px; text-align: right; padding-right: 3px; }
.lh-cell-free { background: var(--surface); cursor: pointer; text-align: center !important; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--secondary-text); font-weight: 500; font-size: 10.5px; }
.lh-cell-free.is-weekend-col { background: #fafafa; }
.lh-chess-table-box.is-smart-focus .lh-cell-free.is-base-rate { color: #b2b2bc; font-weight: 400; font-size: 10px; }
.lh-cell-free:hover { color: var(--text) !important; background: var(--hover) !important; font-weight: 600 !important; }
.lh-cell-closed { background: var(--semantic-err-bg); color: var(--semantic-err); cursor: pointer; text-align: center !important; font-variant-numeric: tabular-nums; font-size: 10.5px; }
.lh-cell-booked-td { background: var(--surface); padding: 4px 1px !important; cursor: pointer; vertical-align: middle; }
.lh-booking-pill { height: 26px; margin: 0 2px; padding: 0 8px; border-radius: 6px; background: #e0e7ff; color: #1e1b4b; font-weight: 600; font-size: 11px; display: flex; align-items: center; justify-content: space-between; gap: 6px; white-space: nowrap; overflow: hidden; border: 0 !important; }
.lh-booking-pill.is-timed-bar { position: absolute; top: 5px; height: 26px; margin: 0; z-index: 16; cursor: pointer; overflow: visible; transition: left 180ms var(--ease-apple), width 180ms var(--ease-apple), background-color 140ms ease; }
.lh-booking-pill.is-timed-bar.has-cleaning-pin { padding-right: 24px; }
.lh-pill-guest-name, .lh-booking-pill > span:first-child { overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; text-align: left; }
.lh-booking-pill.is-maint { background: var(--semantic-warn-bg); color: var(--semantic-warn); }
.lh-booking-pill.is-pill-highlighted:not(.is-maint) { background: #c7d2fe !important; color: #1e1b4b !important; z-index: 19; }
.lh-booking-pill.is-pill-selected:not(.is-maint) { background: #4f46e5 !important; color: #ffffff !important; z-index: 20; }
.lh-pill-meta { font-size: 10px; font-weight: 600; opacity: 0.78; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.lh-booking-cleaning-pin { position: absolute; right: -9px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #ffffff; background: var(--accent-primary); color: #ffffff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; z-index: 24; padding: 0; }
.lh-booking-cleaning-pin .material-symbols-outlined { font-size: 13px; line-height: 1; }
.lh-booking-cleaning-pin:hover { background: var(--primary); }

.lh-ctx-menu.is-flip-submenus .lh-ctx-submenu { left: auto; right: 100%; margin-left: 0; margin-right: 4px; }
.lh-ctx-menu.is-flip-submenus .lh-ctx-submenu::before { left: auto; right: -6px; }
.lh-ctx-submenu .lh-ctx-item.has-submenu:hover > .lh-ctx-submenu, .lh-ctx-submenu .lh-ctx-item.has-submenu.is-sub-open > .lh-ctx-submenu { opacity: 1; visibility: visible; pointer-events: auto; }

.lh-cross-row td:not(.lh-apt-sticky-col):not(.is-matrix-selected):not(.is-range-selected), .lh-cross-col:not(.is-axis-selected):not(.is-matrix-selected):not(.is-range-selected) { background: #f2f3f7 !important; color: var(--text) !important; }
.lh-cross-row td.lh-apt-sticky-col:not(.is-axis-selected) { background: #f2f3f7 !important; color: var(--text) !important; }
.lh-cross-active:not(.is-matrix-selected):not(.is-range-selected) { background: #e5e7ee !important; color: var(--text) !important; font-weight: 600 !important; }
th.lh-day-th.is-axis-selected, th.lh-day-th.is-today.is-axis-selected, td.lh-apt-sticky-col.is-axis-selected { background: #1d1d1f !important; color: #ffffff !important; }
tr.lh-cross-row td.lh-apt-sticky-col.is-axis-selected { background: #2e2e33 !important; color: #ffffff !important; }
th.lh-day-th.is-axis-selected .lh-day-weekday, th.lh-day-th.is-axis-selected .lh-day-num, .is-axis-selected strong, .is-axis-selected .lh-muted, .is-axis-selected .lh-apt-info-btn, .is-axis-selected .lh-apt-archive-lock { color: #ffffff !important; opacity: 1 !important; }
td.lh-apt-sticky-col.is-axis-selected .lh-apt-info-btn:hover { background: rgba(255, 255, 255, 0.16) !important; color: #ffffff !important; }
.is-matrix-selected { background: #dceafe !important; color: #1e3a8a !important; }
tr.lh-cross-row td.is-matrix-selected { background: #c7dffe !important; color: #1e3a8a !important; }
.is-range-selected { background: #dbeafe !important; color: #1e3a8a !important; outline: 1.5px solid #3b82f6; outline-offset: -1.5px; }
.is-panning, .is-panning * { cursor: grabbing !important; user-select: none !important; }
.is-panning .lh-chess-body-wrap table { pointer-events: none !important; }

@keyframes lhDockIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
.lh-selection-dock { position: fixed; bottom: 20px; left: 50%; transform: translate(-50%, 0); z-index: 140; background: #1d1d1f; border: 1px solid #333338; color: #fff; padding: 8px 10px 8px 16px; border-radius: var(--radius-pill); display: flex; align-items: center; gap: 8px; white-space: nowrap; animation: lhDockIn 180ms var(--ease-apple); }
.lh-selection-dock-meta { font-size: 13px; font-weight: 500; padding-right: 6px; display: flex; align-items: center; gap: 8px; }
.lh-selection-dock .lh-btn { transform: none !important; transition: background-color 110ms ease, color 110ms ease; }
.lh-selection-dock .lh-btn-secondary { background: #2f2f35; color: #ffffff; }
.lh-selection-dock .lh-btn-secondary:hover { background: #3f3f47; }
.lh-selection-dock .lh-btn-danger { background: #472124; color: #ff9c9c; }
.lh-selection-dock .lh-btn-danger:hover { background: #c92a2a; color: #ffffff; }
.lh-tt-box { display: flex; flex-direction: column; gap: 4px; padding: 2px 0; }
.lh-tt-row { display: flex; align-items: center; gap: 6px; font-size: 12px; line-height: 16px; color: #fff; white-space: nowrap; }

@keyframes lhMenuPop { from { opacity: 0; transform: translateY(-2px); } to { opacity: 1; transform: translateY(0); } }
.lh-ctx-menu { position: fixed; z-index: 620; min-width: 176px; width: max-content; max-width: 264px; background: var(--surface); border-radius: 12px; padding: 4px; display: flex; flex-direction: column; gap: 1px; }
.lh-ctx-header { padding: 6px 10px 5px; font-size: 11.5px; line-height: 15px; font-weight: 500; color: var(--secondary-text); border-bottom: 1px solid var(--divider); margin-bottom: 2px; display: flex; flex-direction: column; gap: 2px; }
.lh-ctx-header strong { color: var(--text); font-size: 12.5px; font-weight: 600; }
.lh-ctx-item { border: 0; background: transparent; color: var(--text); font-size: 13px; padding: 7px 10px; border-radius: 8px; text-align: left; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; white-space: nowrap; }
.lh-ctx-item-left { display: inline-flex; align-items: center; gap: 8px; }
.lh-ctx-item-ico { color: var(--text); display: inline-flex; opacity: 0.82; }
.lh-ctx-item:hover { background: var(--field); }
.lh-ctx-item.is-danger, .lh-ctx-item.is-danger .lh-ctx-item-ico { color: var(--semantic-err); opacity: 1; }
.lh-ctx-item:hover.is-danger { background: var(--semantic-err-bg); }

.lh-chat-stream { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px 2px; }
.lh-chat-msg { padding: 10px 12px; border-radius: 12px; background: var(--canvas); display: flex; flex-direction: column; gap: 4px; }
.lh-meter-track { width: 100%; height: 6px; background: var(--field); border-radius: var(--radius-pill); overflow: hidden; }
.lh-meter-fill { height: 100%; background: var(--accent-primary); border-radius: var(--radius-pill); transition: width 200ms var(--ease-apple); }

.lh-modal { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.34); display: flex !important; align-items: center; justify-content: center; z-index: 200; opacity: 1; visibility: visible; transition: opacity 150ms ease, visibility 150ms ease; }
.lh-modal.is-hidden { opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; }
.lh-modal.lh-modal-layer-2 { z-index: 260; background: rgba(15, 23, 42, 0.28); }
.lh-modal-card { background: var(--surface); border-radius: var(--radius-modal); width: min(680px, 94vw); max-height: 90dvh; overflow: hidden; padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; transition: opacity 140ms ease; }
.lh-modal.is-hidden .lh-modal-card { opacity: 0; }
.lh-modal-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-shrink: 0; padding-bottom: 2px; border: 0 !important; }
.lh-modal-title { font-size: 16.5px; font-weight: 600; letter-spacing: -0.015em; color: var(--text); }
.lh-modal-body { display: flex; flex-direction: column; gap: 14px; flex: 1; min-height: 0; max-height: calc(90dvh - 76px); overflow-y: auto; padding-right: 2px; }
.lh-confirm-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding-top: 6px; flex-wrap: wrap; }

.lh-doc-lightbox-stage { position: relative; }
.lh-gallery-lb-titles { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.lh-gallery-nav-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 20; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--divider); background: var(--surface); color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.lh-gallery-nav-btn:hover { background: var(--hover); }
.lh-gallery-nav-btn.is-prev { left: 22px; } .lh-gallery-nav-btn.is-next { right: 22px; }
.lh-gallery-filmstrip { padding: 10px 22px 16px; background: rgba(15, 23, 42, 0.72); display: flex; align-items: center; justify-content: center; gap: 8px; overflow-x: auto; flex-shrink: 0; }
.lh-gallery-thumb { position: relative; width: 68px; height: 50px; border-radius: 9px; border: 0; padding: 0; overflow: hidden; background: #1d1d1f; cursor: pointer; opacity: 0.52; flex-shrink: 0; }
.lh-gallery-thumb:hover { opacity: 0.85; }
.lh-gallery-thumb.is-active { opacity: 1; outline: 2px solid #ffffff; outline-offset: 1px; }
.lh-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lh-gallery-thumb span { position: absolute; right: 4px; bottom: 3px; font-size: 10px; font-weight: 600; color: #ffffff; background: rgba(0, 0, 0, 0.62); padding: 0 4px; border-radius: 4px; line-height: 14px; }

.lh-tooltip { position: fixed; background: #1d1d1f; color: #ffffff; padding: 6px 11px; border-radius: 9px; font-size: 12px; line-height: 16px; pointer-events: none; z-index: 980; max-width: 320px; }
.lh-toast-stack { position: fixed; bottom: 18px; right: 18px; display: flex; flex-direction: column; gap: 6px; z-index: 960; }
.lh-toast { background: #1d1d1f; color: #ffffff; padding: 9px 16px; border-radius: 10px; font-size: 13px; font-weight: 500; animation: lhMenuPop 160ms var(--ease-apple); }
