        /* === ДИЗАЙН-СИСТЕМА ИЗ ГРАФИКБРО === */
        :root {
            /* Базовые (уже были в Супераппе) */
            --primary: #37474f; --accent: #ffab00; --bg: #f5f7fa; --card: #ffffff; --text: #263238;
            --nav-inactive: #90a4ae;
            --correct-bg: #e8f5e9; --correct-txt: #2e7d32; --correct-border: #81c784;
            --wrong-bg: #ffebee; --wrong-txt: #c62828; --wrong-border: #e57373;
    
            /* Специфичные для ГрафикБро */
            --col-work-bg: #e8f5e9; --col-work-txt: #2e7d32;
            --col-sick-bg: #fff9c4; --col-sick-txt: #fbc02d; --col-sick-border: #fff59d;
            --col-donor-bg: #f3e5f5; --col-donor-txt: #ab47bc; --col-donor-border: #e1bee7;
            --col-train-bg: #e0f7fa; --col-train-txt: #006064; --col-train-border: #b2ebf2;
            --col-weekend-txt: #e53935; --col-holiday-bg: #ffebee; --col-holiday-border: #ef5350; 
        }

        body { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Roboto", sans-serif; background-color: var(--bg); margin: 0 auto; padding: 0; color: var(--text); padding-bottom: 90px; padding-top: 60px; -webkit-tap-highlight-color: transparent; max-width: 500px; box-shadow: 0 0 30px rgba(0,0,0,0.05); min-height: 100vh;}
        
        body.modal-open { overflow: hidden; touch-action: none; }

        /* Обновляем инпуты для ГрафикБро */
        input[type="text"], input[type="password"], input[type="number"], textarea, select { 
            width: 100%; padding: 14px; border: 1px solid #e0e0e0; border-radius: 12px; 
            box-sizing: border-box; font-size: 16px; margin-top: 8px; 
            background: #f9f9f9; font-family: inherit; font-weight: 500;
        }
        input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); background: white; }
        label { font-size: 11px; color: #78909c; font-weight: 800; text-transform: uppercase; margin-top: 18px; display: block; letter-spacing: 0.5px;}

        header { background-color: var(--card); color: var(--text); height: 60px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; box-shadow: 0 4px 20px rgba(0,0,0,0.05); position: fixed; top: 0; left: 0; right: 0; z-index: 100; max-width: 500px; margin: 0 auto; box-sizing: border-box; }
        h1 { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; margin: 0; color: var(--primary); }
        
        .page { display: none; padding: 20px; animation: fadeIn 0.3s ease; } .page.active { display: block; }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
        
        .grafik-page { display: none; animation: fadeIn 0.3s ease; } 
        .grafik-page.active { display: block; }

        .card { background: var(--card); border-radius: 20px; padding: 20px; box-shadow: 0 4px 20px rgba(0,0,0,0.05); margin-bottom: 15px; }
        
        input[type="text"], input[type="password"] { width: 100%; padding: 14px; border: 1px solid #e0e0e0; border-radius: 12px; box-sizing: border-box; font-size: 16px; margin-top: 8px; background: #f9f9f9; font-family: inherit; font-weight: 500;}
        input:focus { outline: none; border-color: var(--primary); background: white; }
        
        .btn { display: block; width: 100%; padding: 14px; border-radius: 12px; border: none; font-weight: 700; cursor: pointer; font-size: 16px; transition: 0.2s; text-align: center; box-sizing: border-box;} 
        .btn:active { transform: scale(0.96); }
        .btn-primary { background: var(--primary); color: white; } 
        .btn-accent { background: var(--accent); color: white; }
        .btn-cancel { background: transparent; color: #78909c; border: 1px solid #cfd8dc; }
        .btn-theme { background: var(--card); color: var(--primary); border: 1px solid #e0e0e0; box-shadow: 0 2px 8px rgba(0,0,0,0.02); text-align: left; margin-bottom: 10px; display: flex; align-items: center; gap: 10px;}
        
        .option-btn { background: #f9f9f9; border: 1px solid #e0e0e0; padding: 15px; border-radius: 12px; width: 100%; text-align: left; margin-bottom: 10px; font-size: 15px; font-family: inherit; color: var(--text); cursor: pointer; transition: 0.2s; line-height: 1.4;}
        .option-btn:active:not(:disabled) { transform: scale(0.98); background: #f0f2f5; }
        .option-btn:disabled { cursor: default; }
        .option-btn.correct { background: var(--correct-bg); border-color: var(--correct-border); color: var(--correct-txt); font-weight: 600; box-shadow: 0 4px 10px rgba(76, 175, 80, 0.2);}
        .option-btn.wrong { background: var(--wrong-bg); border-color: var(--wrong-border); color: var(--wrong-txt); font-weight: 600; }

        .info-label { font-size: 11px; color: #90a4ae; font-weight: 700; text-transform: uppercase; margin-bottom: 6px; text-align: center;}
        
        .bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; height: 70px; background: white; border-top: 1px solid #f0f0f0; display: flex; justify-content: space-around; align-items: center; z-index: 1000; padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -5px 20px rgba(0,0,0,0.03); max-width: 500px; margin: 0 auto; }
        .nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--nav-inactive); font-size: 10px; font-weight: 600; width: 100%; height: 100%; cursor: pointer; transition: all 0.2s; } 
        .nav-item.active { color: var(--primary); transform: translateY(-2px); } 
        .nav-item svg { width: 26px; height: 26px; fill: currentColor; margin-bottom: 4px; }
        
        .cheat-result { background: #f0f2f5; padding: 12px; margin-top: 10px; border-radius: 12px; font-size: 14px; line-height: 1.4; border-left: 4px solid var(--accent);}
        .auth-toggle { text-align: center; color: var(--primary); cursor: pointer; margin-top: 20px; font-weight: 700; font-size: 14px;}
        
        /* Кнопка выхода в шапке */
        .logout-btn { background: none; border: none; font-size: 20px; cursor: pointer; padding: 5px; color: var(--wrong-txt); }

        /* === СТИЛИ ХАБА === */
        .hub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 20px; }
        .hub-tile { background: var(--card); border-radius: 20px; padding: 10px; text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,0.05); cursor: pointer; transition: 0.2s; border: 1px solid #e0e0e0; display: flex; flex-direction: column; align-items: center; justify-content: center; aspect-ratio: 1 / 1; }
        .hub-tile:active { transform: scale(0.95); background: #f0f2f5; }
        .hub-tile img { width: 110px; height: 110px; object-fit: cover; border-radius: 16px; margin-bottom: 12px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
        .hub-tile-title { font-weight: 800; color: var(--primary); font-size: 14px; line-height: 1.2;}

        /* === СТИЛИ ГРАФИКБРО === */

        /* Лоадер */
        #loader { position: fixed; top:0; left:0; right:0; bottom:0; background: var(--bg); z-index: 9999; display: flex; flex-direction: column; justify-content: center; align-items: center; transition: opacity 0.3s; pointer-events: none; opacity: 0;}
        .spinner { width: 40px; height: 40px; border: 4px solid #cfd8dc; border-top: 4px solid var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
        @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
        .loader-text { margin-top: 15px; font-weight: 600; color: var(--primary); font-size: 14px; }
        .loader-active { opacity: 1 !important; pointer-events: all !important; }

        /* Виджеты "Сегодня" */
        .hero-widget { border-radius: 24px; padding: 25px; color: white; box-shadow: 0 15px 30px rgba(0,0,0,0.15); margin-bottom: 20px; position: relative; overflow: hidden; }
        .theme-work { background: linear-gradient(135deg, #263238 0%, #37474f 100%); }
        .theme-rest { background: linear-gradient(135deg, #0288d1 0%, #26c6da 100%); }
        .widget-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; opacity: 0.9; }
        .widget-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
        .widget-main-value { font-size: 52px; font-weight: 800; letter-spacing: -1px; line-height: 1; margin-bottom: 5px; }
        .widget-sub-value { font-size: 15px; opacity: 0.9; font-weight: 600; background: rgba(255,255,255,0.2); padding: 4px 10px; border-radius: 8px; display: inline-block; margin-bottom: 15px;}
        .progress-track { background: rgba(255,255,255,0.2); height: 6px; border-radius: 4px; margin-top: 20px; overflow: hidden; }
        .progress-fill { height: 100%; border-radius: 4px; transition: width 1s linear; background: white; }
        .theme-work .progress-fill { background: var(--accent); }
        .progress-labels { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; font-weight: 600; opacity: 0.9; }
        .info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
        .info-card { background: white; padding: 15px; border-radius: 16px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); text-align: center; }
        .info-val { font-size: 17px; font-weight: 700; color: var(--primary); }

        /* Карточки смен (Список) */
        .month-header { font-size: 14px; font-weight: 800; color: var(--nav-inactive); margin: 10px 0 15px 5px; text-transform: uppercase; letter-spacing: 1px; }
        .shift-card { background: white; border-radius: 16px; padding: 15px; margin-bottom: 12px; display: flex; align-items: center; box-shadow: 0 2px 8px rgba(0,0,0,0.04); cursor: pointer; transition: transform 0.1s; position: relative; overflow: hidden;}
        .shift-card:active { transform: scale(0.98); }
        .shift-card.today { border: 2px solid var(--accent); background-color: #fffde7; }
        .today-badge { position: absolute; top: 0; right: 0; background: var(--accent); color: white; font-size: 10px; padding: 3px 8px; border-bottom-left-radius: 10px; font-weight: bold; z-index: 10; }
        .date-box { background: #f0f2f5; min-width: 50px; height: 50px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; margin-right: 16px; color: var(--primary); }
        .date-day { font-size: 20px; font-weight: 800; line-height: 1; }
        .date-dow { font-size: 11px; text-transform: uppercase; margin-top: 3px; font-weight: 600; color: #78909c;}
        .shift-info { flex-grow: 1; min-width: 0; }
        .shift-title { font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .shift-sub { font-size: 13px; color: #78909c; margin-top: 4px; font-weight: 500; }
        .money-val { color: #2e7d32; font-weight: 800; font-size: 16px; }
        .money-val.future { color: #90a4ae; font-weight: 600; }

        /* Календарь */
        .cal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
        .cal-title { font-size: 18px; font-weight: 700; }
        .cal-btn { background: none; border: none; font-size: 24px; color: var(--primary); cursor: pointer; padding: 5px 15px; }
        .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; width: 100%; }
        .cal-day-name { text-align: center; font-size: 11px; color: #b0bec5; font-weight: 700; padding-bottom: 10px; }
        .cal-cell { background: #f7f9fc; border-radius: 10px; height: 55px; display: flex; flex-direction: column; align-items: center; padding-top: 4px; font-size: 12px; position: relative; border: 2px solid transparent; cursor: pointer; min-width: 0; }
        .cal-num { font-weight: 700; font-size: 12px; margin-bottom: 2px; color: #546e7a; }
        .cal-shift { font-size: 9px; text-align: center; line-height: 1.1; width: 100%; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; font-weight: 600;}
        .cal-cell.today { border-color: var(--accent); background: #fff; }
        .cal-cell.today .cal-num { color: var(--accent); }
        .cal-cell.weekend .cal-num { color: var(--col-weekend-txt); }
        .cal-cell.state-holiday { background: var(--col-holiday-bg); border-color: var(--col-holiday-border) !important; }
        .cal-cell.state-holiday.has-shift.type-work { background: var(--col-work-bg); border-color: var(--col-holiday-border); }
        .cal-cell.state-holiday.has-shift.type-work .cal-num { color: var(--col-weekend-txt); font-weight: 900; }
        .cal-cell.state-holiday.today { border-color: var(--accent) !important; box-shadow: 0 0 10px rgba(255, 171, 0, 0.4); }
        .cal-cell.type-work { background: var(--col-work-bg); color: var(--col-work-txt); }
        .cal-cell.type-off { background: white; color: #cfd8dc; }
        .cal-cell.type-sick { background: var(--col-sick-bg) !important; color: #f9a825 !important; border-color: var(--col-sick-border); }
        .cal-cell.type-train { background: var(--col-train-bg) !important; color: var(--col-train-txt) !important; border-color: var(--col-train-border); }
        .cal-cell.type-donor { background: var(--col-donor-bg) !important; color: var(--col-donor-txt) !important; border-color: var(--col-donor-border); }
        .cal-cell.type-vacation { background: #fff3e0 !important; color: #e65100 !important; border-color: #ffe0b2 !important; }
        .cal-cell.type-vacation .cal-num { color: #ef6c00 !important; }
        .cal-cell.has-note::after { content: ''; position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; background-color: #ff1744; border-radius: 50%; box-shadow: 0 0 0 1px #fff; }

        /* Теги и Статистика */
        .tag { font-size: 9px; padding: 3px 8px; border-radius: 6px; color: white; font-weight: bold; letter-spacing: 0.5px; display:inline-block; margin-left:2px;}
        .tag.gray { background: #90a4ae; } .tag.orange { background: var(--accent); } .tag.teal { background: #009688; } .tag.indigo { background: #5c6bc0; } .tag.red { background: #e53935; } .tag.purple { background: #7e57c2; }
        .note-icon { font-size: 14px; margin-left: 6px; cursor: help; text-decoration: none; }
        .chart-container { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px 0; position: relative; }
        .circular-chart { display: block; margin: 0 auto; max-width: 80%; max-height: 250px; }
        .circle-bg { fill: none; stroke: #eee; stroke-width: 3.8; }
        .circle { fill: none; stroke-width: 2.8; stroke-linecap: round; transition: stroke-dasharray 0.6s ease; }
        .chart-text-group { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -40%); text-align: center; }
        .chart-val { font-size: 32px; font-weight: 800; color: var(--primary); display: block; line-height: 1;}
        .chart-label { font-size: 12px; color: #90a4ae; font-weight: 600; text-transform: uppercase; margin-top: 5px; display: block;}
        .stat-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid #f0f0f0; font-size: 14px;} .stat-row:last-child { border-bottom: none; }
        .stat-val { font-weight: 700; color: var(--primary); }
        .stat-sub-val { font-size: 12px; color:#90a4ae; font-weight: 600; margin-right: 8px;}
        .month-selector { display: flex; align-items: center; justify-content: center; background: #f0f2f5; border-radius: 12px; padding: 4px 8px; min-width: 160px; gap: 15px; }
        .month-btn { background: none; border: none; padding: 8px; cursor: pointer; color: var(--primary); font-size: 20px; font-weight: bold; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
        .month-display { font-size: 14px; font-weight: 700; text-align: center; white-space: nowrap; min-width: 110px; }

        /* Плавающие кнопки (FAB) */
        .fab-container { position: fixed; bottom: 90px; right: 20px; display: flex; align-items: center; gap: 15px; z-index: 2000; pointer-events: auto; }
        /* Центрируем FAB относительно контейнера 500px, если экран шире */
        @media (min-width: 500px) { .fab-container { right: calc(50vw - 230px); } }
        .fab-main { background: var(--accent); color: white; width: 60px; height: 60px; border-radius: 50%; display: flex; justify-content: center; align-items: center; box-shadow: 0 8px 20px rgba(255, 171, 0, 0.4); cursor: pointer; border: none; transition: transform 0.2s; -webkit-tap-highlight-color: transparent; } .fab-main:active { transform: scale(0.9); } .fab-main svg { width: 30px; height: 30px; fill: white; pointer-events: none; }
        .fab-secondary { background: white; color: var(--primary); width: 50px; height: 50px; border-radius: 50%; display: flex; justify-content: center; align-items: center; box-shadow: 0 5px 15px rgba(0,0,0,0.1); cursor: pointer; border: none; transition: transform 0.2s; -webkit-tap-highlight-color: transparent;} .fab-secondary:active { transform: scale(0.9); } .fab-secondary svg { width: 24px; height: 24px; fill: currentColor; pointer-events: none; }

        /* Модалки (Специфичные) */
        .modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(38, 50, 56, 0.8); backdrop-filter: blur(4px); display: none; justify-content: center; align-items: center; z-index: 5000; touch-action: none; }
        #addModal { z-index: 6000; }
        #confirmModal { z-index: 7000; }
        .modal-overlay.open { display: flex; animation: fadeIn 0.2s; }
        .modal-box { background: white; padding: 25px; border-radius: 24px; width: 90%; max-width: 360px; min-width: 300px; box-shadow: 0 20px 60px rgba(0,0,0,0.4); max-height: 85vh; overflow-y: auto; position: relative; z-index: 6001; transform: translate3d(0,0,0); }
        .btn-row { display: flex; justify-content: flex-end; margin-top: 25px; gap: 10px; }
        .btn-delete { background: #ffebee; color: #d32f2f; }
        details { margin-top: 15px; border: 1px solid #eee; border-radius: 12px; padding: 15px; } 
        summary { font-size: 13px; font-weight: 700; color: var(--primary); cursor: pointer; outline: none; }
        .detail-row { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; } 
        .detail-row label { margin: 0; font-size: 13px; color: #455a64; font-weight: 500;} 
        .detail-row input[type="checkbox"] { width: 24px; height: 24px; margin: 0; accent-color: var(--accent);} 
        .detail-row input[type="text"] { width: 90px; padding: 8px; font-size: 14px; margin: 0; } 
        .line-input-row { display: flex; gap: 10px; margin-top: 5px; }
        /* Прозрачные ячейки для пустых дней календаря */
        .cal-cell.empty { background: transparent; border: none; cursor: default; box-shadow: none; pointer-events: none; }
        /* Стиль для кнопки Выйти в шапке */
        .btn-logout-header {
            background: rgba(255, 171, 0, 0.1); /* Прозрачный акцентный цвет */
            color: var(--accent); /* Оранжевый цвет текста */
            border: 1px solid rgba(255, 171, 0, 0.3); /* Легкая рамка */
            padding: 6px 12px;
            border-radius: 10px;
            font-size: 13px;
            font-weight: bold;
            cursor: pointer;
            transition: 0.2s;
            font-family: inherit;
        }

        .btn-logout-header:hover {
            background: rgba(255, 171, 0, 0.2); /* Чуть ярче при наведении */
            transform: translateY(-1px); /* Легкий подъем */
        }
