:root {
    --primary: #6c7bff;
    --primary-light: #eef0ff;
    --secondary: #8f9bb3;
    --bg: #f7f9fc;
    --bg-accent: #eef2f6;
    --card-bg: rgba(255, 255, 255, 0.9);
    --text: #2e3a4e;
    --text-muted: #7a8798;
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --radius: 20px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: url('/images/background.webp') no-repeat center center fixed;
    background-size: cover;
    color: var(--text);
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    letter-spacing: -0.01em;
    position: relative;
}

    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.7);
        backdrop-filter: blur(4px);
        z-index: -1;
    }

.page-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

    .page-wrapper > .container {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }

/* Заголовки */
h1, .h1, h2, .h2, h3, .h3 {
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.display-4 {
    font-weight: 700;
    color: var(--primary);
}

.text-muted {
    color: var(--text-muted) !important;
}

/* Футер */
.footer {
    margin-top: auto;
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0,0,0,0.05);
    font-size: 0.85rem;
    line-height: 1.2;
    padding: 0 !important;
}

    .footer .container {
        padding: 0.25rem 0 !important;
        min-height: 0;
    }

/* Карточки ролей */
.role-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.role-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--card-bg);
    border: none;
    border-radius: var(--radius);
    padding: 1.5rem 1.5rem 2rem;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
    color: var(--text);
    text-decoration: none;
    width: 280px;
    max-width: 100%;
    animation: fadeInUp 0.5s ease both;
}

    .role-card:hover {
        transform: translateY(-8px);
        box-shadow: var(--shadow-md);
        background: #fff;
        color: var(--primary);
    }

.role-image-wrapper {
    width: 150px;
    height: 150px;
    margin-bottom: 1.25rem;
    overflow: hidden;
    border-radius: 50%;
    background: rgba(108, 123, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition);
}

.role-card:hover .role-image-wrapper {
    transform: scale(1.05);
}

.role-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.role-name {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Пустое состояние */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    background: rgba(255,255,255,0.8);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    color: var(--text-muted);
}

    .empty-state .icon {
        font-size: 3rem;
        margin-bottom: 1rem;
        opacity: 0.7;
    }

/* Папки */
.folder-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.folder-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: rgba(255,255,255,0.9);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), transform var(--transition);
}

    .folder-card:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-2px);
    }

    .folder-card.no-file {
        background: rgba(245,246,248,0.9);
        box-shadow: none;
        opacity: 0.85;
    }

.folder-icon {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
}

.folder-content {
    flex: 1;
    min-width: 0;
}

.folder-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.folder-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.folder-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.btn-download {
    background-color: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color var(--transition), transform var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

    .btn-download:hover {
        background-color: #5a67d8;
        color: #fff;
        transform: translateY(-2px);
    }

.badge-no-file {
    background: #e0e4e8;
    color: var(--text-muted);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* Кнопка назад */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid #d0d7e2;
    color: var(--text);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    text-decoration: none;
    transition: all var(--transition);
    font-weight: 500;
}

    .btn-back:hover {
        background: #fff;
        border-color: var(--primary);
        color: var(--primary);
    }

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

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

/* Адаптивность */
@media (max-width: 992px) {
    .role-card {
        width: 240px;
    }

    .role-image-wrapper {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 768px) {
    .role-grid {
        gap: 1.5rem;
    }

    .role-card {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 576px) {
    .folder-card {
        flex-direction: column;
        align-items: stretch;
    }

    .folder-actions {
        margin-top: 1rem;
    }
}
