
        * { margin: 0; padding: 0; box-sizing: border-box; }
        :root {
            --bg: #0b0f1a;
            --card: #121a30;
            --text: #eaf0ff;
            --text-dim: #7c8db5;
            --accent: #7c3aed;
            --green: #22C55E;
            --red: #EF4444;
            --yellow: #EAB308;
            --blue: #7c3aed;
            --panel: #1a2340;
            --panel2: #1e2a4a;
            --panel3: #16203a;
            --panel-dark: #0a0f1e;
            --border: #1e2a4a;
            --border2: #2a3a5e;
            --border3: #1a2440;
            --danger-bg: #3a1a1a;
            --danger-text: #ef8888;
            --success-bg: #1a3a1a;
            --success-text: #7ee787;
        }
        mark.hl, .hl {
            background: #ffe58a !important;
            color: #000 !important;
            border-radius: 2px;
            padding: 0 1px;
        }
        /* === ТЕМЫ ОФОРМЛЕНИЯ === */
        /* Светлый деловой */
        body.theme-light-business {
            --bg: #f4f6fb; --card: #ffffff; --text: #16233b; --text-dim: #5b6b85;
            --accent: #2563eb; --blue: #2563eb;
            --green: #16A34A; --red: #DC2626; --yellow: #CA8A04;
            --panel: #eef3ff; --panel2: #e3e9f3; --panel3: #e8edf5; --panel-dark: #dde4ef;
            --border: #e3e9f3; --border2: #c8cdd4; --border3: #d0d5db;
            --danger-bg: #FDE8E8; --danger-text: #B91C1C;
            --success-bg: #E6F4EA; --success-text: #15803D;
        }
        /* Контрастный доступный */
        body.theme-contrast {
            --bg: #ffffff; --card: #ffffff; --text: #111111; --text-dim: #333333;
            --accent: #0a7d33; --blue: #0a7d33;
            --green: #0a7d33; --red: #c00000; --yellow: #8a6d00;
            --panel: #f0f0f0; --panel2: #e0e0e0; --panel3: #e8e8e8; --panel-dark: #d8d8d8;
            --border: #111111; --border2: #111111; --border3: #111111;
            --danger-bg: #ffe0e0; --danger-text: #c00000;
            --success-bg: #e0f5e6; --success-text: #0a7d33;
        }
        /* Деловой (как в макете с боковым меню) */
        body.theme-business {
            --bg: #0b0f1a; --card: #121a30; --text: #eaf0ff; --text-dim: #7c8db5;
            --accent: #7c3aed; --blue: #06b6d4;
            --panel: #1a2340; --panel2: #1e2a4a; --panel3: #16203a; --panel-dark: #0a0f1e;
            --border: #1e2a4a; --border2: #2a3a5e; --border3: #1a2440;
        }
        /* Увеличенный шрифт */
        body.large-font { font-size: 18px; }
        body.large-font .tab { font-size: 16px; }
        body.large-font .card h3 { font-size: 19px; }
        body.large-font .btn { font-size: 16px; }
        body {
            font-family: -apple-system, 'Segoe UI', Roboto, sans-serif;
            background: var(--bg);
            color: var(--text);
            min-height: 100vh;
        }
        /* Тонкие скроллбары под цвет темы (меню и все фреймы) */
        * { scrollbar-width: thin; scrollbar-color: var(--border2) transparent; }
        ::-webkit-scrollbar { width: 8px; height: 8px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }
        ::-webkit-scrollbar-thumb:hover { background: var(--accent); }
        ::-webkit-scrollbar-corner { background: transparent; }
        /* === LOGIN === */
        #login-screen {
            display: flex; justify-content: center;
            min-height: 100vh; padding: 20px; overflow-y: auto;
        }
        .login-card {
            background: var(--card); border-radius: 16px; padding: 40px;
            width: 100%; max-width: 380px; margin: auto;
        }
        .login-card h1 { font-size: 26px; margin-bottom: 8px; text-align: center; }
        .login-card p { color: var(--text-dim); margin-bottom: 24px; font-size: 14px; text-align: center; }
        .form-group { margin-bottom: 16px; }
        .form-group label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 6px; }
        .form-group input {
            width: 100%; padding: 12px 16px; background: var(--bg);
            border: 1px solid var(--border); border-radius: 8px; color: var(--text);
            font-size: 16px; outline: none;
        }
        .form-group input:focus { border-color: var(--accent); }
        .btn {
            width: 100%; padding: 14px; background: var(--accent); color: #fff;
            border: none; border-radius: 8px; font-size: 16px; font-weight: 600;
            cursor: pointer; transition: opacity 0.2s;
        }
        .btn:hover { opacity: 0.9; }
        .btn:disabled { opacity: 0.5; cursor: not-allowed; }
        .btn-secondary { background: var(--panel2); color: var(--text); }
        .btn-sm { width: auto; padding: 8px 16px; font-size: 14px; }
        .btn-danger { background: var(--red); color: #fff; }
        .ud-tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
        .ud-tab {
            flex: 1; min-width: 120px; padding: 12px 10px; border: 1px solid var(--border);
            border-radius: 8px; background: var(--panel2); color: var(--text);
            font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s; text-align: center;
        }
        .ud-tab:hover { border-color: var(--blue); }
        .ud-tab.active { background: var(--accent); color: #fff; border-color: transparent; }
        .error { color: var(--red); font-size: 14px; margin-top: 12px; display: none; }

        /* === APP === */
        #app { display: none; }
        /* === БОКОВАЯ ПАНЕЛЬ === */
        .sidebar {
            width: 240px; flex-shrink: 0; background: var(--card); border-right: 1px solid var(--line);
            display: flex; flex-direction: column; height: 100vh; position: fixed; left: 0; top: 0; z-index: 100;
        }
        .sb-brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px; border-bottom: 1px solid var(--line); }
        .sb-brand img { width: 34px; height: 34px; border-radius: 8px; }
        .sb-brand .sb-name { font-size: 17px; font-weight: 800; }
        .sb-nav { flex: 1; overflow-y: auto; padding: 6px 8px; }
        .sb-item {
            display: flex; align-items: center; gap: 12px; padding: 6px 12px; border-radius: 8px;
            color: var(--dim); font-size: 13px; font-weight: 600; cursor: pointer; margin-bottom: 1px;
            transition: all .15s; white-space: nowrap; border: none; background: transparent; width: 100%; text-align: left;
        }
        .sb-item .ic { width: 24px; text-align: center; flex-shrink: 0; filter: grayscale(1); transition: filter .2s; }
        .sb-item .txt { flex: 1; }
        .sb-item:hover { background: var(--panel); color: var(--text); }
        .sb-item:hover .ic { filter: grayscale(0); }
        .sb-item.active { background: var(--accent); color: #fff; }
        .sb-item.active .ic { filter: grayscale(0); }
        /* Группа меню «Кадровая работа» (сворачиваемый родитель) */
        .sb-group { margin-bottom: 2px; }
        .sb-group-toggle {
            display: flex; align-items: center; gap: 12px; padding: 6px 12px; border-radius: 8px;
            color: var(--dim); font-size: 13px; font-weight: 700; cursor: pointer; margin-bottom: 1px;
            transition: all .15s; white-space: nowrap; border: none; background: transparent; width: 100%; text-align: left;
        }
        .sb-group-toggle:hover { background: var(--panel); color: var(--text); }
        .sb-group-toggle .ic { width: 24px; text-align: center; flex-shrink: 0; filter: grayscale(1); transition: filter .2s; }
        .sb-group-toggle:hover .ic { filter: grayscale(0); }
        .sb-group-chev { margin-left: auto; font-size: 12px; transition: transform .2s; color: var(--dim); flex-shrink: 0; }
        .sb-group.open .sb-group-chev { transform: rotate(180deg); }
        .sb-group-children { display: none; }
        .sb-group.open .sb-group-children { display: block; }
        .sb-group-children .sb-item { padding-left: 26px; font-weight: 500; }
        /* Перетаскиваемая разделительная полоса меню */
        .sb-sep {
            height: 3px; margin: 4px 8px; border-radius: 2px; cursor: row-resize;
            background: var(--accent); opacity: .45; display: flex; align-items: center; justify-content: center;
            transition: opacity .15s;
        }
        .sb-sep::after { content: '⋮'; color: var(--accent); font-size: 9px; line-height: 1; }
        .sb-sep:hover { opacity: .9; }
        .sb-sep.dragging { opacity: .35; }
        /* Точное соответствие макету для темы «Деловая» */
        body.theme-business .sb-item { color: var(--dim); font-weight: 400; }
        body.theme-business .sb-item:hover { background: var(--panel); color: var(--text); }
        body.theme-business .sb-item.active { background: var(--accent); color: var(--text); }
        body.theme-business .sb-item.active .ic { filter: grayscale(0); }
        body.theme-light-business .sb-item { color: var(--dim); font-weight: 400; }
        body.theme-light-business .sb-item:hover { background: var(--panel); color: var(--text); }
        body.theme-light-business .sb-item.active { background: var(--accent); color: #fff; }
        body.theme-light-business .sb-item.active .ic { filter: grayscale(0); }
        body.theme-contrast .sb-item { color: var(--dim); font-weight: 400; }
        body.theme-contrast .sb-item:hover { background: var(--panel); color: var(--text); }
        body.theme-contrast .sb-item.active { background: var(--accent); color: #fff; }
        body.theme-contrast .sb-item.active .ic { filter: grayscale(0); }
        .sb-foot { padding: 12px; border-top: 1px solid var(--line); }
        .sb-foot .user { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; background: var(--panel); }
        .sb-foot .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
        .sb-foot .uname { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .sb-foot .urole { font-size: 11px; color: var(--dim); }
        .avatar-menu {
            position: absolute; left: 0; bottom: calc(100% + 6px); background: var(--panel2);
            border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.4);
            min-width: 200px; width: calc(100% + 60px); z-index: 200; display: none; overflow: hidden;
        }
        .avatar-menu.open { display: block; }
        .avatar-menu button {
            display: block; width: 100%; text-align: left; padding: 12px 16px;
            background: transparent; color: var(--text); border: none; cursor: pointer; font-size: 14px;
            border-bottom: 1px solid var(--line);
        }
        .avatar-menu button:hover { background: var(--panel2); }
        .avatar-menu button:last-child { border-bottom: none; }

        /* === ОСНОВНАЯ ОБЛАСТЬ === */
        .main { margin-left: 240px; flex: 1; display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
        /* Ручка изменения ширины меню (перетаскивание за край) */
        .sb-resize { position: absolute; right: -4px; top: 0; width: 8px; height: 100%; cursor: col-resize; z-index: 101; background: var(--border); opacity: .55; }
        .sb-resize:hover, .sb-resize.active { background: var(--accent); opacity: .85; }
        .sb-item.dragging, .sb-group.dragging { opacity: .5; }
        .cleaner-mode .sb-resize { display: none; }
        .topbar {
            display: flex; align-items: center; justify-content: space-between; gap: 12px;
            padding: 12px 20px; background: var(--card); border-bottom: 1px solid var(--line); flex-shrink: 0;
        }
        .topbar-title { font-size: 18px; font-weight: 700; }
        .topbar-view { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
        .topbar-add-btn { background: var(--accent); color: #fff; border: none; width: 30px; height: 30px; border-radius: 50%; font-size: 20px; line-height: 1; cursor: pointer; margin-left: 0; font-weight: 700; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
        .topbar-add-btn:hover { opacity: 0.9; }
        .topbar .topbar-right { display: flex; align-items: center; gap: 10px; }
        .topbar button { background: var(--panel); color: var(--text); border: none; padding: 8px 14px; border-radius: 8px; cursor: pointer; font-size: 14px; }
        .topbar-actions { display: flex; align-items: center; gap: 8px; }
        .topbar-actions .btn { height: 36px; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; padding: 0 16px; }
        .topbar-actions .btn { background: var(--accent); color: #fff; font-weight: 600; }
        .topbar-actions .btn:hover { opacity: 0.9; }
        /* Контекстная подсказка «?» (путеводитель) */
        .guide-hint-wrap { position: relative; display: inline-flex; }
        .guide-hint-btn {
            width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border);
            background: var(--panel); color: var(--accent); font-weight: 800; font-size: 16px;
            cursor: help; display: inline-flex; align-items: center; justify-content: center;
            transition: all .15s;
        }
        .guide-hint-btn:hover { background: var(--accent); color: #fff; }
        .guide-hint-popup {
            position: absolute; right: 0; top: calc(100% + 8px); width: 320px;
            background: #f4f6fb; color: #16233b; border-radius: 12px;
            box-shadow: 0 10px 28px rgba(0,0,0,.3); padding: 14px 16px;
            display: none; z-index: 300; font-size: 13px; line-height: 1.5;
        }
        .guide-hint-popup.show { display: block; }
        .guide-hint-popup h4 { margin: 0 0 6px; font-size: 14px; color: #16233b; }
        .guide-hint-popup ul { margin: 6px 0 0; padding-left: 18px; }
        .guide-hint-popup li { margin: 3px 0; }
        .cleaner-mode .guide-hint-wrap { display: none; }
        .gear-wrap { position: relative; }
        .gear-menu {
            position: absolute; right: 0; top: calc(100% + 6px);
            background: var(--card); border: 1px solid var(--border); border-radius: 10px;
            box-shadow: 0 8px 24px rgba(0,0,0,0.4); min-width: 180px; z-index: 200;
            display: none; overflow: hidden;
        }
        .gear-menu.open { display: block; }
        .gear-menu button {
            display: block; width: 100%; text-align: left; padding: 12px 16px;
            background: transparent; color: var(--text); border: none; cursor: pointer;
            font-size: 14px; border-bottom: 1px solid var(--border3);
        }
        .gear-menu button:hover { background: var(--panel2); }
        .gear-menu button:last-child { border-bottom: none; }

        .container { padding: 20px; flex: 1; overflow-y: auto; }
        .tab-spacer { flex: 1; }
        .tab-right { margin-left: auto; }
        /* === МОБИЛЬНЫЕ ВКЛАДКИ (выпадающее меню) === */
        .mobile-tabs { position: relative; }
        .mobile-tabs-btn {
            background: var(--accent); color: #fff; border: none;
            padding: 10px 16px; border-radius: 8px; cursor: pointer;
            font-size: 14px; font-weight: 600; white-space: nowrap;
            display: flex; align-items: center; gap: 8px;
        }
        .mobile-tabs-menu {
            position: absolute; left: 0; top: calc(100% + 6px);
            background: var(--card); border: 1px solid var(--border); border-radius: 10px;
            box-shadow: 0 8px 24px rgba(0,0,0,0.4); min-width: 240px; z-index: 200;
            display: none; overflow: hidden; max-height: 70vh; overflow-y: auto;
        }
        .mobile-tabs-menu.show { display: block; }
        .mobile-tab-item {
            display: block; width: 100%; text-align: left; padding: 12px 16px;
            background: transparent; color: var(--text); border: none; cursor: pointer;
            font-size: 14px; border-bottom: 1px solid var(--border3);
        }
        .mobile-tab-item:hover { background: var(--panel2); }
        .mobile-tab-item.active { background: var(--accent); color: #fff; }
        .mobile-tab-item:last-child { border-bottom: none; }

        /* === CARDS === */
        .card {
            background: var(--card); border-radius: 12px; padding: 20px;
            margin-bottom: 16px;
        }
        .card h3 { font-size: 16px; margin-bottom: 12px; }

        /* === TABLE === */
        table { width: 100%; border-collapse: collapse; }
        th { text-align: left; padding: 10px; color: var(--text-dim); font-size: 13px;
             border-bottom: 1px solid #333; }
        td { padding: 10px; border-bottom: 1px solid #2a2e35; font-size: 14px; }
        tr:hover { background: rgba(255,255,255,0.03); }
        .report-table { display: block; overflow-x: auto; white-space: nowrap; }
        .report-table th, .report-table td { padding: 8px 12px; }
        .search-wrap { position: relative; display: flex; align-items: center; }
        .search-wrap input { padding-right: 30px !important; }
        .search-clear {
            position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
            width: 20px; height: 20px; border: none; cursor: pointer;
            background: transparent; color: #9e9e9e; font-size: 15px; line-height: 1;
            display: flex; align-items: center; justify-content: center; padding: 0;
        }
        .search-clear:hover { color: var(--accent); }

        /* === STATUS BADGES === */
        .badge {
            display: inline-block; padding: 4px 10px; border-radius: 20px;
            font-size: 12px; font-weight: 600;
        }
        .badge-active { background: rgba(59,130,246,0.2); color: var(--blue); }
        .badge-completed { background: rgba(34,197,94,0.2); color: var(--green); }
        .badge-planned { background: rgba(154,163,173,0.2); color: var(--text-dim); }
        .badge-error { background: rgba(239,68,68,0.2); color: var(--red); }
        .badge-in_progress { background: rgba(59,130,246,0.2); color: var(--blue); }
        .badge-pending { background: rgba(154,163,173,0.2); color: var(--text-dim); }
        .badge-paused { background: rgba(251,191,36,0.2); color: #fbbf24; }

        /* === TREE === */
        .tree-node { margin-bottom: 2px; }
        .tree-header {
            display: flex; align-items: center; gap: 6px;
            padding: 6px 8px; border-radius: 6px;
            cursor: pointer; user-select: none;
            transition: background 0.15s;
        }
        .tree-header:hover { background: rgba(255,255,255,0.05); }
        .tree-toggle {
            display: inline-flex; align-items: center; justify-content: center;
            width: 20px; height: 20px; font-size: 12px;
            color: var(--text-dim); transition: transform 0.2s;
            flex-shrink: 0;
        }
        .tree-toggle.collapsed { transform: rotate(-90deg); }
        .tree-toggle.no-children { visibility: hidden; }
        .tree-children { overflow: hidden; }
        .tree-children.collapsed { display: none; }
        .tree-actions { display: flex; gap: 4px; margin-left: auto; }
        .tree-area-item {
            display: flex; align-items: center; gap: 4px;
            padding: 4px 8px 4px 28px;
            font-size: 13px; color: var(--text-dim);
        }
        .floor-areas-grid {
            display: grid; gap: 2px 8px; padding: 4px 8px;
        }
        .floor-areas-grid[data-cols="1"] { grid-template-columns: 1fr; }
        .floor-areas-grid[data-cols="2"] { grid-template-columns: repeat(2, 1fr); }
        .floor-areas-grid[data-cols="3"] { grid-template-columns: repeat(3, 1fr); }
        .floor-areas-grid[data-cols="4"] { grid-template-columns: repeat(4, 1fr); }

        /* === PROGRESS BAR === */
        .progress-bar {
            width: 100%; height: 8px; background: var(--panel2); border-radius: 4px;
            overflow: hidden; margin-top: 6px;
        }
        .progress-fill { height: 100%; background: var(--accent); transition: width 0.3s; }

        /* === MOBILE === */
        .mobile-only { display: none; }
        @media (max-width: 768px) {
            .mobile-only { display: block; }
            .desktop-only { display: none; }
            .container { padding: 12px; }
            .tabs { overflow-x: auto; flex-wrap: nowrap; }
            .tab { white-space: nowrap; }
            table { font-size: 13px; }
            th, td { padding: 6px; }
            .areas-grid { grid-template-columns: 1fr; }
        }
        @media (min-width: 769px) and (max-width: 1024px) {
            .areas-grid { grid-template-columns: repeat(2, 1fr); }
        }
        @media (min-width: 1025px) {
            .areas-grid { grid-template-columns: repeat(3, 1fr); }
        }
        @media (min-width: 1400px) {
            .areas-grid { grid-template-columns: repeat(4, 1fr); }
        }

        /* === РЕЖИМ КЛИНЕРА (мобильный) === */
        .app-footer { display: none; }
        .cleaner-mode .sidebar { display: none; }
        .cleaner-mode .main { margin-left: 0; }
        .cleaner-mode .topbar { display: flex; }
        .cleaner-mode .tabs { display: none; }
        .cleaner-mode .topbar-right { display: flex; align-items: center; gap: 8px; padding: 0 12px; }
        .cleaner-mode .gear-wrap { display: none; }
        .profile-btn { display: none; width: 40px; height: 40px; border-radius: 10px; background: var(--panel); color: var(--text); border: none; font-size: 20px; cursor: pointer; align-items: center; justify-content: center; }
        .cleaner-mode .profile-btn { display: flex; }
        .school-expand-btn { display: none; width: 40px; height: 40px; border-radius: 10px; background: var(--panel); color: var(--text); border: none; font-size: 18px; cursor: pointer; align-items: center; justify-content: center; margin-left: 8px; }
        .cleaner-mode .school-expand-btn { display: flex; }
        .cleaner-mode .app-footer {
            display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
            background: var(--card); border-top: 1px solid var(--border); padding: 6px 10px; gap: 8px;
            padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
        }
        .cleaner-mode .app-footer .footer-btn {
            flex: 1; padding: 14px 0; text-align: center; font-weight: 700; font-size: 15px;
            background: var(--panel); border: none; border-radius: 10px; color: var(--text-dim); cursor: pointer;
        }
        .cleaner-mode .app-footer .footer-btn.active { background: var(--accent); color: #fff; }
        .cleaner-mode .container { padding-bottom: 80px; }
        .cleaner-mode .chat-main { padding-bottom: 80px; }
        @media (max-width: 768px) {
            #staff-filter-select { display: block !important; }
            .staff-filter-checkboxes { display: none !important; }
            .tc-controls { flex-direction: column; align-items: stretch; width: 100%; }
            .tc-controls .tc-group { width: 100%; }
        }

        /* === SHIFT AREA === */
        .areas-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
            gap: 10px;
        }
        @media (max-width: 600px) {
            .areas-grid { grid-template-columns: 1fr; }
        }
        @media (min-width: 601px) and (max-width: 900px) {
            .areas-grid { grid-template-columns: repeat(2, 1fr); }
        }
        @media (min-width: 901px) and (max-width: 1400px) {
            .areas-grid { grid-template-columns: repeat(3, 1fr); }
        }
        @media (min-width: 1401px) {
            .areas-grid { grid-template-columns: repeat(4, 1fr); }
        }
        .area-item {
            background: var(--card); border-radius: 14px; padding: 20px 16px;
            display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center;
            border: 1px solid var(--border); transition: all .3s;
        }
        .area-item.area-current { background: var(--panel); border: 2px solid var(--accent); }
        .area-item.area-inactive { opacity: .55; }
        .area-item.area-completed { opacity: .5; }
        .area-item.area-fade-out { opacity: 0; transition: opacity 5s ease; }
        .area-item .area-num { font-size: 15px; font-weight: 700; color: var(--accent); }
        .area-item .area-name-text { font-size: 20px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; word-break: break-word; }
        .area-item .area-sub { font-size: 15px; color: var(--text-dim); word-break: break-word; }
        .area-item .area-size { font-size: 15px; color: var(--text-dim); }
        .area-item .area-action { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
        .area-item .area-action .btn { font-size: 16px; padding: 14px 22px; min-height: 52px; }
        /* Горизонтальный режим: участок на всю ширину экрана */
        @media (orientation: landscape) {
            .cleaner-mode .areas-grid { grid-template-columns: 1fr; }
            .cleaner-mode .area-item { width: 100%; max-width: 100%; }
        }
        /* Логотип РОБИТ в шапке клинера (только логотип, без надписи) */
        .cleaner-mode .cleaner-logo { display: block !important; }
        .cleaner-mode #tab-title { display: none; }
        .area-item .area-tools { display: flex; gap: 8px; }
        .area-timer {
            width: 100%; font-size: 15px; font-weight: 700; text-align: center;
            padding: 8px 10px; border-radius: 10px; margin-top: 2px;
        }
        .area-timer-ok { background: rgba(34,197,94,0.12); color: var(--green); border: 1px solid rgba(34,197,94,0.35); }
        .area-timer-over { background: rgba(239,68,68,0.12); color: var(--red); border: 1px solid rgba(239,68,68,0.35); }
        .inline-checklist { width: 100%; overflow: hidden; transition: max-height .3s ease, opacity .3s ease; max-height: 0; opacity: 0; }
        .inline-checklist.open { max-height: 600px; opacity: 1; }
        /* Кнопка «I» — инструкция: квадратная */
        .area-item .area-instr-btn {
            width: 34px; height: 34px; flex: none;
            border-radius: 8px; border: 1px solid var(--accent); background: transparent;
            color: var(--accent); font-size: 17px; font-weight: 700; cursor: pointer;
            line-height: 1; display: inline-flex; align-items: center; justify-content: center;
        }
        /* === ПЕРЕХОД МЕЖДУ УЧАСТКАМИ (прогресс-бар) === */
        .area-transition {
            display: flex; flex-direction: column; gap: 6px; padding: 6px 2px;
        }
        .area-transition .at-label {
            font-size: 12px; color: var(--text-dim); display: flex; justify-content: space-between; align-items: center;
        }
        .area-transition .at-bar {
            width: 100%; height: 10px; border-radius: 6px; background: var(--panel2);
            overflow: hidden; position: relative;
        }
        .area-transition .at-fill {
            height: 100%; width: 0; border-radius: 6px;
            background: linear-gradient(90deg, var(--accent), #7dd3fc);
            transition: width 0.1s linear;
        }
        /* === ПОЛНОЭКРАННОЕ МОДАЛЬНОЕ ОКНО === */
        .modal-fullscreen .modal {
            width: 100%; max-width: 100%; height: 100%; max-height: 100%;
            border-radius: 0; padding: 20px;
        }

        .timer {
            font-size: 32px; font-weight: 700; text-align: center;
            padding: 20px; color: var(--accent);
        }
        .stats-row {
            display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
        }
        .stat-card {
            background: var(--card); border-radius: 12px; padding: 16px;
            flex: 1; min-width: 140px; text-align: center;
        }
        .stat-card .stat-value { font-size: 28px; font-weight: 700; color: var(--accent); }
        .stat-card .stat-label { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

        .empty-state { text-align: center; padding: 40px; color: var(--text-dim); }

        select, textarea {
            width: 100%; padding: 10px 14px; background: var(--bg);
            border: 1px solid var(--border); border-radius: 8px; color: var(--text);
            font-size: 14px; outline: none;
        }
        select:focus, textarea:focus { border-color: var(--accent); }
        .form-row { display: flex; gap: 12px; flex-wrap: wrap; }
        .form-row .form-group { flex: 1; min-width: 200px; }

        .photo-preview {
            max-width: 200px; max-height: 200px; border-radius: 8px;
            margin-top: 8px;
        }
        .modal-overlay {
            display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0,0,0,0.7); justify-content: center; align-items: flex-start;
            padding: 24px 0; overflow-y: auto;
            z-index: 200;
        }
        .modal-overlay.show { display: flex; }
        .modal {
            background: var(--card); border-radius: 16px; padding: 24px;
            width: 92%; max-width: 720px; max-height: 92vh; overflow: auto;
            position: relative; resize: both; min-width: 320px; min-height: 240px;
        }
        .modal-lg { max-width: 1100px; width: 96%; max-height: 96vh; }
        .modal h3 { margin-bottom: 16px; }
        .modal-close { float: right; cursor: pointer; color: var(--text-dim); font-size: 20px; }
        .modal-close-btn {
            position: absolute; top: 12px; right: 12px; z-index: 5;
            width: 32px; height: 32px; border-radius: 8px; border: none;
            background: rgba(255,255,255,0.06); color: var(--text-dim);
            font-size: 18px; line-height: 1; cursor: pointer;
            display: flex; align-items: center; justify-content: center;
            transition: all 0.15s;
        }
        .modal-close-btn:hover { background: rgba(255,255,255,0.14); color: #fff; }
        @keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
        .mini-frame-hover {
            position: fixed; right: 0; top: 0; width: 14px; height: 100%;
            z-index: 299; cursor: pointer;
        }
        .mini-frame-tab {
            position: fixed; right: 0; top: 50%; transform: translateY(-50%);
            background: var(--accent); color: #fff; border-radius: 10px 0 0 10px;
            padding: 12px 5px; cursor: pointer; z-index: 301;
            font-size: 12px; font-weight: 700; text-align: center;
            box-shadow: -2px 0 10px rgba(0,0,0,0.35);
            transition: opacity 0.3s, transform 0.3s;
            writing-mode: vertical-rl;
        }
        .mini-frame-tab:hover { transform: translateY(-50%) translateX(-4px); }
        .mini-frame {
            position: fixed; right: 0; top: 50%; transform: translateY(-50%) translateX(100%);
            width: 230px; max-height: 72vh; overflow-y: auto;
            background: var(--card); border: 1px solid var(--border); border-radius: 12px 0 0 12px;
            box-shadow: -6px 0 24px rgba(0,0,0,0.35);
            z-index: 300; padding: 10px;
            transition: transform 0.3s ease, opacity 0.3s ease;
            opacity: 0; pointer-events: none;
        }
        .mini-frame.visible { opacity: 1; transform: translateY(-50%) translateX(0); pointer-events: auto; }
        .mini-frame-title { font-size: 12px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; margin-bottom: 8px; }
        .mini-frame-item {
            padding: 8px 10px; border-radius: 8px; background: var(--panel);
            margin-bottom: 6px; cursor: pointer; font-size: 12px;
            border: 1px solid var(--border); transition: border-color 0.15s, transform 0.15s;
        }
        .mini-frame-item:hover { border-color: var(--accent); transform: translateX(-3px); }
        .mini-frame-item .mf-close {
            float: right; cursor: pointer; color: var(--text-dim); font-size: 14px;
            padding: 0 4px; border-radius: 4px; line-height: 1;
        }
        .mini-frame-item .mf-close:hover { color: var(--danger-text); background: var(--danger-bg); }
        /* Скрепка (мини-фрейм) скрыта по умолчанию; показывается только классом show-miniframe на body */
        .mini-frame-hover, .mini-frame-tab, .mini-frame { display: none !important; }
        body.show-miniframe .mini-frame-hover,
        body.show-miniframe .mini-frame-tab,
        body.show-miniframe .mini-frame { display: block !important; }
        .tc-step-break { background: rgba(76, 175, 80, 0.16) !important; border-left: 3px solid #4CAF50; }
        .tc-step-move {
            background: linear-gradient(90deg, rgba(255,193,7,0.18), rgba(255,193,7,0.05), rgba(255,193,7,0.18)) !important;
            background-size: 200% 100% !important;
            animation: tcMoveGrad 3s ease infinite;
            border-left: 3px solid #FFC107;
        }
        .tc-step-water {
            background: linear-gradient(90deg, rgba(33,150,243,0.18), rgba(33,150,243,0.05), rgba(33,150,243,0.18)) !important;
            background-size: 200% 100% !important;
            animation: tcWaterGrad 4s ease infinite;
            border-left: 3px solid #2196F3;
        }
        @keyframes tcMoveGrad { 0% { background-position: 0% 0; } 100% { background-position: 200% 0; } }
        @keyframes tcWaterGrad { 0% { background-position: 0% 0; } 100% { background-position: 200% 0; } }
        .tc-steps-anim { animation: tcStepsIn 0.3s ease; }
        @keyframes tcStepsIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
        @keyframes tcImportIndet { 0% { width: 20%; } 50% { width: 70%; } 100% { width: 20%; } }
        .modal-sub { font-size: 12px; color: var(--text-dim); margin: -8px 0 14px; line-height: 1.4; }
        .photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
        .photo-card {
            background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
            overflow: hidden; cursor: pointer; transition: all 0.15s;
        }
        .photo-card:hover { border-color: var(--accent); transform: translateY(-2px); }
        .photo-thumb { aspect-ratio: 4/3; background: var(--panel-dark); overflow: hidden; }
        .photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
        .photo-meta { padding: 8px 10px; }
        .pm-row { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; padding: 2px 0; }
        .pm-row .pm-k { color: var(--text-dim); font-weight: 600; flex: none; }
        .pm-row .pm-v { color: var(--text); font-weight: 700; text-align: right; }
        .photo-viewer { background: var(--panel-dark); border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
        .photo-viewer img { width: 100%; display: block; }
        .instr-list { display: flex; flex-direction: column; gap: 8px; }
        .instr-item {
            display: flex; align-items: center; gap: 12px; padding: 11px 12px;
            border-radius: 10px; background: var(--panel); border: 1px solid var(--border);
            cursor: pointer; transition: all 0.15s;
        }
        .instr-item:hover { border-color: var(--accent); }
        .instr-ic { width: 38px; height: 38px; border-radius: 9px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 19px; background: var(--panel2); }
        .instr-info { flex: 1; min-width: 0; }
        .instr-t { font-weight: 700; font-size: 13px; }
        .instr-s { font-size: 11px; color: var(--text-dim); margin-top: 2px; line-height: 1.4; }
        .instr-arrow { color: var(--text-dim); font-size: 18px; flex: none; }
        .instr-steps { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
        .instr-step { display: flex; gap: 10px; font-size: 12.5px; line-height: 1.5; padding: 8px 10px; background: var(--panel); border: 1px solid var(--border); border-radius: 9px; }
        .instr-step .is-n { flex: none; width: 20px; height: 20px; border-radius: 6px; background: var(--accent); color: #fff; font-weight: 800; font-size: 11px; display: flex; align-items: center; justify-content: center; }
        .instr-warn { font-size: 12px; color: #ffb74d; line-height: 1.5; margin-top: 10px; padding: 10px 12px; background: rgba(255,183,77,0.08); border: 1px solid rgba(255,183,77,0.25); border-radius: 9px; }
        .instr-phone { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; padding: 7px 0; border-bottom: 1px dashed var(--border); }
        .instr-phone:last-child { border-bottom: none; }
        .instr-phone .ip-num { font-weight: 800; color: var(--accent); }
        .instr-phone .ip-lbl { color: var(--text-dim); }
    
/* Мониторинг и персонал — компактные стили */
.mon-header:hover { background:var(--panel2) !important; }
.staff-info-box { background:var(--panel); border-radius:6px; padding:8px 12px; display:flex; flex-direction:column; gap:2px; }
.staff-info-label { font-size:11px; color:var(--text-dim); text-transform:uppercase; letter-spacing:0.5px; }
.staff-info-value { font-size:14px; }
.stat-mini { background:var(--panel); border-radius:6px; padding:8px; text-align:center; }
.stat-mini-val { font-size:18px; font-weight:700; color:var(--accent); }
.stat-mini-label { font-size:11px; color:var(--text-dim); margin-top:2px; }

/* === МОНИТОРИНГ: переключатель Список/Блок === */
.mon-view-toggle { display:flex; gap:6px; }
.mon-view-toggle .btn { width:auto; padding:8px 18px; font-size:13px; }
.mon-view-toggle .btn.active { background:var(--accent); }
.mon-view-toggle .btn:not(.active) { background:var(--panel2); color:var(--text); }

/* === Современный переключатель Список/Блок === */
.view-toggle {
    display: inline-flex; align-items: center; gap: 4px;
    background: var(--panel2); border: 1px solid var(--border);
    border-radius: 999px; padding: 4px;
}
.view-toggle .vt-btn {
    display: inline-flex; align-items: center; gap: 6px;
    border: none; background: transparent; color: var(--text-dim);
    font-size: 13px; font-weight: 600; padding: 7px 16px;
    border-radius: 999px; cursor: pointer; transition: all .2s;
    white-space: nowrap;
}
.view-toggle .vt-btn:hover:not(:disabled) { color: var(--text); }
.view-toggle .vt-btn.active {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--blue));
    box-shadow: 0 2px 10px rgba(0,0,0,.28);
}
.view-toggle .vt-btn:disabled { opacity: 1; cursor: default; }

/* === МОНИТОРИНГ: режим Блок (сетка объектов) === */
.mon-blocks-grid { display:grid; gap:12px; }
.mon-block {
    background:var(--card); border:1px solid var(--border); border-radius:12px;
    padding:14px; display:flex; flex-direction:column; gap:10px; min-width:0; overflow:hidden;
    transition:border-color 0.15s, transform 0.15s;
}
.mon-block:hover, .school-card:hover, .contract-card:hover, .techcard-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 0 0 2px var(--accent);
}
.mon-block-head { display:flex; align-items:flex-start; gap:8px; min-width:0; }
.mon-block-title { font-size:14px; font-weight:700; line-height:1.3; flex:1; min-width:0; overflow-wrap:anywhere; }
.mon-block-city { font-size:11px; color:var(--text-dim); margin-top:2px; overflow-wrap:anywhere; }
/* Мобильная версия: ограничиваем ФИО и адрес объекта 2 строками, чтобы блок не растягивался */
@media (max-width: 768px) {
    .mon-block-title { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
    .mon-block-city { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
}
.mon-block-info-btn {
    flex:none; width:26px; height:26px; border-radius:50%;
    background:var(--panel2); color:var(--accent); border:1px solid var(--border);
    font-size:14px; font-weight:700; font-style:italic; cursor:pointer;
    display:flex; align-items:center; justify-content:center; transition:all 0.15s;
}
.mon-block-info-btn:hover { background:var(--accent); color:#fff; border-color:var(--accent); }
.mon-block-pin-btn.compact, .mon-block-info-btn.compact { width:20px; height:20px; font-size:11px; }
.mon-block-metrics { display:flex; flex-direction:column; gap:6px; min-width:0; }
.mon-block-metric { display:flex; align-items:center; gap:8px; font-size:12px; min-width:0; }
.mon-block-metric .mb-label { color:var(--text-dim); flex:1; }
.mon-block-metric .mb-value { font-weight:700; overflow-wrap:anywhere; }
.mon-block-status { font-size:12px; margin-top:2px; }
.mon-block-progress { display:flex; align-items:center; gap:8px; }
.mon-block-progress .progress-bar { flex:1; height:8px; }
.mon-block-progress .mb-pct { font-size:14px; font-weight:700; color:var(--accent); flex:none; width:38px; text-align:right; }
.mon-block-cols { display:flex; align-items:center; gap:6px; font-size:12px; color:var(--text-dim); }
.mon-block-cols select { width:auto; padding:4px 8px; font-size:12px; }
.mon-block.dragging { opacity:0.4; }
.mon-block.drag-over { border-color:var(--accent); box-shadow:0 0 0 2px var(--accent); }
.mon-block { cursor:grab; }
.mon-block:active { cursor:grabbing; }
.mon-block.pinned { border-color:var(--accent); background:linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, transparent), color-mix(in srgb, var(--accent) 4%, transparent)); }
.mon-block.pinned { cursor:default; }
.mon-block-pin-btn {
    flex:none; width:24px; height:24px; border-radius:6px;
    background:var(--panel2); border:1px solid var(--border);
    font-size:12px; cursor:pointer; display:flex; align-items:center; justify-content:center;
    opacity:.55; transition:all .15s;
}
        .mon-block-pin-btn:hover { opacity:1; }
        .mon-block-pin-btn.pinned { opacity:1; background:var(--accent); border-color:var(--accent); }
        /* Мигание фона карточки при переносе/закреплении */
        @keyframes cardFlash {
            0%, 100% { background: var(--card); }
            25%, 75% { background: var(--accent); }
        }
        .flash { animation: cardFlash 0.4s ease 2; }

        /* === ЧАТ === */
        .chat-container { display:flex; gap:12px; height: calc(100% - 40px); min-height: 300px; }
        /* Мобильный чат: поле ввода прижато к низу и поднимается над клавиатурой */
        @media (max-width: 768px) {
        .chat-container { height: calc(100% - 40px); min-height: 0; }
        .chat-container.chat-keyboard-open { height: calc(100% - 40px); }
        }
.chat-sidebar { width: 220px; flex-shrink: 0; overflow-y: auto; }
.chat-main { flex: 1; display: flex; flex-direction: column; background: var(--card); border-radius: 12px; overflow: hidden; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.chat-msg { max-width: 70%; padding: 10px 14px; border-radius: 12px; font-size: 14px; word-wrap: break-word; }
.chat-msg.sent { align-self: flex-end; background: var(--accent); color: #fff; }
.chat-msg.received { align-self: flex-start; background: var(--panel); color: var(--text); }
.chat-msg .chat-time { font-size: 11px; opacity: 0.7; margin-top: 4px; }
.chat-msg .chat-status { font-size: 11px; margin-left: 4px; color: rgba(255,255,255,0.85); letter-spacing: -1px; }
.chat-msg .chat-status.delivered { color: rgba(255,255,255,0.85); }
.chat-msg .chat-status.read { color: #7dd3fc; }
.chat-msg img { max-width: 100%; border-radius: 8px; margin-top: 6px; }
        .chat-input { padding: 12px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 8px; }
        .chat-input input[type="text"] { flex: 1; }
        .chat-emoji-bar { display: flex; gap: 4px; padding: 4px 0; width: 100%; }
        .chat-emoji-bar span { cursor: pointer; font-size: 20px; padding: 2px 4px; border-radius: 6px; transition: background 0.15s; }
        .chat-emoji-bar span:hover { background: rgba(255,255,255,0.1); }
.chat-contact { padding: 10px 12px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.chat-contact:hover { background: rgba(255,255,255,0.05); }
.chat-contact.active { background: rgba(249,115,22,0.15); }
.chat-contact .unread-badge { background: var(--accent); color: #fff; border-radius: 10px; padding: 1px 7px; font-size: 11px; font-weight: 600; }
.admin-msg-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 99999; display: flex; align-items: center; justify-content: center; }
.admin-msg-popup { background: var(--card); border-radius: 16px; padding: 32px; max-width: 400px; width: 90%; text-align: center; box-shadow: 0 8px 32px rgba(0,0,0,0.5); animation: popupSlide 0.3s ease; }
@keyframes popupSlide { from { transform: translateY(-30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.admin-msg-popup h3 { color: var(--accent); margin-bottom: 12px; }
.admin-msg-popup p { color: var(--text); margin-bottom: 20px; font-size: 15px; }
        .admin-msg-popup .msg-preview { background: var(--panel); border-radius: 8px; padding: 12px; margin: 12px 0; font-size: 14px; color: var(--text-dim); max-height: 100px; overflow: hidden; }
.admin-msg-popup button { padding: 12px 32px; background: var(--accent); color: #fff; border: none; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; }
.admin-msg-popup button:hover { opacity: 0.9; }
@media (max-width: 768px) {
    .chat-sidebar { width: 100%; display: none; }
    .chat-sidebar.show { display: block; }
    .chat-container { flex-direction: column; }
}
/* === ПРОФИЛЬ === */
.profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.profile-item { background: var(--panel); border-radius: 8px; padding: 10px 14px; }
.profile-item .pi-label { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; }
.profile-item .pi-value { font-size: 14px; margin-top: 4px; }
.profile-item .pi-value.expired { color: var(--red); }
/* === HEALTH STARS === */
        .health-stars { font-size: 28px; letter-spacing: 4px; }
        .health-stars span { cursor: pointer; color: var(--text-dim); transition: color 0.2s; }
        .health-stars span:hover { color: var(--accent); }
        /* === MONITORING SEPARATION === */
        .mon-city { 
            margin-bottom: 20px; 
            border: 2px solid var(--border); 
            border-radius: 14px; 
            overflow: hidden;
            background: var(--panel);
        }
        .mon-city .mon-header { 
            border-bottom: 2px solid var(--border);
            background: linear-gradient(135deg, var(--panel2) 0%, var(--panel3) 100%);
        }
        .mon-school { 
            margin: 8px 8px 8px 12px; 
            border-left: 4px solid var(--accent); 
            border-radius: 0 10px 10px 0; 
            overflow: hidden;
            background: var(--panel3);
        }
        .mon-school .mon-header {
            background: var(--panel2) !important;
        }
        
        /* === КОМПАКТНЫЕ МЕТРИКИ КЛИНЕРА === */
        .cleaner-metrics { display: flex; gap: 6px; flex-wrap: nowrap; margin-bottom: 12px; }
        .cleaner-metric { background: var(--card); border-radius: 10px; padding: 8px 6px; flex: 1; min-width: 0; text-align: center; }
.cleaner-metric .cm-value { font-size: 20px; font-weight: 700; }
.cleaner-metric .cm-label { font-size: 11px; color: var(--text-dim); margin-top: 2px; }

/* === ОФФЛАЙН-РЕЖИМ === */
.offline-banner {
    display: none; position: fixed; top: 66px; left: 0; right: 0; z-index: 300;
    background: #7c2d12; color: #fff; text-align: center; padding: 8px 16px;
    font-size: 13px; font-weight: 600; box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
        .offline-banner.show { display: block; }
        .offline-banner .ob-pending { font-weight: 800; }
        /* Красный индикатор «нет интернета» по центру шапки */
        .offline-indicator {
            position: fixed; top: 8px; left: 50%; transform: translateX(-50%);
            width: 32px; height: 32px; border-radius: 6px;
            background: var(--red); color: #fff; font-size: 18px;
            display: flex; align-items: center; justify-content: center;
            z-index: 400; box-shadow: 0 2px 8px rgba(0,0,0,.3);
        }
.offline-sync-btn {
    margin-left: 10px; background: #fff; color: #7c2d12; border: none;
    border-radius: 6px; padding: 3px 10px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.offline-sync-btn:hover { opacity: 0.9; }
.offline-sync-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.offline-toast {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 400;
    background: var(--card); border: 1px solid var(--border); color: var(--text);
    padding: 10px 18px; border-radius: 10px; font-size: 13px; box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    display: none; max-width: 90%;
}
.offline-toast.show { display: block; }
.offline-toast.ok { border-color: var(--green); }
.offline-toast.err { border-color: var(--red); }

/* === БЛОК ВЕРСИЙ === */
.version-widget {
    position: fixed; right: 14px; bottom: 14px; z-index: 250;
    max-width: 340px; font-size: 12px;
}
.version-widget .vw-head {
    display: flex; align-items: center; gap: 6px; cursor: pointer;
    background: var(--card); border: 1px solid var(--border); border-radius: 8px;
    padding: 6px 10px; color: var(--text-dim); user-select: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2); transition: all 0.15s;
}
.version-widget .vw-head:hover { border-color: var(--accent); color: var(--text); }
.version-widget .vw-head .vw-latest { font-weight: 700; color: var(--accent); }
.version-widget .vw-head .vw-arrow { margin-left: auto; font-size: 11px; }
.version-widget .vw-body {
    display: none; margin-top: 6px; background: var(--card); border: 1px solid var(--border);
    border-radius: 8px; padding: 8px 10px; max-height: 260px; overflow-y: auto;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.version-widget .vw-body.open { display: block; }
.version-widget .vw-item {
    padding: 5px 0; border-bottom: 1px dashed var(--border); line-height: 1.4;
}
.version-widget .vw-item:last-child { border-bottom: none; }
        .version-widget .vw-item .vw-ver { font-weight: 700; color: var(--accent); }
        /* Чат техподдержки */
        .support-chat { position: fixed; right: 20px; bottom: 20px; z-index: 500; display: none; }
        .sc-fab { width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 24px; border: none; cursor: pointer; box-shadow: 0 4px 16px rgba(0,0,0,.3); display: flex; align-items: center; justify-content: center; }
        .sc-fab:hover { transform: scale(1.05); }
        .sc-body { display: none; width: 320px; max-height: 420px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.25); overflow: hidden; flex-direction: column; margin-bottom: 10px; }
        .sc-body.open { display: flex; }
        .sc-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; background: var(--accent); color: #fff; font-weight: 700; }
        .sc-close { background: none; border: none; color: #fff; font-size: 16px; cursor: pointer; }
        .sc-msgs { flex: 1; overflow-y: auto; padding: 10px; min-height: 120px; max-height: 200px; }
        .sc-msg { font-size: 13px; padding: 8px 10px; border-radius: 8px; margin-bottom: 6px; background: var(--panel); }
        .sc-msg .cat { font-size: 11px; color: var(--accent); font-weight: 700; }
        .sc-input { padding: 10px; border-top: 1px solid var(--border); display: grid; gap: 8px; }
        .sc-input select, .sc-input textarea { width: 100%; padding: 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 13px; }
        .cleaner-mode .support-chat { display: none; }
        /* Мобильное приложение (WebView): кнопка техподдержки в центре справа, видна везде */
        body.mobile-app .support-chat { display: none; }
        body.mobile-app .sc-fab {
            width: 48px; height: 48px; font-size: 22px;
            border-radius: 12px 0 0 12px;
            box-shadow: -3px 0 12px rgba(0,0,0,.3);
        }
        body.mobile-app .sc-body {
            width: min(320px, 82vw); max-height: 60vh;
            margin-bottom: 8px; margin-right: 4px;
        }
        body.mobile-app .cleaner-mode .support-chat { display: none; }
.version-widget .vw-item .vw-date { color: var(--text-dim); font-size: 11px; }
.version-widget .vw-item .vw-desc { color: var(--text); margin-top: 2px; }
.version-widget .vw-theme {
    display: flex; gap: 4px; margin-top: 6px; background: var(--card);
    border: 1px solid var(--border); border-radius: 8px; padding: 4px;
}
.version-widget .vw-theme-btn {
    flex: 1; border: none; border-radius: 6px; padding: 5px 8px; font-size: 12px;
    cursor: pointer; background: transparent; color: var(--text-dim); transition: all 0.15s;
}
.version-widget .vw-theme-btn:hover { color: var(--text); }
.version-widget .vw-theme-btn.active { background: var(--accent); color: #fff; font-weight: 700; }

