:root {
    /* Цветовая палитра */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --gradient: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);

    --text-main: #0e141e;
    --text-muted: #9199a6;
    --text-secondary: #575f6b;

    --bg-body: #f1f5f9;
    --bg-sidebar: rgba(255, 255, 255, 0.7);
    --bg-card: #ffffff;

    --border: #e2e8f0;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 8px 20px rgba(0, 0, 0, 0.06);
}

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

body {
    font-family: 'Manrope', sans-serif;
    background: var(--bg-body);
    color: var(--text-main);
}

h3 {
    font-size: 1.3rem;
    font-weight: 700;
}

h4 {
    font-size: 0.9rem;
    font-weight: 500;
}

p, div {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-secondary);
}

#filters .form-group {
    margin-bottom: 0;
    flex-direction: row;
    justify-content: flex-end;
}

#filters .form-group:first-child {
    flex-direction: column;
}

#filters {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* --- Layout --- */
.container {
    display: flex;
    height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
    width: 260px;
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 24px 20px;
    box-shadow: var(--shadow-sm);
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 48px;
    text-align: center;
}

.sidebar-menu,
.sidebar-bottom {
    display: flex;
    flex-direction: column;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}

.menu-item i {
    font-size: 1.1rem;
}

.menu-item:hover {
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary);
}

.menu-item.active {
    background: var(--gradient);
    color: #ffffff;
    box-shadow: var(--shadow-lg);
}

.sidebar-bottom {
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

/* --- Dashboard --- */
.dashboard-card h3 {
    margin-bottom: 4px;
}

/* --- Main area --- */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 32px 40px;
    overflow-y: auto;
    background: var(--bg-body);
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 36px;
}

.header h2 {
    font-size: 1.75rem;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* Search */
.search-box {
    position: relative;
}

.search-box input {
    padding: 11px 48px 11px 18px;
    width: 280px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 0.95rem;
    background: #ffffff;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.search-box i {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
}

/* User */
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-sm);
}

/* --- Content Sections --- */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

.content-section h3 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 36px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.dashboard-card {
    gap: 0; 
}

/* Table styles */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

th {
    font-weight: 600;
    color: var(--text-muted);
}

tbody tr:hover {
    background-color: #f9fafb;
}

p {
    color: var(--text-muted);
    line-height: 1.6;
}

p.value {
    color: #475569;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Review Page Styles */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    gap: 24px;
}

.review-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, opacity 0.3s;
}

.review-content {
    font-style: italic;
    color: var(--text-main);
    flex-grow: 1;
    margin-bottom: 16px;
}

.review-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    padding-top: 16px;
    margin-bottom: 16px;
}

.review-status.approved {
    color: #166534;
    font-weight: 500;
}

.review-actions {
    display: flex;
    gap: 10px;
}

.btn {
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Manrope', sans-serif;
    font-weight: 500;
    transition: background-color 0.2s;
    width: max-content;
}

.btn-approve {
    background-color: #166534;
    color: #ffffff;
}
.btn-approve:hover:not(:disabled) {
    background-color: #166534;
}
.btn-approve:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}


.btn-delete {
    background-color: #ef4444;
    color: #ffffff;
}
.btn-delete:hover {
    background-color: rgba(239, 68, 68, 0.2);
}

/* Form Styles */
.form-group {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: 'Manrope', sans-serif;
    font-size: 0.95rem;
    background-color: #f8fafc;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 300;
}

.btn-save {
    background: var(--primary);
    color: white;
    padding: 8px 20px;
}

.btn-save:hover {
    background: linear-gradient(135deg, #6366f1, #8587f8);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary {
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px 20px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #3498db);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
        box-shadow: none;
    }

    .logo {
        margin-bottom: 20px;
    }

    .sidebar-menu,
    .sidebar-bottom {
        flex-direction: row;
        justify-content: space-around;
        padding: 10px 0;
    }

    .menu-item {
        margin-bottom: 0;
        padding: 10px 15px;
    }

    .main {
        padding: 20px;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .header-right {
        width: 100%;
        justify-content: space-between;
    }

    .search-box {
        width: 100%;
    }

    .search-box input {
        width: 100%;
    }

    .user-info {
        width: 100%;
        justify-content: space-between;
    }

    .content-section {
        margin-bottom: 20px;
    }

    .reviews-grid {
        grid-template-columns: 1fr;
    }

    .review-card {
        margin-bottom: 15px;
    }
} 

/* --- Common Components (shared across pages) --- */
/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: #64748b;
}

.loading i {
    font-size: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal (base) */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 24px;
    border-radius: 12px;
    width: 90%;
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #64748b;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #1e293b;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}