/* Основные стили админки */
:root {
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 60px;
    --header-height: 60px;
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --light-color: #ecf0f1;
    --dark-color: #34495e;
    --border-color: #dfe6e9;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Ubuntu', 'Roboto', sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Layout */
.admin-container {
    display: flex;
    min-height: 100vh;
}

/* Боковое меню (шторка) */
.admin-sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--secondary-color) 0%, #1a252f 100%);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    transition: transform 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.admin-sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-sidebar-header h2 {
    font-size: 1.2rem;
    font-weight: 500;
    margin: 0;
    color: white;
}

/* Навигация в сайдбаре */
.admin-nav {
    padding: 20px 0;
}

.admin-nav ul {
    list-style: none;
}

.admin-nav li {
    margin: 5px 0;
}

.admin-nav a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.admin-nav a:hover {
    background-color: rgba(255,255,255,0.1);
    color: white;
    border-left-color: var(--primary-color);
}

.admin-nav a.active {
    background-color: rgba(52, 152, 219, 0.2);
    color: white;
    border-left-color: var(--primary-color);
}

.admin-nav i {
    margin-right: 12px;
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

/* Пользовательская секция в сайдбаре */
.admin-user-section {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: auto;
}

.user-info {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-weight: bold;
    color: white;
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.user-role {
    font-size: 0.8rem;
    color: #95a5a6;
}

/* Основной контент */
.admin-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 20px;
    transition: margin-left 0.3s ease;
}

/* Хлебные крошки */
.breadcrumb {
    background: none;
    padding: 0;
    margin-bottom: 20px;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: #7f8c8d;
}

/* Карточки */
.admin-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    overflow: hidden;
}

.admin-card-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-card-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--secondary-color);
}

.admin-card-body {
    padding: 20px;
}

/* Таблицы */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.admin-table th {
    background-color: var(--light-color);
    padding: 15px;
    text-align: left;
    font-weight: 500;
    color: var(--secondary-color);
    border-bottom: 2px solid var(--border-color);
}

.admin-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.admin-table tr:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    color: white;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #219653;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-warning {
    background-color: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background-color: #e67e22;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

/* Формы */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--secondary-color);
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Статусные метки */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-draft {
    background-color: #f1f2f6;
    color: #57606f;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-approved {
    background-color: #d4edda;
    color: #155724;
}

.status-rejected {
    background-color: #f8d7da;
    color: #721c24;
}

/* Адаптивность */
@media (max-width: 992px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-content {
        margin-left: 0;
    }

    .sidebar-open .admin-sidebar {
        transform: translateX(0);
    }

    .sidebar-open .admin-content {
        margin-left: var(--sidebar-width);
    }

    .menu-toggle {
        display: block;
    }
}

@media (max-width: 768px) {
    .admin-content {
        padding: 15px;
    }

    .admin-table {
        display: block;
        overflow-x: auto;
    }

    .admin-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Утилиты */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.mb-0 { margin-bottom: 0; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mt-20 { margin-top: 20px; }
.p-0 { padding: 0; }
.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }

/* Анимации */
.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Dashboard специфичные стили */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    font-size: 24px;
    color: white;
}

.stat-icon.users { background: linear-gradient(45deg, #3498db, #2980b9); }
.stat-icon.contests { background: linear-gradient(45deg, #27ae60, #219653); }
.stat-icon.applications { background: linear-gradient(45deg, #f39c12, #e67e22); }
.stat-icon.pending { background: linear-gradient(45deg, #e74c3c, #c0392b); }

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--secondary-color);
}

.stat-label {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Тогглер меню для мобильных */
.menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 999;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
}

@media (max-width: 992px) {
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}