/**
 * Основные стили проекта
 * Подключайте этот файл после Bootstrap для единообразного дизайна
 */

/* Базовые настройки */
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
}

.main-content {
    flex: 1 0 auto;
    padding-bottom: var(--spacing-lg);
}

footer {
    flex-shrink: 0;
}

/* Навигация */
.navbar {
    background: var(--gradient-primary) !important;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
}

.navbar-nav .nav-link {
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

/* Карточки */
.card {
    border: none;
    box-shadow: var(--shadow);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

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

.card-header {
    background: var(--gradient-primary);
    color: white;
    border-bottom: none;
    font-weight: 600;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
}

.card-header h5 {
    margin: 0;
    color: white;
}

/* Кнопки */
.btn {
    border-radius: var(--radius);
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1.5rem;
}

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

.btn-primary {
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-success {
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.btn-success:hover {
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
}

.btn-danger {
    box-shadow: 0 4px 15px rgba(245, 101, 101, 0.3);
}

.btn-danger:hover {
    box-shadow: 0 6px 20px rgba(245, 101, 101, 0.4);
}

/* Формы */
.form-control, .form-select {
    border-radius: var(--radius);
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
}

/* Таблицы */
.table {
    border-radius: var(--radius-md);
    overflow: hidden;
}

.table thead {
    background: var(--bg-light);
}

.table thead th {
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 2px solid var(--primary);
    padding: 1rem;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background-color: var(--bg-light);
    transform: scale(1.01);
}

/* Алерты */
.alert {
    border-radius: var(--radius-md);
    border: none;
    box-shadow: var(--shadow-sm);
}

.alert-success {
    background-color: rgba(72, 187, 120, 0.1);
    color: var(--success-dark);
    border-left: 4px solid var(--success);
}

.alert-danger {
    background-color: rgba(245, 101, 101, 0.1);
    color: var(--danger-dark);
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background-color: rgba(237, 137, 54, 0.1);
    color: var(--warning-dark);
    border-left: 4px solid var(--warning);
}

.alert-info {
    background-color: rgba(66, 153, 225, 0.1);
    color: var(--info-dark);
    border-left: 4px solid var(--info);
}

/* Бейджи */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 500;
    border-radius: var(--radius);
}

/* Модальные окна */
.modal-content {
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    background: var(--gradient-primary);
    color: white;
    border-bottom: none;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-header .btn-close {
    filter: invert(1);
}

.modal-footer {
    border-top: 1px solid var(--bg-gray);
}

/* Футер */
footer {
    background-color: var(--bg-light);
    border-top: 1px solid #dee2e6;
    margin-top: auto;
}

footer a {
    color: var(--primary);
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-dark);
}

/* Утилиты */
.shadow-custom {
    box-shadow: var(--shadow-md);
}

.gradient-primary {
    background: var(--gradient-primary);
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Адаптивность */
@media (max-width: 768px) {
    .navbar-nav {
        margin-top: 1rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Скроллбар */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

