/* Основные стили */
:root {
    --primary-color: #6c5ce7;
    --primary-dark: #5a4fcf;
    --secondary-color: #0984e3;
    --dark-bg: #0f0f23;
    --darker-bg: #0a0a18;
    --card-bg: #1a1a2e;
    --text-color: #f0f0f0;
    --text-muted: #a0a0c0;
    --border-color: #2a2a3e;
    --success-color: #00b894;
    --warning-color: #fdcb6e;
    --danger-color: #e17055;
    --info-color: #74b9ff;
    --sidebar-width: 250px;
    --sidebar-collapsed: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Контейнер авторизации */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--darker-bg) 0%, #1a1a2e 50%, #16213e 100%);
    position: relative;
    overflow: hidden;
}

.container::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(108, 92, 231, 0.2) 0%, rgba(108, 92, 231, 0) 70%);
    top: -150px;
    right: -150px;
    z-index: 0;
}

.container::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(9, 132, 227, 0.15) 0%, rgba(9, 132, 227, 0) 70%);
    bottom: -100px;
    left: -100px;
    z-index: 0;
}

/* Блок авторизации */
.login-box {
    background-color: rgba(26, 26, 46, 0.9);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.logo h1 {
    font-size: 1.8rem;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* Форма авторизации */
.login-form {
    margin-top: 30px;
}

.input-group {
    margin-bottom: 25px;
    position: relative;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-weight: 500;
}

.input-group label i {
    color: var(--primary-color);
    width: 20px;
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 42px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
}

.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(108, 92, 231, 0.3);
}

.login-btn:active {
    transform: translateY(0);
}

.message {
    margin-top: 20px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    display: none;
}

.message.error {
    background-color: rgba(225, 112, 85, 0.1);
    border: 1px solid var(--danger-color);
    color: #ff8a7a;
    display: block;
}

.message.success {
    background-color: rgba(0, 184, 148, 0.1);
    border: 1px solid var(--success-color);
    color: #55efc4;
    display: block;
}

.login-footer {
    margin-top: 30px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.login-footer i {
    color: var(--primary-color);
    margin-right: 8px;
}

/* Кнопка переключения темы */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
}

#theme-toggle-btn {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

#theme-toggle-btn:hover {
    background-color: var(--primary-color);
    transform: rotate(30deg);
}

/* Админ-панель */
.admin-container {
    display: flex;
    min-height: 100vh;
}

/* Сайдбар */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--card-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    z-index: 10;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar.collapsed .sidebar-header h2,
.sidebar.collapsed .user-details,
.sidebar.collapsed .sidebar-menu span,
.sidebar.collapsed .badge,
.sidebar.collapsed .logout-btn span {
    display: none;
}

.sidebar.collapsed .user-info {
    justify-content: center;
}

.sidebar.collapsed .sidebar-footer {
    justify-content: center;
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid var(--border-color);
}

.admin-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.admin-logo i {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.admin-logo h2 {
    font-size: 1.3rem;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
}

.user-details .username {
    font-weight: 600;
    margin-bottom: 4px;
}

.user-details .user-role {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Меню сайдбара */
.sidebar-menu {
    flex-grow: 1;
    padding: 20px 0;
}

.sidebar-menu ul {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.sidebar-menu li a:hover {
    color: var(--text-color);
    background-color: rgba(255, 255, 255, 0.05);
}

.sidebar-menu li.active a {
    color: var(--primary-color);
    background-color: rgba(108, 92, 231, 0.1);
    border-right: 3px solid var(--primary-color);
}

.sidebar-menu li a i {
    width: 24px;
    font-size: 1.2rem;
    margin-right: 15px;
}

.badge {
    margin-left: auto;
    background-color: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.badge.new {
    background-color: var(--danger-color);
}

/* Футер сайдбара */
.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    background-color: rgba(225, 112, 85, 0.1);
    border: 1px solid rgba(225, 112, 85, 0.3);
    border-radius: 8px;
    color: #ff8a7a;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background-color: rgba(225, 112, 85, 0.2);
}

.logout-btn i {
    font-size: 1rem;
}

/* Основной контент */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Верхняя панель */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    z-index: 5;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.menu-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.3rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notifications {
    position: relative;
}

.notification-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.3rem;
    cursor: pointer;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.notification-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.notification-count {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: var(--danger-color);
    color: white;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 15px;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-dropdown-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.user-dropdown-btn i:first-child {
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Контент страницы */
.content {
    flex-grow: 1;
    padding: 30px;
    overflow-y: auto;
    background-color: var(--dark-bg);
}

.welcome-message {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.1), rgba(9, 132, 227, 0.1));
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.welcome-message h1 {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.welcome-message h1 i {
    color: var(--primary-color);
}

.welcome-message p {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Статистика */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
}

.stat-info h3 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.stat-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.stat-trend {
    margin-left: auto;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-trend.up {
    color: var(--success-color);
}

.stat-trend.down {
    color: var(--danger-color);
}

/* Активность */
.recent-activity {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid var(--border-color);
}

.recent-activity h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.recent-activity h2 i {
    color: var(--primary-color);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.02);
    transition: all 0.3s ease;
}

.activity-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.activity-icon.success {
    background-color: rgba(0, 184, 148, 0.1);
    color: var(--success-color);
}

.activity-icon.warning {
    background-color: rgba(253, 203, 110, 0.1);
    color: var(--warning-color);