/* assets/css/style.css - обновленная версия для всего сайта */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    transition: background 0.25s ease, color 0.2s ease;
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

:root {
    /* Светлая тема */
    --bg-body: #f1f5f9;
    --bg-sidebar: #ffffff;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-light: #e2e8f0;
    --accent: #2dd4bf;
    --accent-hover: #14b8a6;
    --accent-glow: rgba(45, 212, 191, 0.15);
    --shadow-sm: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 20px 35px -12px rgba(0, 0, 0, 0.1);
    --btn-hover: #f8fafc;
    --icon-filter: none;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --warning: #f59e0b;
    --success: #10b981;
}

body.dark-theme {
    /* Тёмная тема - новые цвета для всего сайта */
    --bg-body: #151517;
    --bg-sidebar: #1b1b1c;
    --card-bg: #1b1b1c;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-light: #2c2c2e;
    --accent: #2dd4bf;
    --accent-hover: #14b8a6;
    --accent-glow: rgba(45, 212, 191, 0.15);
    --btn-hover: #2c2c2e;
    --icon-filter: brightness(0) invert(1);
    --danger: #f87171;
    --danger-hover: #ef4444;
    --warning: #fbbf24;
    --success: #34d399;
}

/* ============================================
   САЙДБАР
   ============================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    height: 100vh;
    background-color: var(--bg-sidebar);
    padding: 24px 16px 24px 20px;
    border-top-right-radius: 32px;
    border-bottom-right-radius: 32px;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.03);
    transition: background 0.2s;
    z-index: 50;
    overflow-y: auto;
}

.sidebar h3 {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 32px;
    color: var(--text-primary);
}

.sidebar h3 img {
    width: 44px;
    height: 44px;
    margin-right: 12px;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar li {
    border-radius: 14px;
    transition: background 0.2s;
}

.sidebar li:hover {
    background-color: var(--btn-hover);
}

.sidebar ul li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.sidebar ul li a img {
    width: 20px;
    height: 20px;
    filter: var(--icon-filter);
    opacity: 0.75;
}

.sidebar ul li a:hover {
    color: var(--accent);
}

hr {
    margin: 20px 0 16px;
    border-color: var(--border-light);
}

.theme-btn {
    background: var(--btn-hover);
    border: 1px solid var(--border-light);
    border-radius: 40px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.2s;
}

.theme-btn:hover {
    background: var(--accent-glow);
    transform: scale(0.96);
}

.theme-btn img {
    width: 28px;
    height: 28px;
    filter: var(--icon-filter);
}

.icon-dark {
    display: none;
}

body.dark-theme .icon-light {
    display: none;
}

body.dark-theme .icon-dark {
    display: inline-block;
}

/* ============================================
   ХЕДЕР И АВАТАРКА
   ============================================ */
.main-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.user-menu {
    position: relative;
    display: inline-block;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    color: #1c1413;
    transition: transform 0.2s ease;
    overflow: hidden;
}

.user-avatar:hover {
    transform: scale(1.05);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 55px;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    min-width: 200px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    overflow: hidden;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.dropdown-menu a:hover {
    background: var(--accent-glow);
    color: var(--accent);
}

.dropdown-menu a svg {
    stroke: currentColor;
}

.btn-login {
    background: var(--accent);
    color: #1c1413;
    padding: 10px 24px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-login:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

/* ============================================
   КОНТЕНТ И КАРТОЧКИ
   ============================================ */
.content {
    flex: 1;
    padding: 32px 48px 60px;
    max-width: 1400px;
    width: 100%;
}

.card {
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--border-light);
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ============================================
   КНОПКИ
   ============================================ */
.btn-primary {
    background: var(--accent);
    color: #1c1413;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-body);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: var(--accent-glow);
    border-color: var(--accent);
}

.btn-danger {
    background: var(--danger);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: var(--danger-hover);
}

/* ============================================
   ФОРМЫ
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

input, select, textarea, .form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-body);
    border: 1.5px solid var(--border-light);
    border-radius: 12px;
    font-size: 0.9rem;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
}

input:focus, select:focus, textarea:focus, .form-control:focus {
    outline: none;
    border-color: var(--accent);
}

/* ============================================
   ТАБЛИЦЫ
   ============================================ */
.table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.data-table th {
    background: var(--bg-body);
    font-weight: 600;
}

/* ============================================
   СООБЩЕНИЯ
   ============================================ */
.message {
    padding: 12px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.message.success {
    background: var(--accent-glow);
    color: var(--accent);
}

.message.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* ============================================
   ФУТЕР
   ============================================ */
footer {
    text-align: center;
    padding: 24px 20px;
    font-size: 0.75rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-light);
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */
@media (max-width: 860px) {
    body {
        margin-left: 0;
    }
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.2s;
        z-index: 1000;
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .content {
        padding: 20px;
    }
    .main-header {
        margin-top: 50px;
    }
}

.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 18px;
    left: 18px;
    z-index: 1100;
    background: var(--card-bg);
    border-radius: 30px;
    padding: 8px 14px;
    border: 1px solid var(--border-light);
    cursor: pointer;
    font-weight: bold;
    color: var(--text-primary);
}

@media (max-width: 860px) {
    .mobile-menu-toggle {
        display: flex;
    }
}

/* ============================================
   СКРОЛЛБАР
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--border-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

/* ============================================
   ГЛАВНАЯ СТРАНИЦА (INDEX)
   ============================================ */
.hero {
    margin-bottom: 56px;
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: -1px;
    margin-bottom: 16px;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 700px;
}

.description-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    margin: 40px 0 56px;
}

.info-card {
    background: var(--card-bg);
    border-radius: 32px;
    padding: 28px 24px;
    border: 1px solid var(--border-light);
    transition: transform 0.2s, box-shadow 0.2s;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.info-icon {
    width: 56px;
    height: 56px;
    background: var(--accent-glow);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--accent);
}

.info-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.info-card p {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.95rem;
}

/* Слайдер */
.slider-section {
    margin-top: 48px;
    margin-bottom: 30px;
}

.slider-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
}

.slider-sub {
    color: var(--text-muted);
    margin-bottom: 32px;
    font-size: 0.95rem;
}

.slider-container {
    background: var(--card-bg);
    border-radius: 48px;
    padding: 32px 24px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.screenshot-slider {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.slider-image-wrapper {
    width: 100%;
    text-align: center;
    border-radius: 32px;
    overflow: hidden;
    background: var(--bg-body);
    box-shadow: var(--shadow-md);
}

.slider-image {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    display: block;
    border-radius: 32px;
    transition: transform 0.3s ease;
}

.slider-caption {
    margin-top: 20px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--accent);
    text-align: center;
}

.slider-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 32px;
}

.nav-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 60px;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-primary);
}

.nav-btn:hover {
    background: var(--accent-glow);
    border-color: var(--accent);
    transform: scale(1.05);
}

.nav-btn svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
}

.dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.dot {
    width: 10px;
    height: 10px;
    background: var(--border-light);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.dot.active {
    width: 28px;
    background: var(--accent);
}

/* ============================================
   АВТОРИЗАЦИЯ (LOGIN, REGISTER)
   ============================================ */
.auth-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    min-height: 100vh;
}

.auth-card {
    background: var(--card-bg);
    border-radius: 48px;
    padding: 48px 40px 52px;
    max-width: 520px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    transition: background 0.2s, transform 0.2s;
}

.auth-card:hover {
    transform: translateY(-3px);
}

.logo-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 28px;
}

.logo-icon {
    width: 48px;
    height: 48px;
}

.logo-text {
    font-size: 1.7rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: -0.5px;
}

.auth-card h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.auth-card .subhead {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 32px;
}

.input-group {
    text-align: left;
    margin-bottom: 24px;
}

.input-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.input-field {
    width: 100%;
    padding: 14px 18px;
    font-size: 1rem;
    background: var(--bg-body);
    border: 1.5px solid var(--border-light);
    border-radius: 28px;
    color: var(--text-primary);
    transition: all 0.2s;
}

.input-field:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.btn-auth {
    width: 100%;
    background: var(--accent);
    border: none;
    padding: 14px 20px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 1rem;
    color: #1c1413;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 12px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-auth:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -8px var(--accent);
}

.toggle-link {
    text-align: center;
    margin-top: 16px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.toggle-link a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.toggle-link a:hover {
    text-decoration: underline;
}

/* ============================================
   ПЕРИОДЫ И ГРАФИКИ
   ============================================ */
.period-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.period-btn {
    background: var(--bg-body);
    border: 1px solid var(--border-light);
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    color: var(--text-primary);
}

.period-btn.active {
    background: var(--accent);
    color: #1c1413;
    border-color: var(--accent);
}

.period-btn:hover:not(.active) {
    background: var(--accent-glow);
    border-color: var(--accent);
}

.chart-container {
    margin-bottom: 16px;
    min-height: 300px;
}

.total-online {
    text-align: center;
    padding: 12px;
    background: var(--accent-glow);
    border-radius: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.total-online span {
    color: var(--accent);
    font-size: 1.2rem;
    font-weight: 700;
}

/* ============================================
   СТАТИСТИКА И КАРТОЧКИ ПРОФИЛЯ
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

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

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--accent);
}

.stat-card-content {
    flex: 1;
}

.stat-card-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.stat-card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

/* ============================================
   ЖАЛОБЫ И ГАЛЕРЕЯ
   ============================================ */
.complaints-card {
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--border-light);
    overflow: hidden;
    margin-top: 20px;
}

.complaints-card-header {
    background: rgba(239, 68, 68, 0.1);
    padding: 12px 16px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-light);
    gap: 12px;
}

.complaints-badge {
    background: var(--danger);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
}

.complaint-item {
    background: rgba(239, 68, 68, 0.05);
    border-left: 3px solid var(--danger);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.complaint-item-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.complaint-item-header span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.complaint-item-text {
    background: var(--bg-body);
    padding: 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    margin-bottom: 12px;
    line-height: 1.5;
}

.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.gallery-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid var(--border-light);
    transition: all 0.2s;
}

.gallery-item:hover {
    transform: scale(1.05);
    border-color: var(--accent);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.modal-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-close-btn:hover {
    color: var(--accent);
}