/* static/css/base.css */

:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --success-color: #4cc9f0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --accent-color: #7209b7;
}

[data-bs-theme="dark"] {
    --primary-color: #5a6ff0;
    --secondary-color: #4d44d6;
    --success-color: #5fd4f9;
    --light-color: #343a40;
    --dark-color: #f8f9fa;
    --accent-color: #8b2dc9;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #f5f7fb;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
}

[data-bs-theme="dark"] body {
    background-color: #121212;
    color: #e0e0e0;
}

.navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 2px 15px rgba(67, 97, 238, 0.3);
    padding: 0.8rem 0;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: white !important;
}

.navbar-brand i {
    color: #4cc9f0;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    margin: 0 0.2rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: white !important;
    transform: translateY(-2px);
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: white !important;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    margin-top: 10px;
    transition: all 0.3s ease;
}

[data-bs-theme="dark"] .dropdown-menu {
    background-color: #2d2d2d;
    border: 1px solid #444;
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.2s;
}

[data-bs-theme="dark"] .dropdown-item {
    color: #e0e0e0;
}

.dropdown-item:hover {
    background-color: #f0f2ff;
    color: var(--primary-color);
    padding-left: 2rem;
}

[data-bs-theme="dark"] .dropdown-item:hover {
    background-color: #3d3d3d;
}

.dropdown-divider {
    margin: 0.5rem 0;
}

.notification-badge {
    position: relative;
    top: -8px;
    right: 5px;
    background-color: #ff4757;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.theme-toggle {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    color: white;
    transform: rotate(30deg);
    background-color: rgba(255, 255, 255, 0.1);
}

.main-content {
    flex: 1;
    padding-top: 2rem;
    padding-bottom: 3rem;
    min-height: calc(100vh - 200px);
}

footer {
    background: linear-gradient(135deg, var(--dark-color), #343a40);
    color: rgba(255, 255, 255, 0.8);
    margin-top: auto;
    transition: all 0.3s ease;
}

[data-bs-theme="dark"] footer {
    background: linear-gradient(135deg, #2d2d2d, #1a1a1a);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
    text-decoration: underline;
}

.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 1.5rem;
}

[data-bs-theme="dark"] .card {
    background-color: #2d2d2d;
    color: #e0e0e0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.alert {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(67, 97, 238, 0.4);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 1.8rem;
    box-shadow: 0 8px 20px rgba(67, 97, 238, 0.3);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4cc9f0, var(--primary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    border: 2px solid white;
    transition: transform 0.3s ease;
}

.user-avatar:hover {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .navbar-nav {
        padding: 1rem 0;
    }

    .nav-link {
        margin: 0.2rem 0;
    }

    .dropdown-menu {
        margin-top: 0;
        border-radius: 0 0 12px 12px;
        box-shadow: none;
    }

    .theme-toggle {
        width: 35px;
        height: 35px;
    }
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Тема для здоровья */
.health-badge {
    background: linear-gradient(135deg, #4cc9f0, #4361ee);
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Стили для активных ссылок в подвале */
.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    display: inline-block;
    padding: 0.2rem 0;
    position: relative;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.footer-links a:hover::after {
    width: 100%;
}

/* Стили для навигации по хлебным крошкам */
.breadcrumb-nav {
    background-color: rgba(0,0,0,0.03);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-bottom: 2rem;
}

[data-bs-theme="dark"] .breadcrumb-nav {
    background-color: rgba(255,255,255,0.05);
}

/* Стили для контейнера с сообщениями */
.messages-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1050;
    max-width: 400px;
}

/* Стили для загрузки */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for accessibility */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .navbar, footer, .btn, .no-print {
        display: none !important;
    }

    body {
        background-color: white !important;
        color: black !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}