/* Бесшовный редактор CMS с компактной сбалансированной геометрией (max-width: 1060px) */
.material-symbols-outlined { font-family: "Material Symbols Outlined"; font-weight: normal; font-style: normal; font-size: 19px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; user-select: none; flex-shrink: 0; }
.lh-section-header, .lh-card-title, .lh-btn, .lh-subtab-btn, .lh-subtab-btn.is-active, .lh-badge, .lh-label { font-weight: 500 !important; }
.lh-btn-primary, .lh-btn-accent, .lh-btn-primary:hover, .lh-btn-accent:hover, .lh-avatar-lg, .lh-ai-orb, .lh-autonomy-node.is-active, .lh-kpi-card:hover { box-shadow: none !important; animation: none !important; transform: none !important; }

.lh-empty-state { grid-column: 1 / -1; width: 100%; min-height: 200px; padding: 28px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; color: var(--secondary-text); font-size: 13.5px; }
.lh-empty-state .material-symbols-outlined { font-size: 34px; opacity: 0.45; }
.lh-table td.lh-muted[colspan] { text-align: center !important; padding: 28px 16px !important; }

.lh-full-studio { position: relative; width: 100%; max-width: 1060px; margin: 0 auto; height: 100%; min-height: 0; background: transparent !important; border: 0 !important; display: flex; flex-direction: column; overflow: hidden; }
.lh-studio-header { min-height: 48px; padding: 4px 4px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; z-index: 30; flex-wrap: wrap; }
.lh-studio-modes { display: inline-flex; align-items: center; gap: 3px; padding: 4px; height: 40px; background: var(--surface); border-radius: 12px; }
.lh-studio-pill-btn { height: 40px !important; padding: 0 16px !important; border-radius: 12px !important; background: var(--surface) !important; color: var(--text) !important; font-size: 13px !important; }
.lh-studio-pill-btn:hover { background: var(--hover) !important; }
.lh-studio-body { position: relative; flex: 1; min-height: 0; width: 100%; max-width: 1020px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 636px) 336px; justify-content: center; gap: 24px; overflow: hidden; }
.lh-studio-body.is-single-col { grid-template-columns: minmax(0, 1020px); }

.lh-cms-drawer-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.16); backdrop-filter: blur(2px); z-index: 70; opacity: 0; pointer-events: none; transition: opacity 220ms var(--ease-apple); }
.lh-cms-drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }
.lh-cms-drawer { position: fixed; top: var(--shell-inset); bottom: var(--shell-inset); left: calc(var(--sidebar-width) + var(--shell-inset) + 10px); width: 320px; z-index: 75; background: var(--surface); border-radius: 20px; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12); display: flex; flex-direction: column; padding: 14px; gap: 10px; transform: translateX(-115%); opacity: 0; pointer-events: none; transition: transform 240ms var(--ease-apple), opacity 200ms ease; }
.lh-cms-drawer.is-open { transform: translateX(0); opacity: 1; pointer-events: auto; }
.lh-cms-drawer-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }

.lh-cms-screen-item { padding: 10px 12px; border-radius: 12px; background: var(--canvas); cursor: pointer; display: flex; align-items: center; gap: 10px; }
.lh-cms-screen-item:hover { background: var(--hover); }
.lh-cms-screen-item.is-active { background: var(--primary-soft); }
.lh-cms-screen-ico { width: 34px; height: 34px; border-radius: 10px; background: #ffffff; color: var(--primary); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.lh-cms-screen-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lh-cms-screen-meta strong, .lh-cms-screen-meta span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lh-cms-screen-meta strong { font-size: 13.5px; color: var(--text); }
.lh-cms-screen-meta span { font-size: 11.5px; color: var(--secondary-text); }
.lh-cms-del-btn { color: var(--secondary-text); opacity: 0.7; }
.lh-cms-del-btn:hover { opacity: 1; color: var(--semantic-err) !important; background: var(--semantic-err-bg) !important; }

.lh-cms-center-stage { flex: 1; min-height: 0; width: 100%; overflow-y: auto; padding: 4px 4px 86px 2px; display: flex; flex-direction: column; gap: 12px; position: relative; }
.lh-cms-meta-bar { display: grid; grid-template-columns: 170px 1fr 1.1fr; gap: 8px; align-items: center; }
.lh-cms-composer-surface { background: var(--surface); border-radius: 20px; padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 14px; }

.lh-cms-media-dropzone { position: relative; width: 100%; min-height: 76px; padding: 12px 16px; border-radius: 14px; background: var(--canvas); display: flex; align-items: center; justify-content: space-between; cursor: pointer; overflow: hidden; transition: background 120ms ease; }
.lh-cms-media-dropzone:hover, .lh-cms-media-dropzone.is-dragover { background: var(--hover); }
.lh-cms-media-dropzone.has-media { height: 200px; padding: 0; background: #141519; justify-content: center; }
.lh-cms-media-inner { width: 100%; height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px; position: relative; }
.lh-cms-media-dropzone.has-media .lh-cms-media-inner { justify-content: center; }
.lh-drop-lead { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lh-drop-ico-badge { width: 40px; height: 40px; border-radius: 11px; background: var(--surface); color: var(--text); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.lh-drop-texts { display: flex; flex-direction: column; gap: 2px; min-width: 0; text-align: left; }
.lh-drop-title { font-size: 13.5px; color: var(--text); }
.lh-drop-caption { font-size: 12px; color: var(--secondary-text); }
.lh-drop-action-pill { height: 32px; padding: 0 13px; border-radius: 9px; background: var(--surface); color: var(--text); font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
.lh-cms-media-preview-img { position: relative; z-index: 2; width: 100%; height: 100%; object-fit: contain; display: block; }
.lh-cms-media-actions { position: absolute; top: 10px; right: 10px; z-index: 5; display: flex; align-items: center; gap: 6px; }
.lh-cms-media-remove-btn { width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(28, 28, 30, 0.72); color: #ffffff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.lh-cms-media-remove-btn:hover { background: var(--semantic-err); }

.lh-cms-toolbar-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--divider); flex-wrap: wrap; }
.lh-cms-fmt-pill { display: inline-flex; align-items: center; gap: 2px; background: var(--canvas); padding: 3px; border-radius: 10px; }
.lh-cms-fmt-btn { height: 30px; width: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--text); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.lh-cms-fmt-btn:hover { background: var(--surface); color: var(--primary); }
.lh-cms-rich-surface { min-height: 148px; max-height: 280px; overflow-y: auto; padding: 6px 4px; font-size: 15px; line-height: 23px; color: var(--text); outline: 0; white-space: pre-wrap; word-break: break-word; }

.lh-cms-phone-stage { display: flex; flex-direction: column; align-items: center; padding-top: 4px; overflow: hidden; }
.lh-cms-phone-mockup { width: 324px; aspect-ratio: 9 / 19.5; max-height: calc(100dvh - 96px); border-radius: 40px; border: 7px solid #1c1c1e; background: #9ec28e; overflow: hidden; display: flex; flex-direction: column; }
.lh-cms-phone-screen { width: 100%; height: 100%; overflow: hidden; position: relative; }
.lh-cms-phone-screen .tma-chat-room { height: 100% !important; min-height: 0 !important; box-shadow: none !important; }

.lh-cms-unsaved-bar { position: fixed; left: calc(50% + 110px); bottom: 18px; transform: translate(-50%, 140%); width: min(580px, 90vw); z-index: 85; background: rgba(28, 28, 30, 0.94); backdrop-filter: blur(18px); color: #ffffff; padding: 10px 14px 10px 18px; border-radius: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; opacity: 0; pointer-events: none; transition: transform 240ms var(--ease-apple), opacity 200ms ease; }
.lh-cms-unsaved-bar.is-visible { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.lh-unsaved-reset-btn { background: rgba(255, 255, 255, 0.16) !important; color: #ffffff !important; }
.lh-events-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); gap: 14px; }
.lh-event-card { background: var(--surface); border-radius: 18px; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.lh-event-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--divider); }
.lh-event-route-row { display: grid; grid-template-columns: 168px 1fr auto; align-items: center; gap: 10px; padding: 8px 12px; background: var(--canvas); border-radius: 12px; }
