:root {
    --bg: #f5f7fb;
    --card: #ffffff;
    --text: #172033;
    --muted: #6b7280;
    --primary: #2563eb;
    --line: #e5e7eb;
    --soft: #eef4ff;
    --danger: #dc2626;
    --ok: #16a34a;
    --warn: #ca8a04;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;

    font-family:
        Inter,
        system-ui,
        -apple-system,
        "Segoe UI",
        Arial,
        sans-serif;

    background: var(--bg);
    color: var(--text);
}

a {
    color: var(--primary);
    text-decoration: none;
}

/* Боковое меню */

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;

    width: 260px;
    padding: 24px;

    display: flex;
    flex-direction: column;
    gap: 26px;

    background: #0f172a;
    color: #ffffff;
}

.brand {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.sidebar nav {
    display: grid;
    gap: 8px;
}

.sidebar nav a {
    padding: 12px 14px;

    color: #dbeafe;

    border-radius: 14px;
}

.sidebar nav a:hover {
    background: #1e293b;
}

.userbox {
    margin-top: auto;

    color: #cbd5e1;
    font-size: 14px;
}

.userbox a {
    color: red;
}

/* Основная область */

.main {
    margin-left: 260px;
    padding: 32px;
}

.top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;

    margin-bottom: 22px;
}

/* Карточки и сетки */

.card {
    margin-bottom: 18px;
    padding: 22px;

    background: var(--card);

    border: 1px solid var(--line);
    border-radius: 22px;

    box-shadow:
        0 10px 30px
        rgba(15, 23, 42, 0.05);
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

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

/* Формы */

label {
    display: grid;
    gap: 7px;

    font-size: 14px;
    font-weight: 650;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 14px;

    font: inherit;

    background: #ffffff;
    color: var(--text);

    border: 1px solid var(--line);
    border-radius: 14px;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

/* Кнопки */

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;

    padding: 12px 16px;

    background: #e5e7eb;
    color: #111827;

    border: 0;
    border-radius: 14px;

    font-weight: 750;
    cursor: pointer;
}

.btn.primary {
    background: #2563eb;
    color: #ffffff;
    height: 50px;
    min-height: 50px;

    border: none;
    border-radius: 10px;

    padding: 11px 22px;

    font-size: 15px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.15s ease;
}

.btn.primary:hover {
    background: #1d4ed8;

    box-shadow:
        0 8px 20px
        rgba(37, 99, 235, 0.25);
}

.btn.primary:active {
    transform: translateY(1px);
}

.btn.primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.btn.danger {
    background: #dc3545;
    color: #ffffff;
    
    min-height: 60px
    border: none;
    border-radius: 10px;

    transition:
        background-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.15s ease;
}

.btn.danger:hover {
    background: #bb2d3b;

    box-shadow: 0 8px 18px rgba(220, 53, 69, 0.25);
}

.btn.danger:active {
    transform: translateY(1px);
}

.btn.full {
    width: 100%;
}

.btn.small {
    padding: 8px 11px;

    font-size: 13px;

    border-radius: 11px;
}

/* Таблицы */

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 13px;

    text-align: left;
    vertical-align: top;

    border-bottom: 1px solid var(--line);
}

.table th {
    background: #fafafa;

    color: var(--muted);
    font-size: 13px;
}

/* Статусы */

.badge {
    display: inline-flex;

    padding: 5px 10px;

    font-size: 12px;
    font-weight: 800;

    border-radius: 999px;
}

.badge.низкий {
    background: #fee2e2;
    color: #991b1b;
}

.badge.средний {
    background: #fef3c7;
    color: #92400e;
}

.badge.высокий {
    background: #dcfce7;
    color: #166534;
}

/* Текстовые элементы */

.muted {
    color: var(--muted);
    font-size: 14px;
}

.alert {
    margin: 10px 0;
    padding: 10px 12px;

    background: #fee2e2;
    color: #991b1b;

    border-radius: 12px;
}

/* Страница входа */

.login-bg {
    min-height: 100vh;

    display: grid;
    place-items: center;

    background:
        radial-gradient(
            circle at 20% 10%,
            #dbeafe,
            transparent 30%
        ),
        linear-gradient(
            135deg,
            #eef2ff,
            #f8fafc
        );
}

.login-card {
    width: min(440px, 92vw);
    padding: 30px;

    display: grid;
    gap: 16px;

    background: #ffffff;

    border: 1px solid var(--line);
    border-radius: 28px;

    box-shadow:
        0 20px 70px
        rgba(15, 23, 42, 0.12);
}

/* Критерии */

.criteria-row {
    display: grid;
    grid-template-columns: 90px 1fr 220px;
    gap: 14px;
    align-items: center;

    padding: 14px 0;

    border-bottom: 1px solid var(--line);
}

.criteria-section {
    margin-top: 18px;
    padding: 10px 14px;

    background: var(--soft);

    font-weight: 850;

    border-radius: 14px;
}

.score-options {
    display: flex;
    gap: 8px;
}

.score-options label {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    font-weight: 600;
}

/* Нижняя панель итогов */

.score-box {
    position: sticky;
    bottom: 16px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;

    padding: 16px 20px;

    background: #0f172a;
    color: #ffffff;

    border-radius: 20px;

    box-shadow:
        0 12px 40px
        rgba(15, 23, 42, 0.25);
}

/* Статистика */

.statcards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat {
    padding: 20px;

    background:
        linear-gradient(
            135deg,
            #ffffff,
            #eef4ff
        );

    border: 1px solid var(--line);
    border-radius: 20px;
}

.stat b {
    font-size: 28px;
}

/* Эмблема школы */

.school-logo-wrap {
    margin-top: 14px;
    text-align: center;
}

.school-logo {
    width: 82px;
    height: 82px;

    display: inline-block;

    object-fit: contain;
}

.school-name {
    margin-top: 10px;

    color: #64748b;

    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;

    text-align: center;
}

.app-name {
    font-weight: 800;
    line-height: 1.25;
}

/* Печать */

.print-only {
    display: none;
}

/* Адаптивность */

@media (max-width: 900px) {
    .sidebar {
        position: static;
        width: auto;
    }

    .main {
        margin-left: 0;
    }

    .grid,
    .grid2,
    .statcards {
        grid-template-columns: 1fr;
    }

    .criteria-row {
        grid-template-columns: 1fr;
    }

    .score-box {
        position: static;
    }
}

/* Версия для печати */

@media print {
    .sidebar,
    .no-print,
    .btn {
        display: none !important;
    }

    .main {
        margin: 0;
        padding: 0;
    }

    .card {
        padding: 0;

        border: 0;
        box-shadow: none;
    }

    .print-only {
        display: block;
    }

    body {
        background: #ffffff;
    }

    .table th,
    .table td {
        padding: 7px;

        font-size: 12px;

        border: 1px solid #333333;
    }

    .official {
        color: #000000;
        font-family: "Times New Roman", serif;
    }

    .official h1 {
        text-align: center;
        font-size: 17px;
    }

    .official .line {
        min-height: 28px;

        border-bottom: 1px solid #000000;
    }

    .official-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;

        margin: 10px 0;
    }

    .official p {
        margin: 7px 0;
    }
}
/* Кнопка PDF / печать */

/* Кнопка PDF / печать */

.btn.print {
    background: #6b7280;
    color: #ffffff;

    border: none;
    border-radius: 10px;

    transition:
        background-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.15s ease;
}

.btn.print:hover {
    background: #4b5563;

    box-shadow:
        0 8px 18px
        rgba(75, 85, 99, 0.25);
}

.btn.print:active {
    transform: translateY(1px);
}
/* ---------- Форма поиска ---------- */

.search-form {

    display: grid;

    grid-template-columns:
        330px
        180px
        170px
        170px
        auto;

    gap: 16px;

    align-items: end;

}


/* ---------- Кнопки ---------- */

.search-buttons {

    display: flex;

    gap: 12px;

    align-items: end;

}


.search-buttons .btn {
    height: 50px;
}


/* ---------- Планшеты ---------- */

@media (max-width:1200px) {

    .search-form {

        grid-template-columns:
            repeat(2,1fr);

    }

}


/* ---------- Телефоны ---------- */

@media (max-width:700px) {

    .search-form {

        grid-template-columns:
            1fr;

    }

    .search-buttons {

        flex-direction: column;

    }

    .search-buttons .btn {

        width: 100%;

    }

}
..export-btn {

    width: 280px;

    height: 60px;
    min-height: 60px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    text-align: center;
    line-height: 1.2;
    white-space: normal;

    background: #6b7280;
    color: #ffffff;

    border: none;
    border-radius: 10px;

    text-decoration: none;

    transition:
        background-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.15s ease;

}

.export-btn:hover {

    background: #9ca3af;
    color: #ffffff;

    box-shadow:
        0 8px 18px
        rgba(75, 85, 99, 0.25);

}

.export-btn:active {

    transform: translateY(1px);

}
.search-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-start;
    align-items: end;
}
/* ---------- Блок логотипа ---------- */

.brand {

    display: flex;
    flex-direction: column;

    align-items: flex-start;

    gap: 8px;

}

.brand-logo {

    width: 50px;
    height: 50px;

}

.logo-img {

    width: 50px;
    height: 50px;

    display: block;

    object-fit: contain;

}

.school-title {

    font-size: 11px;

    line-height: 1.25;

    color: #94a3b8;

    text-align: left;

}

.app-name {

    font-size: 22px;

    font-weight: 800;

    line-height: 1.25;

    color: #ffffff;

}
.observer-export-btn {
    width: 280px;
    height: 60px;
    min-height: 60px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    text-align: center;
    line-height: 1.2;
    white-space: normal;

    background: #6b7280;
    color: #ffffff;

    border: none;
    border-radius: 10px;

    text-decoration: none;

    transition:
        background-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.15s ease;
}

.observer-export-btn:hover {
    background: #4B5563;
    color: #ffffff;

    box-shadow:
        0 8px 18px
        rgba(75, 85, 99, 0.25);
}

.observer-export-btn:active {
    transform: translateY(1px);
}
/* ---------- Кнопка "Сбросить" ---------- */

.reset-btn {

    width: 180px;

    height: 60px;
    min-height: 60px;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    text-align: center;
    line-height: 1.2;
    white-space: normal;

    background: #dc3545;
    color: #ffffff;

    border: none;
    border-radius: 10px;

    text-decoration: none;
    cursor: pointer;

    transition:
        background-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.15s ease;

}

.reset-btn:hover {

    background: #bb2d3b;
    color: #ffffff;

    box-shadow:
        0 8px 18px
        rgba(71, 85, 105, 0.25);

}

.reset-btn:active {

    transform: translateY(1px);

}
/* ==========================
   Нижняя часть сайта
========================== */

.site-footer {
    margin-top: 0px;

    padding: 10px 0px 12px 150px;
    
    border-top: 1px solid #dbe3ef;

    text-align: center;

    color: #64748b;

    font-size: 13px;
    line-height: 1.4;
}



/* ==========================
   Cookie
========================== */

.cookie-banner {

    position: fixed;

    left: 20px;
    right: 20px;
    bottom: 20px;

    display: none;

    justify-content: space-between;
    align-items: center;

    gap: 20px;

    padding: 18px 22px;

    background: #0f172a;

    color: #ffffff;

    border-radius: 16px;

    box-shadow:
        0 12px 35px
        rgba(0,0,0,.25);

    z-index: 9999;

}


.cookie-text {

    font-size: 14px;

    line-height: 1.5;

}


.cookie-btn {

    background: #2563eb;

    color: #ffffff;

    min-width: 150px;

}


.cookie-btn:hover {

    background: #1d4ed8;

}
.login-brand-block {
    display: flex;
    flex-direction: column;

    align-items: center;

    gap: 8px;

    text-align: center;
}

.login-logo {
    width: 60px;
    height: 60px;

    display: block;

    object-fit: contain;
}

.login-school-name {
    max-width: 360px;

    color: #64748b;

    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.login-app-name {
    margin-top: 8px;

    color: #0f172a;

    font-size: 23px;
    font-weight: 800;
    line-height: 1.25;
}

.login-title {
    margin: 6px 0 2px;

    color: #172033;

    font-size: 20px;
    font-weight: 700;
}
/* Кнопки формы поиска в реестре */

/* Блок кнопок фильтра на странице реестра */

.registry-search-buttons {
    grid-column: 1 / -1;

    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;

    gap: 12px;

    margin-top: 4px;
}

/* Одинаковые размеры всех трёх кнопок */

.registry-search-buttons .registry-action-btn {
    width: 170px;
    min-width: 170px;

    height: 50px;
    min-height: 50px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 10px 16px;

    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;

    text-align: center;
    white-space: normal;

    border: none;
    border-radius: 10px;

    box-sizing: border-box;
    cursor: pointer;
}

/* Кнопка «Выгрузить» */

.registry-export-btn {
    background: #6b7280;
    color: #ffffff;

    transition:
        background-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.15s ease;
}

.registry-export-btn:hover {
    background: #4b5563;
    color: #ffffff;

    box-shadow:
        0 8px 18px
        rgba(75, 85, 99, 0.25);
}

.registry-export-btn:active {
    transform: translateY(1px);
}

/* На узких экранах кнопки занимают всю ширину */

@media (max-width: 700px) {
    .registry-search-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .registry-search-buttons .registry-action-btn {
        width: 100%;
        min-width: 100%;
    }
}

.registry-export-btn:hover {
    background: #4b5563;
    color: #ffffff;

    box-shadow:
        0 8px 18px
        rgba(75, 85, 99, 0.25);
}

.registry-export-btn:active {
    transform: translateY(1px);
}

@media (max-width: 700px) {
    .registry-search-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .registry-action-btn {
        width: 100%;
    }
}
/* =====================================
   Раздел анализа урока
===================================== */

.analysis-heading {
    margin-top: 0;

    background: var(--soft);
    color: var(--text);
}

.analysis-content {
    padding-top: 18px;
}

.analysis-generate-btn {
    min-width: 280px;

    margin-bottom: 15px;
}

.lesson-analysis-text {
    width: 100%;
    min-height: 350px;

    padding: 16px;

    resize: vertical;

    background: #ffffff;
    color: var(--text);

    border: 1px solid #cbd5e1;
    border-radius: 12px;

    font-size: 15px;
    line-height: 1.6;

    text-align: justify;

    box-sizing: border-box;
}

.analysis-generate-btn:disabled {
    opacity: 0.65;
    cursor: wait;
}
/* Кнопка "Анализ" */

.btn.analysis-btn {

    background-color: #2563eb !important;
    color: #ffffff !important;

    border: none !important;

    transition:
        background-color .25s ease,
        box-shadow .25s ease,
        transform .15s ease;

}

.btn.analysis-btn:hover {

    background-color: #1d4ed8 !important;
    color: #ffffff !important;

    box-shadow:
        0 8px 18px
        rgba(37,99,235,.25);

}

.btn.analysis-btn:active {

    transform: translateY(1px);

}
/* =====================================
   Выполнение норм посещения уроков
===================================== */

.stats-section-heading {
    margin-bottom: 18px;
}

.stats-section-heading h2 {
    margin:
        0
        0
        7px;
}

.norm-year-form {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 12px;

    margin-bottom: 20px;
}

.norm-year-form label {
    width: 220px;
}

.norm-filter-btn {
    width: 170px;
    height: 50px;
    min-height: 50px;
}

.norm-table-wrap {
    width: 100%;

    overflow-x: auto;
}

.norm-table {
    min-width: 1450px;
}

.norm-table th,
.norm-table td {
    text-align: center;
    vertical-align: middle;
}

.norm-table th:first-child,
.norm-table td:first-child,
.norm-table th:nth-child(2),
.norm-table td:nth-child(2) {
    text-align: left;
}

.norm-observer-name {
    min-width: 230px;

    font-weight: 400;
}

.norm-complete {
    background: #dcfce7;
    color: #166534;
}

.norm-partial {
    background: #fef3c7;
    color: #92400e;
}

.norm-empty {
    background: #fee2e2;
    color: #991b1b;
}

.norm-total-row th {
    background: #e0e7ff;
    color: #1e3a8a;

    font-weight: 800;
}

@media print {
    .norm-table {
        min-width: 0;

        font-size: 9px;
    }

    .norm-table th,
    .norm-table td {
        padding: 4px;
    }

    .norm-complete,
    .norm-partial,
    .norm-empty,
    .norm-total-row th {
        color: #000000;

        background: transparent;
    }
}

@media (max-width: 700px) {
    .norm-year-form {
        flex-direction: column;
        align-items: stretch;
    }

    .norm-year-form label,
    .norm-filter-btn {
        width: 100%;
    }
}
/* =====================================
   Кнопки раздела "Анализ урока"
===================================== */

.analysis-buttons {

    display: flex;

    gap: 12px;

    flex-wrap: wrap;

    margin-top: 18px;

}

.analysis-save-btn,
.analysis-print-btn {

    width: 190px;

    height: 50px;
    min-height: 50px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    text-align: center;

    font-size: 15px;
    font-weight: 600;

    border-radius: 10px;

}

.analysis-print-btn {

    background: #6b7280;
    color: #ffffff;

    text-decoration: none;

    transition:
        background-color .25s ease,
        box-shadow .25s ease,
        transform .15s ease;

}

.analysis-print-btn:hover {

    background: #4b5563;
    color: #ffffff;

    box-shadow:
        0 8px 18px
        rgba(75,85,99,.25);

}

.analysis-print-btn:active {

    transform: translateY(1px);

}

@media (max-width:700px){

    .analysis-buttons{

        flex-direction:column;

    }

    .analysis-save-btn,
    .analysis-print-btn{

        width:100%;

    }

}
/* -------------------------------------------------------
   Кнопка "Наверх"
-------------------------------------------------------- */

.scroll-top-btn{

    position: fixed;

    right: 24px;
    bottom: 24px;

    width: 52px;
    height: 52px;

    border: none;
    border-radius: 50%;

    background: #2563eb;
    color: #fff;

    font-size: 24px;
    font-weight: 700;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 8px 20px rgba(0,0,0,.18);

    opacity: 0;
    visibility: hidden;

    transform: translateY(20px);

    transition:
        opacity .25s,
        transform .25s,
        background .2s;

    z-index: 9999;
}

.scroll-top-btn.show{

    opacity: 1;

    visibility: visible;

    transform: translateY(0);

}

.scroll-top-btn:hover{

    background: #1d4ed8;

}

@media (max-width:768px){

    .scroll-top-btn{

        width: 46px;
        height: 46px;

        right: 16px;
        bottom: 16px;

        font-size: 20px;

    }

}
.profile-header-top{

    display:flex;

    justify-content:space-between;

    align-items:flex-end;

    gap:20px;

    flex-wrap:wrap;

}

.profile-header-actions{

    margin-top:16px;

    display:flex;

    gap:12px;

    flex-wrap:wrap;

}

@media (max-width:768px){

    .profile-header-top{

        flex-direction:column;

        align-items:stretch;

    }

    .profile-header-actions{

        flex-direction:column;

    }

    .profile-header-actions .btn{

        width:100%;

    }

}