:root {
    --nav-bg: #2c3e50;
    --accent: #3498db;
}

body { font-family: 'Segoe UI', sans-serif; margin: 0; padding-top: 70px; background: #f0f2f5; }

/* Navbar */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; height: 60px;
    background: var(--nav-bg); display: flex; align-items: center; padding: 0 30px; z-index: 1000;
}
.nav-logo { color: #fff; font-weight: 800; margin-right: 40px; }
.nav-links { flex: 1; display: flex; gap: 10px; }
.nav-btn { background: none; border: none; color: #a0aec0; padding: 8px 15px; cursor: pointer; font-weight: 600; border-radius: 5px; }
.nav-btn.active { background: var(--accent); color: #fff; }

/* Страницы */
.page { display: none; padding: 0 20px 20px 20px; }
.page.active { display: block; }

/* Карточки управления */
.setup-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 15px; margin-bottom: 15px; }
.card { background: #fff; border-radius: 8px; padding: 12px; border: 1px solid #ddd; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.card h3 { margin: 0 0 10px 0; font-size: 13px; color: var(--nav-bg); border-bottom: 1px solid #eee; padding-bottom: 5px; }

.input-row { display: flex; gap: 5px; }
input, select { padding: 6px; border: 1px solid #cbd5e0; border-radius: 4px; font-size: 12px; flex: 1; }

/* Таблицы */
.table-scroll-area { overflow: auto; background: #fff; border: 2px solid #000; height: calc(100vh - 230px); }
table { border-collapse: collapse; }
th, td { border: 1px solid #000; text-align: center; }

.day-title { background: var(--nav-bg); color: #fff; padding: 8px; font-size: 13px; }
.class-name { background: #edf2f7; font-weight: bold; width: 70px; position: sticky; left: 0; z-index: 10; border-right: 2px solid #000; }
.lesson-num { background: #f7fafc; width: 130px; font-weight: bold; font-size: 11px; }

td { height: 90px; min-width: 170px; vertical-align: top; }
.cell-box { padding: 5px; display: flex; flex-direction: column; gap: 3px; }
.time-label { font-size: 10px; font-weight: bold; color: #718096; }

/* Статистика */
.stats-container { display: grid; grid-template-columns: 1fr 1.5fr; gap: 20px; }
.mini-table { width: 100%; border-collapse: collapse; background: white; }
.mini-table th, .mini-table td { border: 1px solid #ddd; padding: 8px; font-size: 13px; }
.total-row { background: #ebf8ff; font-weight: bold; }

/* Кнопки */
button { cursor: pointer; border: none; font-weight: 700; border-radius: 4px; }
.add-btn { background: var(--accent); color: #fff; padding: 6px 10px; }
.danger-btn { background: #f56565; color: #fff; padding: 8px 15px; font-size: 12px; }
.print-btn { background: #48bb78; color: #fff; padding: 8px 15px; margin-left: 10px; }

.tags-container { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; max-height: 60px; overflow-y: auto; }
.tag { background: #f1f5f9; padding: 2px 6px; border-radius: 3px; border: 1px solid #cbd5e0; font-size: 11px; }
.tag span { color: #f56565; margin-left: 5px; cursor: pointer; }

.danger-zone-inline { margin-top: 10px; text-align: right; }

@media print {
    .navbar, .setup-grid, .danger-zone-inline { display: none !important; }
    .table-scroll-area { overflow: visible; height: auto; border: none; }
}
a{
    text-decoration: none;
}
/* КРАСИВЫЙ НАВБАР */
.navbar { 
    background: #2c3e50; 
    height: 60px; 
    display: flex; 
    align-items: center; 
    padding: 0 30px; 
    color: white; 
    box-shadow: 0 3px 10px rgba(0,0,0,0.2); 
    position: fixed; top: 0; width: 100%; z-index: 1000;
}
.nav-logo { font-size: 20px; font-weight: 900; letter-spacing: 1px; }
.nav-logo span { color: #3498db; }

.nav-links { display: flex; gap: 10px; margin-left: 40px; flex: 1; }

.nav-btn {
    text-decoration: none;
    color: #bdc3c7;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.nav-btn:hover { color: white; background: rgba(255,255,255,0.1); }
.nav-btn.active { 
    color: white; 
    background: #3498db; 
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.4); 
}

.nav-actions { display: flex; gap: 10px; align-items: center; margin-right: 40px;}

.lang-btn, .print-btn, .reset-btn {
    border: none; padding: 8px 15px; border-radius: 6px; 
    cursor: pointer; font-weight: bold; transition: 0.2s; color: white;
}
.lang-btn { background: #e67e22; }
.print-btn { background: #27ae60; }
.reset-btn { background: #e74c3c; }

@media print {
    .navbar, .card:last-child { display: none !important; }
    body { padding-top: 0; }
    .container { width: 100%; max-width: 100%; }
}
/* Кнопка полноэкранного режима */
.fs-btn { background: #9b59b6; border: none; padding: 8px 15px; border-radius: 6px; cursor: pointer; color: white; font-weight: bold; }

/* НАСТРОЙКИ ПЕЧАТИ ДЛЯ РАСПИСАНИЯ */
@media print {
    .navbar, .admin-panel, .no-print, select, button {
        display: none !important;
    }
    body { padding: 0; margin: 0; background: white; }
    .main-container { padding: 0; margin: 0; width: 100%; }
    #tableContainer { overflow: visible !important; width: 100%; }
    table { width: 100%; border-collapse: collapse; font-size: 10px; } /* Уменьшаем шрифт для печати */
    th, td { border: 1px solid #000 !important; padding: 2px !important; }
    .time-label { display: block; font-size: 8px; color: #000; }
    
    /* Убираем выпадающие списки, оставляя только текст (через JS это сделать сложно, поэтому просто скрываем границы) */
    select {
        appearance: none;
        border: none;
        background: transparent;
        color: black !important;
    }
}   
/* КНОПКИ ЭКСПОРТ / ИМПОРТ */
.export-btn, .import-btn {
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    color: white;
    transition: all 0.25s ease;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

/* Экспорт — синий */
.export-btn {
    background: #2980b9;
}
.export-btn:hover {
    background: #1f6691;
    transform: translateY(-1px);
}

/* Импорт — фиолетовый */
.import-btn {
    background: #8e44ad;
}
.import-btn:hover {
    background: #6d3385;
    transform: translateY(-1px);
}

/* Нажатие */
.export-btn:active, .import-btn:active {
    transform: scale(0.95);
}