﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --accent: #1abc9c;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --gray: #95a5a6;
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #e74c3c;
    --sidebar-width: 240px;
    --header-height: 70px;
}

body {
    background-color: #f5f7fa;
    color: #333;
    display: flex;
    min-height: 100vh;
}

/* Сайдбар */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--primary);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: all 0.3s;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

    .logo i {
        font-size: 1.8rem;
        color: var(--accent);
    }

    .logo h1 {
        font-size: 1.3rem;
        font-weight: 600;
    }

.nav-menu {
    padding: 20px 0;
}

.nav-item {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ddd;
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

    .nav-item:hover {
        background-color: rgba(255, 255, 255, 0.05);
        color: white;
    }

    .nav-item.active {
        background-color: rgba(26, 188, 156, 0.1);
        color: white;
        border-left: 3px solid var(--accent);
    }

    .nav-item i {
        width: 20px;
        text-align: center;
    }

/* Основной контент */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
}

/* Верхняя панель */
.header {
    height: var(--header-height);
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 99;
}

.header-left h2 {
    color: var(--primary);
    font-weight: 600;
    font-size: 1.5rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-box {
    position: relative;
}

    .search-box input {
        padding: 10px 15px 10px 40px;
        border: 1px solid #ddd;
        border-radius: 4px;
        width: 300px;
        background-color: #f9f9f9;
        transition: all 0.3s;
    }

        .search-box input:focus {
            outline: none;
            border-color: var(--secondary);
            background-color: white;
            width: 350px;
        }

    .search-box i {
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--gray);
    }

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

    .user-profile:hover {
        background-color: #f5f5f5;
    }

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

/* Контент страницы */
.page-content {
    padding: 30px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

    .dashboard-header h1 {
        color: var(--primary);
        font-size: 1.8rem;
    }

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--secondary);
    color: white;
}

    .btn-primary:hover {
        background-color: #2980b9;
    }

.btn-success {
    background-color: var(--success);
    color: white;
}

    .btn-success:hover {
        background-color: #219653;
    }

/* Карточки статистики */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s;
}

    .stat-card:hover {
        transform: translateY(-5px);
    }

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

    .stat-icon.blue {
        background-color: var(--secondary);
    }

    .stat-icon.green {
        background-color: var(--success);
    }

    .stat-icon.orange {
        background-color: var(--warning);
    }

    .stat-icon.red {
        background-color: var(--danger);
    }

.stat-info h3 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 5px;
}

.stat-info p {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Таблицы и списки */
.content-section {
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

    .section-header h3 {
        color: var(--primary);
        font-size: 1.3rem;
    }

    .section-header a {
        color: var(--secondary);
        text-decoration: none;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 5px;
    }

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background-color: #f8f9fa;
}

th {
    padding: 15px;
    text-align: left;
    color: var(--primary);
    font-weight: 600;
    border-bottom: 2px solid #eee;
}

td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

tr:hover {
    background-color: #f9f9f9;
}

.status {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

    .status.active {
        background-color: rgba(39, 174, 96, 0.1);
        color: var(--success);
    }

    .status.pending {
        background-color: rgba(243, 156, 18, 0.1);
        color: var(--warning);
    }

    .status.inactive {
        background-color: rgba(149, 165, 166, 0.1);
        color: var(--gray);
    }

/* Адаптивность */
@media (max-width: 1200px) {
    .search-box input {
        width: 200px;
    }

        .search-box input:focus {
            width: 250px;
        }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }

        .sidebar.active {
            transform: translateX(0);
        }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .menu-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 1.5rem;
        color: var(--primary);
        cursor: pointer;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0 15px;
    }

    .page-content {
        padding: 15px;
    }

    .search-box {
        display: none;
    }

    .stats-cards {
        grid-template-columns: 1fr;
    }
}

/* Стили для меню-гамбургера */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 90;
}

    .overlay.active {
        display: block;
    }