/* VERSION 2.1 */

/* ==========================================================
   ОСНОВНАЯ ОБЛАСТЬ XPLATFORM
========================================================== */

.xp-dashboard {
    min-height: 100vh;
    padding: 28px;
    background: #f4f7fb;
}


/* ==========================================================
   ПРИВЕТСТВЕННЫЙ БЛОК
========================================================== */

.xp-hero {
    padding: 28px 32px;
    margin-bottom: 24px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.xp-version {
    display: inline-block;
    padding: 5px 10px;
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 700;
    color: #1d4ed8;
    background: #dbeafe;
    border-radius: 999px;
}

.xp-title {
    margin: 0 0 8px;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.25;
    color: #172033;
}

.xp-subtitle {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #64748b;
}


/* ==========================================================
   КАРТОЧКИ СТАТИСТИКИ
========================================================== */

.xp-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 32px;
}

.xp-stat-card {
    position: relative;
    padding: 22px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.xp-stat-card:hover {
    transform: translateY(-3px);
    border-color: #cbd5e1;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.09);
}

.xp-stat-icon {
    margin-bottom: 12px;
    font-size: 28px;
    line-height: 1;
}

.xp-stat-value {
    margin-bottom: 4px;
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
    color: #0f172a;
}

.xp-stat-label {
    font-size: 14px;
    color: #64748b;
}


/* ==========================================================
   ЗАГОЛОВКИ РАЗДЕЛОВ
========================================================== */

.xp-section-title {
    margin: 0 0 18px;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    color: #172033;
}


/* ==========================================================
   СЕТКА КУРСОВ
========================================================== */

.xp-course-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}


/* ==========================================================
   КАРТОЧКА КУРСА
========================================================== */

.xp-course-card {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.xp-course-header {
    padding: 20px 22px;
    background: linear-gradient(135deg, #eef4ff, #f8fbff);
    border-bottom: 1px solid #e2e8f0;
}

.xp-course-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    color: #172033;
}


/* ==========================================================
   СПИСОК ГРУПП НА ГЛАВНОЙ СТРАНИЦЕ
========================================================== */

.xp-group-list {
    padding: 14px;
}

.xp-group-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px;
    border: 1px solid transparent;
    border-radius: 14px;
    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}

.xp-group-card + .xp-group-card {
    margin-top: 8px;
}

.xp-group-card:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.xp-group-left {
    min-width: 0;
}

.xp-group-name {
    margin-bottom: 5px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    color: #1e293b;
}

.xp-group-info {
    font-size: 13px;
    line-height: 1.5;
    color: #94a3b8;
}

.xp-group-right {
    flex-shrink: 0;
}

.xp-group-card .btn {
    padding: 8px 15px;
    font-weight: 600;
    border-radius: 10px;
}


/* ==========================================================
   ПУСТОЕ СОСТОЯНИЕ
========================================================== */

.xp-empty-state {
    padding: 36px;
    text-align: center;
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 18px;
}

.xp-empty-state h3 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 700;
    color: #172033;
}

.xp-empty-state p {
    margin: 0;
    color: #64748b;
}


/* ==========================================================
   СТРАНИЦА ГРУППЫ
========================================================== */

.xp-group-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}


/* ==========================================================
   ЛЕВОЕ МЕНЮ СТРАНИЦЫ ГРУППЫ
========================================================== */

.xp-sidebar {
    position: sticky;
    top: 20px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.xp-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 6px;
    color: #334155;
    font-weight: 500;
    line-height: 1.4;
    text-decoration: none;
    border-radius: 10px;
    transition:
        color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.xp-menu-item:last-child {
    margin-bottom: 0;
}

.xp-menu-item:hover {
    color: #2563eb;
    text-decoration: none;
    background: #eff6ff;
    transform: translateX(2px);
}

.xp-menu-item:focus {
    color: #2563eb;
    text-decoration: none;
    outline: 2px solid #bfdbfe;
    outline-offset: 2px;
}

.xp-menu-item.active {
    color: #ffffff;
    font-weight: 600;
    background: #2563eb;
}

.xp-menu-item.active:hover {
    color: #ffffff;
    background: #1d4ed8;
}


/* ==========================================================
   РАБОЧАЯ ОБЛАСТЬ СТРАНИЦЫ ГРУППЫ
========================================================== */

.xp-content {
    min-width: 0;
    padding: 28px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.xp-content h3 {
    margin: 0 0 18px;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    color: #172033;
}

.xp-content p {
    margin-top: 0;
    line-height: 1.6;
    color: #64748b;
}

.xp-content p:last-child {
    margin-bottom: 0;
}

/* ==========================================================
   УЧЕНИКИ
========================================================== */

.xp-student-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.xp-student-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    transition: 0.2s;
}

.xp-student-card:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.xp-student-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    font-size: 22px;
    background: #dbeafe;
    border-radius: 50%;
}

.xp-student-info {
    flex: 1;
    min-width: 0;
}

.xp-student-name {
    font-size: 17px;
    font-weight: 700;
    color: #172033;
}

.xp-student-email {
    margin-top: 4px;
    color: #64748b;
    font-size: 14px;
}

.xp-student-actions {
    flex-shrink: 0;
}

.xp-content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.xp-content-header h3 {
    margin: 0;
}


/* ==========================================================
   ОТЧЁТ О ПРОГРЕССЕ УЧЕНИКА
========================================================== */

.xp-parent-report {
    padding: 28px;
    background: #f4f7fb;
    border-radius: 18px;
}

.xp-report-toolbar {
    margin-bottom: 20px;
}

.xp-report-toolbar .btn {
    padding: 9px 15px;
    font-weight: 600;
    border-radius: 10px;
}

.xp-report-hero {
    padding: 26px 30px;
    margin-bottom: 22px;
    background: linear-gradient(135deg, #eef4ff, #ffffff);
    border: 1px solid #dbeafe;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.xp-report-hero__label {
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #2563eb;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.xp-report-hero__title {
    margin: 0 0 8px;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.2;
    color: #172033;
}

.xp-report-hero__meta {
    font-size: 15px;
    color: #64748b;
}

.xp-report-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.xp-report-card {
    padding: 24px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.xp-report-card__title {
    margin: 0 0 18px;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.3;
    color: #172033;
}

.xp-report-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 0;
    border-bottom: 1px solid #eef2f7;
}

.xp-report-row:last-child {
    border-bottom: 0;
}

.xp-report-row__label {
    color: #64748b;
}

.xp-report-row > :last-child {
    text-align: right;
    color: #1e293b;
}

.xp-report-empty {
    padding: 20px;
    color: #64748b;
    text-align: center;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
}


/* ==========================================================
   ПЛАНШЕТЫ
========================================================== */

@media (max-width: 1100px) {
    .xp-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .xp-course-grid,
    .xp-group-layout,
    .xp-report-grid {
        grid-template-columns: 1fr;
    }

    .xp-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .xp-menu-item {
        margin-bottom: 0;
    }
}


/* ==========================================================
   ТЕЛЕФОНЫ
========================================================== */

@media (max-width: 700px) {
    .xp-dashboard {
        padding: 16px;
    }

    .xp-hero {
        padding: 22px;
        border-radius: 15px;
    }

    .xp-title {
        font-size: 24px;
    }

    .xp-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .xp-stat-card {
        padding: 18px;
    }

    .xp-course-grid {
        gap: 16px;
    }

    .xp-course-card {
        border-radius: 15px;
    }

    .xp-course-header {
        padding: 17px 18px;
    }

    .xp-group-card {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .xp-group-right,
    .xp-group-card .btn {
        width: 100%;
    }

    .xp-group-card .btn {
        display: block;
        text-align: center;
    }

    .xp-group-layout {
        gap: 16px;
    }

    .xp-sidebar {
        display: block;
        padding: 12px;
        border-radius: 15px;
    }

    .xp-menu-item {
        margin-bottom: 6px;
    }

    .xp-menu-item:last-child {
        margin-bottom: 0;
    }

    .xp-content {
        padding: 22px;
        border-radius: 15px;
    }

    .xp-content h3 {
        font-size: 21px;
    }

    .xp-content-header {
        flex-direction: column;
        align-items: stretch;
    }

    .xp-content-header .btn,
    .xp-student-actions,
    .xp-student-actions .btn {
        width: 100%;
    }

    .xp-content-header .btn {
        text-align: center;
    }

    .xp-student-card {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .xp-parent-report {
        padding: 16px;
        border-radius: 14px;
    }

    .xp-report-hero {
        padding: 22px;
        border-radius: 15px;
    }

    .xp-report-hero__title {
        font-size: 25px;
    }

    .xp-report-card {
        padding: 20px;
        border-radius: 14px;
    }

    .xp-report-row {
        flex-direction: column;
        gap: 4px;
    }

    .xp-report-row > :last-child {
        text-align: left;
    }
}
/* ==========================================================
   ЖУРНАЛ ПОСЕЩАЕМОСТИ
========================================================== */

.xplatform-attendance-row {
    transition:
        background-color .2s ease,
        border-color .2s ease;
}

/* Присутствовал */

.xplatform-present {
    background: #ecfdf5;
}

.xplatform-present:hover {
    background: #d1fae5;
}

/* Опоздал */

.xplatform-late {
    background: #fffbeb;
}

.xplatform-late:hover {
    background: #fef3c7;
}

/* Отсутствовал по уважительной причине */

.xplatform-excused {
    background: #fff7ed;
}

.xplatform-excused:hover {
    background: #fed7aa;
}

/* Отсутствовал */

.xplatform-absent {
    background: #fef2f2;
}

.xplatform-absent:hover {
    background: #fecaca;
}

/* Не отмечен */

.xplatform-notmarked {
    background: #ffffff;
}

/* Поле "Опоздание" */

.xplatform-attendance-late {
    max-width: 90px;
    text-align: center;
}

/* Поле комментария */

.xplatform-attendance-comment {
    min-width: 220px;
}