/* ============================================
   КАСТОМНЫЕ СТИЛИ ДЛЯ ДАШБОРДА
   ============================================ */

/* Layout */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}
.main-content {
    flex: 1;
    margin-left: 16rem;
    min-height: 100vh;
    transition: all 0.2s ease;
}

/* Sidebar */
.sidebar {
    width: 16rem;
    background: hsl(var(--card));
    border-right: 1px solid hsl(var(--border));
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    padding: 1rem;
    overflow-y: auto;
    z-index: 1030;
    transition: all 0.2s ease;
}
.logo {
    text-align: center;
    padding: 1rem 0;
    border-bottom: 1px solid hsl(var(--border));
    margin-bottom: 1rem;
}
.logo h2 {
    color: hsl(var(--primary));
    font-size: 1.5rem;
}
.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.menu-section {
    margin-bottom: 1.5rem;
}
.section-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: hsl(var(--muted-foreground));
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.25rem;
}
.menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: var(--radius);
    text-decoration: none;
    color: hsl(var(--foreground));
    font-size: 0.875rem;
    transition: all 0.2s ease;
}
.menu-item svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}
.menu-item:hover {
    background: hsl(var(--muted));
    text-decoration: none;
}
.menu-item.active {
    background: hsl(var(--primary));
    color: white;
}
.menu-item.admin {
    color: hsl(var(--destructive));
}
.menu-item.admin:hover {
    background: rgba(239, 68, 68, 0.15);
}
.sidebar-footer {
    padding-top: 1rem;
    border-top: 1px solid hsl(var(--border));
    margin-top: 1rem;
    text-align: center;
}
.role-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    background: hsl(var(--primary) / 0.1);
    color: hsl(var(--primary));
}

/* Topbar */
.topbar {
    height: 4.5rem;
    border-bottom: 1px solid hsl(var(--border));
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1020;
}
.topbar-left h1 {
    font-size: 1.5rem;
}
.topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.user-info {
    color: hsl(var(--muted-foreground));
}

/* Page Content */
.page-content {
    padding: 1.5rem;
}
.welcome-box {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
}
.welcome-box h2 {
    margin-bottom: 0.5rem;
}
.welcome-box p {
    color: hsl(var(--muted-foreground));
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}
.stat-card h3 {
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}
.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: hsl(var(--primary));
}
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.action-card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    text-decoration: none;
    color: hsl(var(--foreground));
    transition: all 0.2s ease;
}
.action-card:hover {
    border-color: hsl(var(--primary));
    transform: translateY(-2px);
    text-decoration: none;
}
.action-card .icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

/* Кнопки (если не хватает Tailwind) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    background: hsl(var(--primary));
    color: #fff;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s ease;
}
.btn:hover {
    opacity: 0.9;
    text-decoration: none;
}
.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}
.btn-secondary {
    background: hsl(var(--muted));
    color: hsl(var(--foreground));
    border: 1px solid hsl(var(--border));
}
.btn-secondary:hover {
    background: hsl(var(--accent));
}

/* Таблицы */
.table-container {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius-lg);
    overflow-x: auto;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.data-table th {
    text-align: left;
    padding: 1rem;
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
    font-weight: 600;
    border-bottom: 1px solid hsl(var(--border));
}
.data-table td {
    padding: 1rem;
    border-bottom: 1px solid hsl(var(--border));
    color: hsl(var(--foreground));
}
.data-table tr:last-child td {
    border-bottom: none;
}
.data-table tr:hover {
    background: hsl(var(--accent));
}

/* Статусы */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.status-draft {
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
}
.status-approved {
    background: rgba(34, 197, 94, 0.2);
    color: hsl(var(--success));
    border: 1px solid rgba(34, 197, 94, 0.3);
}
.status-rejected {
    background: rgba(239, 68, 68, 0.2);
    color: hsl(var(--destructive));
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Формы */
.form-card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: hsl(var(--foreground));
}
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    color: hsl(var(--foreground));
    font-size: 0.875rem;
    transition: all 0.2s ease;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}
.form-textarea {
    min-height: 80px;
    resize: vertical;
}
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Поля наказания (для отчётов) */
.punishment-card {
    background: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
}
.punishment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-weight: 600;
}
.remove-punishment {
    color: hsl(var(--destructive));
    cursor: pointer;
    background: none;
    border: none;
    font-size: 0.875rem;
}

/* Загрузка файлов */
.upload-area {
    border: 2px dashed hsl(var(--border));
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}
.upload-area:hover {
    border-color: hsl(var(--primary));
    background: hsl(var(--accent));
}
.upload-area input {
    display: none;
}
.upload-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}
.upload-hint {
    color: hsl(var(--muted-foreground));
    font-size: 0.75rem;
    margin-top: 0.5rem;
}
.file-list {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.file-item {
    background: hsl(var(--muted));
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.file-item .remove {
    color: hsl(var(--destructive));
    cursor: pointer;
    font-weight: bold;
}

/* Детали отчёта */
.report-details {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}
.detail-row {
    display: flex;
    margin-bottom: 1rem;
}
.detail-label {
    width: 150px;
    color: hsl(var(--muted-foreground));
}
.detail-value {
    flex: 1;
}
.comment-box {
    background: hsl(var(--background));
    border-left: 3px solid hsl(var(--primary));
    padding: 1rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin-top: 1rem;
}

/* Кнопки действий */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

/* Поиск */
.search-box {
    position: relative;
    margin-bottom: 1rem;
}
.search-box input {
    width: 100%;
    padding: 0.625rem 2.5rem 0.625rem 1rem;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius-lg);
    color: hsl(var(--foreground));
}
.search-box .search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: hsl(var(--muted-foreground));
}

/* Адаптивность */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .quick-actions {
        grid-template-columns: 1fr;
    }
}

.like-btn.active {
    background-color: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
}
.dislike-btn.active {
    background-color: var(--destructive);
    color: var(--destructive-foreground);
    border-color: var(--destructive);
}
/* Toast уведомления */
#toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 24rem;
    width: 100%;
    pointer-events: none;
}

.toast {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    pointer-events: auto;
    animation: toast-in 0.3s ease;
    color: var(--card-foreground);
}

.toast-hide {
    animation: toast-out 0.3s ease forwards;
}

.toast-success {
    border-left: 4px solid #10b981;
}
.toast-error {
    border-left: 4px solid #ef4444;
}
.toast-warning {
    border-left: 4px solid #f59e0b;
}
.toast-info {
    border-left: 4px solid #3b82f6;
}

.toast-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.toast-close {
    background: none;
    border: none;
    color: var(--muted-foreground);
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    padding: 0;
    margin: 0;
}

.toast-close:hover {
    color: var(--foreground);
}

@keyframes toast-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toast-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}