/* Основные стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Шапка */
header {
    background: linear-gradient(90deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    margin-bottom: 15px;
    font-size: 2.2rem;
    text-align: center;
}

.nav-menu {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 20px;
    flex-wrap: wrap;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 5px;
    transition: background 0.3s;
}

.nav-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Основной контент */
main {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Уведомления */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    animation: slideIn 0.3s ease-out;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Секции */
.hero {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    margin-bottom: 30px;
}

.hero h2 {
    margin-bottom: 15px;
    font-size: 2rem;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.feature {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #1e3c72;
}

.feature h3 {
    color: #1e3c72;
    margin-bottom: 15px;
}

.feature ul {
    list-style-position: inside;
    color: #666;
}

/* Формы */
.auth-form, .refill-form {
    max-width: 500px;
    margin: 0 auto;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #1e3c72;
    outline: none;
}

.error-message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #1e3c72;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 16px;
    transition: background 0.3s, transform 0.2s;
    text-align: center;
}

.btn:hover {
    background: #2a5298;
    transform: translateY(-2px);
}

.btn-primary {
    background: #1e3c72;
}

.btn-primary:hover {
    background: #2a5298;
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
}

.btn-success:hover {
    background: #218838;
}

.btn-large {
    padding: 15px 30px;
    font-size: 18px;
}

.btn-small {
    padding: 5px 10px;
    font-size: 14px;
}

/* Карточки */
.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    border-top: 4px solid #1e3c72;
}

.stat-card.admin {
    border-top-color: #28a745;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #1e3c72;
    margin: 10px 0;
}

.stat-sub {
    color: #666;
    font-size: 14px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

/* Таблицы */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.data-table th {
    background: #1e3c72;
    color: white;
    font-weight: 600;
}

.data-table tr:hover {
    background: #f5f5f5;
}

/* Сетка карточек */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.card-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Панели */
.dashboard-sections,
.admin-sections {
    display: grid;
    gap: 30px;
}

/* Форма пополнения */
.amount-presets {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-preset {
    padding: 8px 15px;
    background: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-preset:hover {
    background: #dee2e6;
}

.balance-info {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    font-size: 14px;
}

.transaction-info {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.transaction-info h3 {
    margin-bottom: 15px;
    color: #1e3c72;
}

.transaction-info ul {
    list-style-position: inside;
    color: #666;
}

/* Админ панель */
.admin-stats {
    margin-bottom: 30px;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.recent-activity {
    margin-top: 30px;
}

.charts {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Утилиты */
.hidden {
    display: none;
}

.text-center {
    text-align: center;
}

/* Подвал */
footer {
    margin-top: 40px;
    padding: 20px;
    text-align: center;
    color: #666;
    border-top: 1px solid #ddd;
}

/* Адаптивность */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header {
        padding: 15px;
    }
    
    .nav-menu {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .nav-menu a {
        display: block;
        width: 100%;
        text-align: center;
    }
    
    main {
        padding: 20px;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .action-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .amount-presets {
        flex-wrap: wrap;
    }
    
    .btn-preset {
        flex: 1;
        min-width: 100px;
    }
}