/* Современные стили для сайта М-16 */

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-color: #1f2937;
    --light-color: #f9fafb;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --gradient-info: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Главный контейнер */
.container {
    animation: fadeIn 0.6s ease-out;
}

/* Карточки */
.card {
    background: white;
    border: none;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    animation: slideInUp 0.6s ease-out;
}

.card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.card-header {
    background: var(--gradient-primary);
    color: white;
    padding: 1.5rem;
    border: none;
    font-weight: 600;
}

.card-body {
    padding: 2rem;
}

/* Кнопки */
.btn {
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    text-transform: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-success {
    background: var(--gradient-success);
    color: white;
}

.btn-danger {
    background: var(--gradient-danger);
    color: white;
}

.btn-info {
    background: var(--gradient-info);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
}

.btn-outline-primary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

/* Формы */
.form-control, .form-select {
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.input-group-text {
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 10px 0 0 10px;
    font-weight: 600;
}

/* Алерты */
.alert {
    border: none;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-md);
    animation: slideInUp 0.5s ease-out;
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
}

/* Логотип и заголовки */
.logo-container {
    animation: fadeIn 1s ease-out;
}

.logo-container img {
    transition: transform 0.3s ease;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.logo-container img:hover {
    transform: scale(1.1);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--dark-color);
    font-weight: 700;
}

.main-title {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2rem;
    font-weight: 800;
}

/* Баланс и статистика */
.balance-card {
    background: var(--gradient-primary);
    color: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    margin-bottom: 2rem;
}

.balance-amount {
    font-size: 3rem;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.status-active {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 2px solid #10b981;
}

.status-blocked {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 2px solid #ef4444;
}

/* Таблицы и данные */
.data-row {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    transition: background 0.3s ease;
}

.data-row:last-child {
    border-bottom: none;
}

.data-row:hover {
    background: #f9fafb;
}

.data-label {
    font-weight: 600;
    color: #6b7280;
    font-size: 0.9rem;
}

.data-value {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 1.1rem;
}

/* Страница авторизации */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.login-card {
    max-width: 450px;
    width: 100%;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    animation: slideInUp 0.6s ease-out;
}

.login-header {
    background: var(--gradient-primary);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
}

.login-header h2 {
    color: white;
    margin: 0;
    font-size: 1.8rem;
}

.login-body {
    padding: 3rem 2rem;
}

/* Грид кнопок */
.button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.button-grid .btn {
    width: 100%;
}

/* Адаптивность */
@media (max-width: 768px) {
    .card-body {
        padding: 1.5rem;
    }
    
    .balance-amount {
        font-size: 2rem;
    }
    
    .main-title {
        font-size: 1.5rem;
    }
    
    .button-grid {
        grid-template-columns: 1fr;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 576px) {
    .login-body {
        padding: 2rem 1.5rem;
    }
    
    .login-header {
        padding: 2rem 1.5rem;
    }
}

/* Скроллбар */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Утилиты */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom {
    box-shadow: var(--shadow-xl);
}

.rounded-custom {
    border-radius: 16px;
}

/* Ссылки */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

/* Textarea */
textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Улучшенный вид для информационных блоков */
.info-block {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 4px solid var(--info-color);
    padding: 1.5rem;
    border-radius: 12px;
    margin: 1rem 0;
}

/* Кнопка с иконкой */
.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-icon img {
    width: 24px;
    height: 24px;
}

/* Collapse улучшения */
.collapse-trigger {
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
}

.collapse-trigger:hover {
    color: var(--primary-color);
}

/* Старый класс для совместимости */
.mn {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    padding: 2rem;
}

.button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.button:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Сепараторы */
hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    margin: 2rem 0;
}

/* Анимация при загрузке */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-in-up {
    animation: slideInUp 0.6s ease-out;
}

