/* ========== ОСНОВНЫЕ ПЕРЕМЕННЫЕ ========== */
:root {
    --gradient-start: #667eea; /* голубовато-сиреневый */
    --gradient-end: #764ba2; /* глубокий фиолетовый */
    --gradient-bg: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    --primary-light: #f8f9ff; /* очень светлый фон */
    --white: #ffffff;
    --text-dark: #2d3748;
    --text-light: #718096;
    --border-light: #e2e8f0;
}

/* ========== ОБЩИЕ СТИЛИ ========== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    background: var(--gradient-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    flex: 1;
}

/* ========== ЛЕНДИНГ (НЕАВТОРИЗОВАННАЯ ГЛАВНАЯ) ========== */
.landing-page {
    background: transparent;
}

/* Шапка */
.landing-header {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.landing-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .logo i {
        font-size: 2rem;
        color: var(--gradient-start);
    }

    .logo span {
        font-size: 1.5rem;
        font-weight: 600;
        background: var(--gradient-bg);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

    .nav-links a {
        text-decoration: none;
        color: var(--text-dark);
        font-weight: 500;
        transition: color 0.3s;
    }

        .nav-links a:hover {
            color: var(--gradient-start);
        }

    .nav-links .btn {
        padding: 0.5rem 1.5rem;
        border-radius: 25px;
        font-weight: 500;
    }

    .nav-links .btn-outline-primary {
        border: 1px solid var(--gradient-end);
        color: var(--gradient-end);
        background: transparent;
    }

        .nav-links .btn-outline-primary:hover {
            background: var(--gradient-end);
            color: white;
        }

/* Hero секция */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 80px 5% 0;
    background: var(--gradient-bg);
    color: white;
    position: relative;
    overflow: hidden;
}

    .hero-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,170.7C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"/></svg>');
        background-repeat: no-repeat;
        background-position: bottom;
        background-size: cover;
        opacity: 0.1;
    }

.hero-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

    .hero-buttons .btn {
        padding: 1rem 2.5rem;
        border-radius: 50px;
        font-size: 1.1rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 1px;
        transition: transform 0.3s, box-shadow 0.3s;
    }

        .hero-buttons .btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 20px rgba(0,0,0,0.2);
        }

        .hero-buttons .btn:first-child {
            background: var(--gradient-end);
            color: white;
            border: none;
        }

    .hero-buttons .btn-outline {
        background: transparent;
        color: white;
        border: 2px solid white;
    }

.hero-image img {
    width: 100%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%,100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Секция возможностей и "О системе" (общие стили) */
.features-section {
    padding: 5rem 5%;
    background: white;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

    .section-title h2 {
        font-size: 2.5rem;
        color: var(--text-dark);
        margin-bottom: 1rem;
    }

    .section-title p {
        color: var(--text-light);
        font-size: 1.1rem;
    }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s;
}

    .feature-card:hover {
        transform: translateY(-10px);
    }

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

    .feature-icon i {
        font-size: 2rem;
        color: white;
    }

.feature-card h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Футер (с градиентом, содержит контакты) */
.landing-footer {
    background: var(--gradient-bg);
    color: white;
    padding: 3rem 5% 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-section h4 {
    margin-bottom: 1.5rem;
    color: white;
    font-size: 1.2rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

    .footer-section ul li {
        margin-bottom: 0.5rem;
    }

        .footer-section ul li a {
            color: rgba(255,255,255,0.8);
            text-decoration: none;
            transition: color 0.3s;
        }

            .footer-section ul li a:hover {
                color: white;
            }

.footer-section p {
    color: rgba(255,255,255,0.9);
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

    .social-links a {
        width: 40px;
        height: 40px;
        background: rgba(255,255,255,0.2);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        text-decoration: none;
        transition: background 0.3s;
    }

        .social-links a:hover {
            background: rgba(255,255,255,0.3);
        }

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.2);
}

/* Адаптивность лендинга */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .landing-nav {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ========== ДАШБОРД (АВТОРИЗОВАННЫЕ) ========== */
.dashboard-page {
    background: #f8f9fa;
}

.dashboard {
    background: #f8f9fa;
    min-height: calc(100vh - 60px);
    padding: 20px 0;
}

    .dashboard .card {
        border-radius: 15px !important;
        border: none;
        overflow: hidden;
    }

    .dashboard .card-header {
        border-radius: 15px 15px 0 0 !important;
        border: none;
    }

.welcome-card {
    background: white;
    color: var(--text-dark);
    border-radius: 15px !important;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-light);
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.stat-card {
    background: white;
    border-radius: 15px !important;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    height: 100%;
}

    .stat-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    }

.stat-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-bg);
    border-radius: 12px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Профиль пользователя */
.profile-header {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.profile-cover {
    height: 200px;
    background: var(--gradient-bg);
    position: relative;
}

.profile-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid white;
    background: white;
    position: absolute;
    bottom: -75px;
    left: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--gradient-end);
}

.profile-info {
    padding: 100px 2rem 2rem 2rem;
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out;
}

/* Футер для авторизованных (отличается от лендинга) */
.footer {
    background: white;
    border-top: 1px solid #dee2e6;
    padding: 1rem 0;
    margin-top: 2rem;
}

/* ===== MODERN DASHBOARD ===== */
.dashboard-modern {
    padding: 1rem 0;
}

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

@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Приветствие */
.welcome-modern {
    background: white;
    border-radius: 24px;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.02);
}

.welcome-text h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.welcome-avatar .avatar-initials {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    font-weight: 500;
}

/* Карточки статистики */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
    margin-bottom: 1.8rem;
}

.stat-card-modern {
    background: white;
    border-radius: 24px;
    padding: 1.5rem 1.2rem;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid rgba(0,0,0,0.02);
    transition: transform 0.2s, box-shadow 0.2s;
}

    .stat-card-modern:hover {
        transform: translateY(-3px);
        box-shadow: 0 15px 30px -8px rgba(102,126,234,0.2);
    }

.stat-icon-modern {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.stat-content h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.stat-content p {
    margin: 0;
    color: #718096;
    font-size: 0.9rem;
}

.stat-content small {
    font-size: 0.8rem;
}

/* Основные карточки контента */
.content-card {
    background: white;
    border-radius: 24px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.02);
}

.card-header-custom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

    .card-header-custom h5 {
        font-size: 1.2rem;
        font-weight: 600;
        margin: 0;
        color: #2d3748;
    }

.btn-outline-primary {
    border: 1px solid #667eea;
    color: #667eea;
    background: transparent;
    padding: 0.3rem 1rem;
    border-radius: 30px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: 0.2s;
}

    .btn-outline-primary:hover {
        background: #667eea;
        color: white;
    }

/* Сетка документов */
.documents-grid {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.document-card {
    display: flex;
    gap: 1rem;
    padding: 0.8rem;
    border-radius: 18px;
    background: #f8fafd;
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
}

    .document-card:hover {
        background: #edf2f7;
    }

.doc-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.doc-info h6 {
    font-weight: 600;
    margin: 0 0 0.2rem 0;
    color: #2d3748;
}

.doc-meta {
    margin: 0 0 0.2rem 0;
    font-size: 0.9rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

    .doc-meta span {
        display: flex;
        align-items: center;
        gap: 0.3rem;
    }

/* Прогресс по дисциплинам */
.progress-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
}

.progress-item {
    text-align: center;
}

.circular-progress {
    --size: 80px;
    --half-size: calc(var(--size) / 2);
    --stroke-width: 6px;
    --radius: calc((var(--size) - var(--stroke-width)) / 2);
    --circumference: calc(var(--radius) * pi * 2);
    --dash: calc(var(--percent) / 100 * var(--circumference));
    width: var(--size);
    height: var(--size);
    border-radius: 50%;
    background: #e9ecef;
    position: relative;
    margin: 0 auto 0.5rem;
}

    .circular-progress::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 50%;
        background: conic-gradient(#667eea 0deg, #667eea calc(var(--percent) * 3.6deg), #e9ecef calc(var(--percent) * 3.6deg));
        mask: radial-gradient(transparent calc(var(--size)/2 - var(--stroke-width) - 1px), white calc(var(--size)/2 - var(--stroke-width)));
        -webkit-mask: radial-gradient(transparent calc(var(--size)/2 - var(--stroke-width) - 1px), white calc(var(--size)/2 - var(--stroke-width)));
    }

.progress-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
}

.progress-label {
    font-size: 0.9rem;
    color: #718096;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Боковая панель */
.sidebar-card {
    background: white;
    border-radius: 24px;
    padding: 1.2rem;
    margin-bottom: 1.2rem;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.02);
}

.sidebar-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

    .sidebar-card-header h6 {
        font-size: 1rem;
        font-weight: 600;
        margin: 0;
        color: #4a5568;
    }

.task-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 0;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #edf2f7;
}

    .task-item:last-child {
        border-bottom: none;
    }

    .task-item.overdue .task-title {
        color: #e53e3e;
    }

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-pending {
    background-color: #a0aec0;
}

.status-progress {
    background-color: #4299e1;
}

.status-completed {
    background-color: #48bb78;
}

.status-overdue {
    background-color: #f56565;
}

.status-cancelled {
    background-color: #718096;
}

.task-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.task-title {
    font-weight: 500;
    font-size: 0.95rem;
}

.task-meta {
    font-size: 0.8rem;
    color: #718096;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.announcement-item {
    margin-bottom: 0.8rem;
}

.announcement-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.announcement-preview {
    font-size: 0.85rem;
    color: #4a5568;
    margin-bottom: 0.2rem;
}

.event-item {
    display: flex;
    gap: 0.8rem;
    font-size: 0.9rem;
    padding: 0.3rem 0;
}

.event-date {
    font-weight: 600;
    color: #667eea;
    min-width: 60px;
}

/* Быстрые действия */
.quick-actions-card {
    background: white;
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.02);
}

.quick-actions-header h6 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2d3748;
}

.quick-actions-body {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.action-btn {
    padding: 0.6rem 1.2rem;
    background: #f7fafc;
    border-radius: 30px;
    color: #4a5568;
    text-decoration: none;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: 0.2s;
    border: 1px solid #e2e8f0;
}

    .action-btn:hover {
        background: #edf2f7;
        color: #2d3748;
        border-color: #cbd5e0;
    }

/* Пустое состояние */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: #a0aec0;
}

    .empty-state i {
        font-size: 3rem;
        margin-bottom: 1rem;
    }

/* ===== OFF-CANVAS СТИЛИ ===== */
.offcanvas {
    border-right: none;
    box-shadow: 4px 0 20px rgba(0,0,0,0.05);
    background: white;
}

.offcanvas-header {
    border-bottom: 1px solid #f1f5f9;
    padding: 1.2rem 1.5rem;
}

.offcanvas-title {
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.offcanvas-body {
    padding: 1.5rem;
}

    .offcanvas-body .nav-item {
        margin-bottom: 0.25rem;
    }

    .offcanvas-body .nav-link {
        padding: 0.75rem 1rem;
        border-radius: 12px;
        color: #334155;
        font-weight: 500;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

        .offcanvas-body .nav-link:hover {
            background: #f1f5f9;
            color: #667eea;
        }

        .offcanvas-body .nav-link i {
            font-size: 1.2rem;
            width: 1.8rem;
            color: #667eea;
        }

    /* Выпадающие меню внутри offcanvas */
    .offcanvas-body .dropdown-menu {
        position: static !important;
        transform: none !important;
        border: none;
        background: #f8fafd;
        border-radius: 12px;
        padding: 0.5rem;
        margin-top: 0.25rem;
        margin-bottom: 0.5rem;
        box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
    }

    .offcanvas-body .dropdown-item {
        padding: 0.6rem 1rem 0.6rem 2.8rem;
        border-radius: 10px;
        color: #334155;
        font-size: 0.95rem;
        transition: 0.2s;
    }

        .offcanvas-body .dropdown-item:hover {
            background: white;
            color: #667eea;
        }

        .offcanvas-body .dropdown-item i {
            margin-right: 0.5rem;
            color: #94a3b8;
        }

    .offcanvas-body .dropdown-divider {
        margin: 0.5rem 0;
        border-top-color: #e2e8f0;
    }

/* Кнопка бургера */
.btn-outline-primary {
    border-color: #e2e8f0;
    color: #4a5568;
    background: white;
    padding: 0.5rem 0.8rem;
    border-radius: 12px;
    transition: 0.2s;
}

    .btn-outline-primary:hover {
        background: #f1f5f9;
        border-color: #cbd5e0;
        color: #2d3748;
    }

/* Корректировка выпадающего меню профиля */
.navbar .dropdown-menu {
    position: absolute !important;
    margin-top: 0.5rem;
    border-radius: 16px;
    border: none;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    background: white;
    padding: 0.5rem 0;
}

.navbar .dropdown-item {
    padding: 0.6rem 1.5rem;
    transition: background 0.2s;
}

    .navbar .dropdown-item:hover {
        background: #f1f5f9;
        color: #667eea;
    }

    .navbar .dropdown-item i {
        margin-right: 0.5rem;
        width: 1.2rem;
        color: #667eea;
    }

/* Убираем возможные конфликты с родительскими контейнерами */
.navbar .nav-item.dropdown {
    position: static; /* или relative, но для absolute внутри должно работать */
}

@media (max-width: 768px) {
    .navbar .dropdown-menu {
        position: fixed !important; /* на мобильных можно адаптировать */
        left: auto;
        right: 1rem;
        width: 280px;
    }
}

/* Фильтры-чипсы */
.filters-section {
    background: white;
    border-radius: 24px;
    padding: 1.2rem 1.5rem;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.02);
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chip {
    padding: 0.5rem 1.2rem;
    background: #f1f5f9;
    border-radius: 30px;
    font-size: 0.9rem;
    color: #334155;
    text-decoration: none;
    transition: 0.2s;
    border: 1px solid transparent;
}

    .chip:hover {
        background: #e2e8f0;
        color: #1e293b;
    }

    .chip.active {
        background: linear-gradient(135deg, #667eea, #764ba2);
        color: white;
    }

/* Современный селект */
.modern-select {
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 1rem;
    background-color: white;
    transition: 0.2s;
}

    .modern-select:focus {
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
        outline: none;
    }

/* Таблица */
.table-modern {
    border-collapse: separate;
    border-spacing: 0 8px;
}

    .table-modern thead th {
        background: transparent;
        border-bottom: 2px solid #e2e8f0;
        color: #64748b;
        font-weight: 500;
        text-transform: uppercase;
        font-size: 0.8rem;
        letter-spacing: 0.5px;
        padding: 0.75rem 1rem;
        white-space: nowrap;
    }

    .table-modern tbody tr {
        background: white;
        border-radius: 16px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.02);
        transition: 0.2s;
    }

        .table-modern tbody tr:hover {
            box-shadow: 0 8px 20px rgba(102,126,234,0.1);
            transform: translateY(-2px);
        }

    .table-modern td {
        padding: 1rem;
        border: none;
        vertical-align: middle;
        background: white;
    }

        .table-modern td:first-child {
            border-top-left-radius: 16px;
            border-bottom-left-radius: 16px;
        }

        .table-modern td:last-child {
            border-top-right-radius: 16px;
            border-bottom-right-radius: 16px;
        }

/* Иконка файла */
.file-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

/* Аватар пользователя */
.avatar-circle {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
}

/* Кнопки действий */
.table-modern .btn-group .btn {
    border: 1px solid #e2e8f0;
    background: white;
    color: #4a5568;
    padding: 0.3rem 0.6rem;
    transition: 0.2s;
}

    .table-modern .btn-group .btn:hover {
        background: #f1f5f9;
        border-color: #cbd5e0;
        color: #2d3748;
    }

.table-modern .btn-group .btn-outline-info:hover {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #7dd3fc;
}

.table-modern .btn-group .btn-outline-success:hover {
    background: #d1fae5;
    color: #065f46;
    border-color: #6ee7b7;
}

.table-modern .btn-group .btn-outline-warning:hover {
    background: #fef3c7;
    color: #92400e;
    border-color: #fcd34d;
}

.table-modern .btn-group .btn-outline-danger:hover {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fca5a5;
}

.table-modern .btn-group .btn-outline-primary:hover {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #7dd3fc;
}

/* Иконка задачи */
.task-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

    .task-icon.bg-primary {
        background: linear-gradient(135deg, #4299e1, #3182ce);
    }

    .task-icon.bg-danger {
        background: linear-gradient(135deg, #f56565, #e53e3e);
    }

/* Для просроченных задач строка таблицы */
.table-modern tbody tr.table-danger {
    background: #fff5f5;
}

    .table-modern tbody tr.table-danger:hover {
        background: #ffe2e2;
    }

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .table-modern td {
        white-space: nowrap;
    }

    .filter-chips {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
    }
}

.card-header-gradient {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-bottom: none;
}

.form-control, .input-group-text {
    border-radius: 0.5rem; /* или 12px */
}

/* Улучшение отображения Select2 в Bootstrap 5 */
.select2-container--bootstrap-5 .select2-search__field {
    border-radius: 20px !important;
    border: 1px solid #ced4da !important;
    padding: 0.375rem 0.75rem !important;
    margin: 8px !important;
}

.select2-container--bootstrap-5 .select2-selection {
    border-radius: 16px !important;
    border: 1px solid #e2e8f0 !important;
}

    .select2-container--bootstrap-5 .select2-selection:hover {
        border-color: #667eea !important;
    }

    .select2-container--bootstrap-5 .select2-selection:focus {
        border-color: #667eea !important;
        box-shadow: 0 0 0 0.2rem rgba(102,126,234,0.25) !important;
    }

/* Обязательное поле — красная звёздочка */
.required-field::after {
    content: " *";
    color: #dc3545;
    font-weight: bold;
}

.load-type-btn {
    transition: all 0.2s ease;
    border-radius: 40px;
    padding: 0.35rem 1.2rem;
    font-size: 0.9rem;
}

    .load-type-btn.active {
        background: linear-gradient(135deg, #667eea, #764ba2);
        color: white;
        border-color: #764ba2;
        box-shadow: 0 2px 6px rgba(102,126,234,0.3);
    }

    .load-type-btn:not(.active):hover {
        background: #f1f5f9;
        border-color: #cbd5e1;
    }