* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --primary-color: #FFD700; /* Золотой */
    --secondary-color: #FFA500; /* Оранжевый */
    --dark-color: #000000; /* Черный */
    --light-color: #1a1a1a; /* Темно-серый */
    --accent-color: #FF4500; /* Красный акцент */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    color: #e0e0e0;
    min-height: 100vh;
}

/* ==================== МОДАЛЬНЫЕ ОКНА ==================== */
.modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.modal-content {
    background: linear-gradient(145deg, #1a1a1a 0%, #0f0f0f 100%);
    padding: 40px;
    border-radius: 16px;
    width: 90%;
    max-width: 550px;
    box-shadow: 0 20px 60px rgba(255, 215, 0, 0.3);
    border: 2px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
    z-index: 0;
}

.modal-content > * {
    position: relative;
    z-index: 1;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 32px;
    cursor: pointer;
    color: var(--primary-color);
    transition: transform 0.3s ease, color 0.3s ease;
    z-index: 10;
}

.close-modal:hover {
    transform: rotate(90deg) scale(1.2);
    color: var(--secondary-color);
}

/* ==================== ВКЛАДКИ АВТОРИЗАЦИИ ==================== */
.auth-tabs {
    display: flex;
    margin-bottom: 30px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    background: rgba(30, 30, 30, 0.8);
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 18px;
    color: #a0a0a0;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.tab-btn:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.tab-btn.active {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: var(--dark-color);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.tab-btn.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== ФОРМЫ ==================== */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 15px;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

input {
    width: 100%;
    padding: 14px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 10px;
    font-size: 16px;
    background: rgba(20, 20, 20, 0.9);
    color: white;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

input::placeholder {
    color: #666;
}

/* ==================== КНОПКИ - ГЛАВНЫЙ БЛОК ==================== */
/* ВСЕ кнопки в системе должны использовать эти стили */

.btn, 
button,
input[type="submit"],
input[type="button"] {
    padding: 12px 28px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--dark-color);
}

.btn::before,
button::before,
input[type="submit"]::before,
input[type="button"]::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    z-index: 0;
    opacity: 0;
    transition: opacity 0.4s;
}

.btn:hover::before,
button:hover::before,
input[type="submit"]:hover::before,
input[type="button"]:hover::before {
    opacity: 1;
}

.btn:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.6);
}

.btn:active,
button:active,
input[type="submit"]:active,
input[type="button"]:active {
    transform: translateY(1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Специальные типы кнопок */
.btn-warning,
button.btn-warning,
.btn-warning:hover {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: var(--dark-color);
}

.btn-success,
button.btn-success,
.btn-success:hover {
    background: linear-gradient(135deg, #4caf50, #43a047);
    color: white;
}

.btn-primary,
button.btn-primary,
.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--dark-color);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 10px;
    font-weight: 600;
}

/* ==================== НАВИГАЦИЯ - ГЛАВНОЕ ИСПРАВЛЕНИЕ ==================== */
/* Стилизация ВСЕХ ссылок в навигации как кнопок */

.nav a,
.nav-btn,
.nav a:link,
.nav a:visited {
    display: inline-block;
    padding: 12px 24px;
    margin: 0 5px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 17px;
    color: #aaa;
    background: rgba(30, 30, 30, 0.7);
    border: 2px solid rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.nav a::before,
.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.3), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s;
}

.nav a:hover,
.nav-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--dark-color);
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.5);
}

.nav a:hover::before,
.nav-btn:hover::before {
    transform: translateX(100%);
}

.nav a.active,
.nav-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--dark-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    transform: translateY(-2px);
}

/* ==================== КНОПКИ В ТАБЛИЦАХ ==================== */
.table-container .btn,
.table-container button,
td .btn,
td button {
    padding: 8px 14px;
    font-size: 14px;
    border-radius: 8px;
    min-width: 80px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}

.table-container .btn:hover,
.table-container button:hover,
td .btn:hover,
td button:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 15px rgba(255, 215, 0, 0.5);
}

/* ==================== КОНТЕЙНЕРЫ И ХЕДЕР ==================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 0;
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: 40px;
}

.logo {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 12px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.logo i {
    font-size: 40px;
    animation: pulseLogo 2s infinite;
}

@keyframes pulseLogo {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-name {
    font-weight: 700;
    font-size: 18px;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.btn-logout {
    background: linear-gradient(90deg, #ff4500, #cc0000);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 69, 0, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 69, 0, 0.6);
}

/* ==================== СТАТИСТИКА ==================== */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.stat-card {
    background: linear-gradient(145deg, #1a1a1a 0%, #0f0f0f 100%);
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 215, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.05) 0%, transparent 70%);
    z-index: 0;
}

.stat-card > * {
    position: relative;
    z-index: 1;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.3);
    border-color: var(--primary-color);
}

.stat-card i {
    font-size: 48px;
    margin-bottom: 20px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 20px;
    font-weight: 600;
}

.value {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 15px 0;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.label {
    color: #888;
    font-size: 16px;
    font-weight: 500;
}

/* ==================== ПРОГРЕСС-БАРЫ ==================== */
.progress-bar {
    width: 100%;
    height: 25px;
    background: rgba(30, 30, 30, 0.8);
    border-radius: 12px;
    overflow: hidden;
    margin: 25px 0;
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.progress-bar-small {
    width: 120px;
    height: 10px;
    background: rgba(30, 30, 30, 0.8);
    border-radius: 5px;
    overflow: hidden;
    margin: 8px 0;
    border: 1px solid var(--primary-color);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.5s ease;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.progress-text {
    font-weight: 700;
    font-size: 18px;
    margin-top: 10px;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* ==================== ФУТЕР ==================== */
.footer {
    text-align: center;
    padding: 40px 0 20px;
    color: #666;
    border-top: 2px solid rgba(255, 215, 0, 0.2);
    margin-top: 50px;
    font-size: 15px;
}

.footer p {
    margin: 5px 0;
}

.footer-small {
    font-size: 13px;
    opacity: 0.7;
    margin-top: 8px;
    color: var(--primary-color);
}

/* ==================== ТАБЛИЦЫ ==================== */
.table-container {
    overflow-x: auto;
    margin: 30px 0;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(20, 20, 20, 0.9);
    border-radius: 12px;
}

table th {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: var(--dark-color);
    font-weight: 700;
    padding: 16px 20px;
    text-align: left;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

table td {
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
    color: #e0e0e0;
}

table tr:hover {
    background: rgba(30, 30, 30, 0.9);
}

/* ==================== ФОРМЫ И МОДАЛЬНЫЕ ОКНА ==================== */
.report-modal {
    max-width: 600px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row > div {
    flex: 1;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    justify-content: center;
}

.form-hint {
    display: block;
    margin-top: 8px;
    color: #888;
    font-size: 14px;
    font-style: italic;
}

/* ==================== АДАПТИВНОСТЬ ==================== */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 20px;
    }
    
    .nav {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .nav a,
    .nav-btn {
        width: 100%;
        margin: 5px 0;
        justify-content: center;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-content {
        width: 95%;
        padding: 25px;
    }
    
    .value {
        font-size: 36px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn,
    button {
        width: 100%;
    }
    
    .table-container .btn,
    .table-container button {
        padding: 6px 12px;
        font-size: 13px;
        min-width: 60px;
    }
}