*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #eeece6;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"), radial-gradient(at 15% 20%, rgba(23, 69, 163, 0.12) 0px, transparent 50%), radial-gradient(at 85% 15%, rgba(167, 139, 250, 0.10) 0px, transparent 50%), radial-gradient(at 75% 75%, rgba(147, 197, 253, 0.12) 0px, transparent 50%), radial-gradient(at 20% 85%, rgba(196, 181, 253, 0.10) 0px, transparent 50%), radial-gradient(at 50% 50%, rgba(255, 255, 255, 0.4) 0px, transparent 60%);
    background-attachment: fixed;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1a1a2e;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

address {
    font-style: normal;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.glass-card {
    position: relative;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    border-radius: 28px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 24px rgba(23, 69, 163, 0.06), 0 1px 4px rgba(0, 0, 0, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease;
}

    .glass-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 40px rgba(23, 69, 163, 0.1), 0 4px 12px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 1);
    }

.card-content {
    position: relative;
    z-index: 1;
}

.card-header {
    margin-bottom: 1.5rem;
}

.card-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #1745a3;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.375rem 0.875rem;
    background: rgba(23, 69, 163, 0.08);
    border-radius: 100px;
    border: 1px solid rgba(23, 69, 163, 0.12);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    margin-top: 1rem;
}

.section-number {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1745a3;
    letter-spacing: 0.05em;
    font-variant-numeric: tabular-nums;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 300;
    color: #1a1a2e;
    letter-spacing: -0.01em;
}

.bento-grid {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.bento-profile-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.bento-progress-widgets {
    grid-template-columns: 1fr 1fr;
}

.bento-sessions {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.bento-actions {
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 1024px) {
    .bento-profile-grid {
        grid-template-columns: 1fr 1fr;
    }

    .bento-sessions {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .bento-profile-grid,
    .bento-progress-widgets,
    .bento-sessions,
    .bento-actions {
        grid-template-columns: 1fr;
    }
}

.page-hero {
    padding: 3rem 0 2rem;
}

.page-content {
    padding: 2rem 0 5rem;
}

.hero-glass {
    position: relative;
    padding: 4rem 3rem;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 32px rgba(23, 69, 163, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    overflow: hidden;
}

.hero-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.8125rem;
    color: #6b7280;
}

    .hero-breadcrumbs a {
        color: #6b7280;
        transition: color 0.2s ease;
    }

        .hero-breadcrumbs a:hover {
            color: #1745a3;
        }

    .hero-breadcrumbs .separator {
        color: #d1d5db;
    }

.hero-title {
    font-size: 3.5rem;
    font-weight: 200;
    line-height: 1.3;
    color: #1a1a2e;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: #4b5563;
    line-height: 1.6;
    max-width: 720px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    border: none;
    outline: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
    background: transparent;
}

    .btn:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(23, 69, 163, 0.15);
    }

    .btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.btn-primary {
    background: linear-gradient(135deg, #1745a3 0%, #6366f1 100%);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(23, 69, 163, 0.25);
}

    .btn-primary:hover:not(:disabled) {
        transform: translateY(-2px) scale(1.03);
        box-shadow: 0 8px 28px rgba(23, 69, 163, 0.35);
    }

.btn-secondary {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    color: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 16px rgba(23, 69, 163, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

    .btn-secondary:hover:not(:disabled) {
        transform: translateY(-2px);
        background: rgba(255, 255, 255, 0.8);
        box-shadow: 0 8px 24px rgba(23, 69, 163, 0.12), inset 0 1px 0 rgba(255, 255, 255, 1);
    }

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

    .btn-sm.btn-primary {
        background: linear-gradient(135deg, #1745a3 0%, #6366f1 100%);
        color: white;
        box-shadow: 0 2px 6px rgba(23, 69, 163, 0.2);
    }

        .btn-sm.btn-primary:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 10px rgba(23, 69, 163, 0.3);
        }

    .btn-sm.btn-secondary {
        background: rgba(23, 69, 163, 0.06);
        color: #4b5563;
    }

        .btn-sm.btn-secondary:hover {
            background: rgba(23, 69, 163, 0.12);
            color: #1a1a2e;
        }

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #1a1a2e;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    font-family: inherit;
    color: #1a1a2e;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(23, 69, 163, 0.12);
    border-radius: 14px;
    transition: all 0.2s ease;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

    .form-input:focus {
        background: rgba(255, 255, 255, 0.9);
        border-color: rgba(23, 69, 163, 0.4);
        box-shadow: 0 0 0 3px rgba(23, 69, 163, 0.1);
    }

    .form-input::placeholder {
        color: #9ca3af;
    }

    .form-input:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    animation: fadeInModal 0.2s ease-out;
}

.modal-content {
    position: relative;
    max-width: 400px;
    width: 100%;
    animation: slideUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    color: #1a1a2e;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

    .modal-close:hover {
        background: #ffffff;
        transform: scale(1.1);
    }

@keyframes fadeInModal {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(23, 69, 163, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #ffffff;
    padding: 0.875rem 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 9999;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 -4px 24px rgba(23, 69, 163, 0.2);
}

    #blazor-error-ui a {
        color: #ffffff;
        text-decoration: underline;
        font-weight: 600;
        margin-left: 0.5rem;
    }

    #blazor-error-ui .dismiss {
        cursor: pointer;
        margin-left: 1rem;
        opacity: 0.7;
    }

        #blazor-error-ui .dismiss:hover {
            opacity: 1;
        }

@media (max-width: 1024px) {
    .hero-title {
        font-size: 2.75rem;
    }

    .section-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero-glass {
        padding: 2.5rem 1.5rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .glass-card {
        padding: 1.5rem;
    }
}

.empty-cell {
    height: 100%;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d1d5db;
    font-size: 1rem;
    font-weight: 600;
    border: 1px dashed rgba(23, 69, 163, 0.15);
    border-radius: 6px;
    transition: all 0.2s ease;
}

    .empty-cell:hover {
        border-color: #1745a3;
        color: #1745a3;
        background: rgba(23, 69, 163, 0.02);
    }

.pair-content {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.375rem;
    border-radius: 6px;
}

    .pair-content:hover {
        background: rgba(23, 69, 163, 0.04);
    }

.btn-edit-cell, .btn-delete-cell {
    position: absolute;
    top: 2px;
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-edit-cell {
    right: 24px;
    background: rgba(23, 69, 163, 0.1);
    color: #1745a3;
}

    .btn-edit-cell:hover {
        background: #1745a3;
        color: white;
    }

.btn-delete-cell {
    right: 2px;
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

    .btn-delete-cell:hover {
        background: #dc2626;
        color: white;
    }

.discipline-name {
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.2;
    font-size: 0.75rem;
}

.pair-meta {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    font-size: 0.6875rem;
    color: #4b5563;
}

.lesson-type-badge {
    font-size: 0.5625rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.125rem 0.25rem;
    border-radius: 3px;
    background: rgba(23, 69, 163, 0.1);
    color: #1745a3;
    align-self: flex-start;
}

/* ===== Печать из кабинета =====
   Боковая панель и служебные плашки на бумаге не нужны. Оболочка перестаёт быть flex:
   разрывы страниц внутри flex-элементов браузеры поддерживают не везде.
   Именованная страница фиксирует формат и поля листа журнала посещаемости, чтобы не зависеть
   от настроек принтера (см. AttendanceJournalSheet.razor.css — вёрстка рассчитана на эти поля).
   Объявлена глобально: @page — правило документа, а не элемента, в scoped-CSS ему не место. */
@page attendance-journal {
    size: A4 portrait;
    margin: 8mm;
}

@media print {
    body {
        background: #fff !important;
    }

    .app-sidebar,
    .snackbar-container,
    .build-badge {
        display: none !important;
    }

    .app-shell {
        display: block !important;
        min-height: 0 !important;
    }
}
