/* ИС «Индивидуальные учебные планы ППС» — основные стили */

body {
    background-color: #f4f5f7;
    font-size: 0.9rem;
}

/* ─── Navbar ─────────────────────────────────────────────────────────────── */
.navbar-custom {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-bottom: 1px solid #e9ecef;
    min-height: 56px;
}

.navbar-tall {
    min-height: 72px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.navbar-custom .navbar-brand {
    font-size: 1.05rem;
    letter-spacing: 0.3px;
    color: #2c3e50;
    font-weight: 700;
}

.navbar-custom .navbar-brand i {
    color: #4a90d9;
}

/* ─── Слайдер плашек в navbar ─────────────────────────────────────────────── */
.nav-tiles-viewport {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.nav-tiles-track {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 2px;
    transition: transform 0.3s ease;
    will-change: transform;
}

.nav-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 50px;
    flex-shrink: 0;
    cursor: pointer;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    padding: 4px 2px;
    transition: background 0.15s, border-color 0.15s;
    text-decoration: none;
    color: #495057;
    user-select: none;
}

.nav-tile:hover {
    background: #f0f2f5;
    border-color: #dee2e6;
    color: #2c3e50;
}

.nav-tile.active {
    background: #e8f0fe;
    border-color: #c2d4f8;
    color: #0d6efd;
}

.nav-tile-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f4f5f7;
    transition: background 0.15s, color 0.15s;
    margin-bottom: 2px;
}

.nav-tile.active .nav-tile-icon-wrap {
    background: #0d6efd;
    color: #fff;
}

.nav-tile.active .nav-tile-icon-wrap .nav-tile-icon {
    filter: brightness(0) invert(1);
    color: #fff !important;
}

.nav-tile-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.nav-tile-label {
    font-size: 0.6rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.1;
    max-width: 68px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: inherit;
}

/* Кнопки-стрелки слайдера */
.nav-tiles-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 40px;
    flex-shrink: 0;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #6c757d;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    padding: 0;
}

.nav-tiles-arrow:hover {
    background: #f0f2f5;
    color: #2c3e50;
}

.nav-tiles-arrow:disabled {
    opacity: 0.3;
    cursor: default;
}

/* ─── Карточки в панели администрирования (уменьшенные) ─────────────────── */
#adminDashboard .card-icon-wrap {
    width: 40px;
    height: 40px;
    margin-bottom: 0.375rem;
}

#adminDashboard .card-icon {
    font-size: 1.25rem;
}

#adminDashboard .dashboard-card .card-body {
    padding: 0.875rem 0.5rem;
}

#adminDashboard .dashboard-card .card-title {
    font-size: 0.65rem;
    margin-bottom: 0.15rem;
}

#adminDashboard .dashboard-card .card-text {
    font-size: 0.65rem;
}

/* ─── Карточки дашборда (новый стиль) ───────────────────────────────────── */
.dashboard-card {
    border: 1px solid #e8eaed !important;
    border-radius: 16px !important;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s, transform 0.15s;
}

.dashboard-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.dashboard-card .card-body {
    padding: 1.75rem 1rem;
}

/* Обёртка иконки — круглая рамка */
.card-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 1.5px solid #d0d5dd;
    background: #ffffff;
    margin-bottom: 0.75rem;
}

.dashboard-card .card-icon {
    font-size: 2.5rem;
    display: block;
    line-height: 1;
}

.dashboard-card .card-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #495057;
    margin-bottom: 0.25rem;
}

.dashboard-card .card-text {
    font-size: 0.75rem;
    color: #9aa5b4;
    line-height: 1.4;
}

/* Общие карточки (не дашборд) */
.card {
    border-radius: 0.5rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s;
    padding: 10px;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* Таблицы плана */
.table th {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #6c757d;
}

.table td {
    vertical-align: middle;
}

/* Прогресс-бары */
.progress {
    border-radius: 0.5rem;
}

/* Маршрут согласования */
.approval-step {
    position: relative;
    padding-left: 2rem;
}

.approval-step::before {
    content: '';
    position: absolute;
    left: 0.6rem;
    top: 1.5rem;
    bottom: -0.5rem;
    width: 2px;
    background: #dee2e6;
}

.approval-step:last-child::before {
    display: none;
}

/* Загрузка файлов */
.drop-zone {
    border: 2px dashed #0d6efd;
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s;
}

.drop-zone:hover,
.drop-zone.drag-over {
    background: #e7f1ff;
}

/* Статусные бейджи */
.badge {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Спиннер загрузки */
.loading-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Адаптивность таблиц */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.8rem;
    }
    .navbar-brand {
        font-size: 0.95rem;
    }
}

/* Заголовки разделов плана */
.card-header h6 {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Кнопки в таблице */
.table .btn-sm {
    padding: 0.15rem 0.4rem;
    font-size: 0.75rem;
}

/* Подсветка строк с нарушением норм */
.table tr.norm-exceeded td {
    background-color: #fff3cd;
}

.table tr.norm-ok td {
    background-color: #d1e7dd;
}

/* ─── Стили страницы «Мой план» (по шаблону forTeacher) ─────────────────── */

/* Карточка-блок с тенью (stat-card) */
.stat-card {
    background: #ffffff;
    border-radius: 5px;
    border: 1px solid #edf2f7;
    transition: all 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.05);
}

/* Иконки-блоки */
.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-icon-sm {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Мягкие цветовые фоны */
.bg-soft-primary { background-color: #e3f2fd; color: #0d6efd; }
.bg-soft-success { background-color: #e8f5e9; color: #2e7d32; }
.bg-soft-warning { background-color: #fff3e0; color: #e65100; }
.bg-soft-danger  { background-color: #fee2e2; color: #dc2626; }
.bg-soft-info    { background-color: #e0f7fa; color: #00838f; }

/* Полноэкранное модальное окно (как в шаблоне) */
.modalCust {
    position: fixed;
    width: 90%;
    height: 90%;
    top: 5%;
    left: 5%;
    z-index: 1050;
    background: #fff;
    overflow-y: auto;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modalCust .btn-cust-save {
    position: sticky;
    bottom: 0;
    padding: 15px 0 5px 0;
    margin-top: 20px;
    text-align: right;
    background: #fff;
    z-index: 2;
}

/* Оверлей */
.overlay {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1040;
    background: rgba(0,0,0,0.6);
}

.overlay.d-none { display: none !important; }
.overlay:not(.d-none) { display: block !important; }

/* Утилиты */
.cursor-pointer { cursor: pointer; }

/* Тонкий прогресс-бар (4px) */
.progress-thin {
    height: 4px;
    border-radius: 2px;
}

/* Чип-значение (коэффициент, процент) */
.value-chip {
    display: inline-block;
    background: #f0f4ff;
    border: 1px solid #d0d9f5;
    border-radius: 20px;
    padding: 0.2rem 0.75rem;
    font-size: 0.82rem;
    color: #3a4a6b;
}

/* Бейджи трека */
.track-badge {
    display: inline-block;
    border-radius: 20px;
    padding: 0.25rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.track-badge-research  { background: #e8f4fd; color: #1565c0; border: 1px solid #bbdefb; }
.track-badge-teacher   { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.track-badge-methodist { background: #fff8e1; color: #f57f17; border: 1px solid #ffe082; }
.track-badge-developer { background: #fce4ec; color: #c62828; border: 1px solid #f48fb1; }

/* Цветовые утилиты для ячеек календаря */
.bg-light-success { background-color: #d1e7dd !important; }
.bg-light-danger  { background-color: #f8d7da !important; }
.bg-light-primary { background-color: #cfe2ff !important; }
.bg-light-warning { background-color: #fff3cd !important; }

/* Ячейки месячного календаря */
.month-cell {
    position: relative;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    cursor: default;
}

.month-cell .tooltip-text {
    display: none;
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.75);
    color: #fff;
    font-size: 0.72rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 10;
}

.month-cell:hover .tooltip-text {
    display: block;
}

.month-cell.current-month {
    border: 2px solid #0d6efd !important;
}

.month-header {
    font-size: 0.75rem;
    color: #495057;
}

/* Таблица плана в стиле шаблона */
.table-custom thead th {
    background: #f8f9fa;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #6c757d;
    border-bottom: 2px solid #dee2e6;
}

.table-custom tbody tr:hover {
    background-color: #f5f8ff;
}

/* Кнопка «Отправить на согласование» */
.btn-send-approval {
    border-radius: 20px;
    font-size: 0.85rem;
    padding: 0.35rem 1rem;
}

/* Счётчики прогресса (3 блока: нагрузка / базовый / трек) */
.plan-stat-block {
    text-align: center;
    border: 1px solid #e8eaed;
    border-radius: 12px;
    padding: 0.75rem 0.5rem;
    background: #fafbfc;
}

.plan-stat-block .stat-label {
    font-size: 0.72rem;
    color: #9aa5b4;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 0.25rem;
}

.plan-stat-block .stat-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: #2c3e50;
}

.plan-stat-block .stat-percent {
    font-size: 0.78rem;
    font-weight: 600;
    margin-top: 0.15rem;
}
