/* admin.css */
:root {
    --primary: #0A66C2;
    --primary-dark: #074b91;
    --sidebar-bg: #0F172A;
    --sidebar-hover: #1E293B;
    --bg-color: #F8FAFC;
    --card-bg: #FFFFFF;
    --text-main: #0F172A;
    --text-muted: #64748B;
    --border: #E2E8F0;
    --radius: 12px;
    --transition: 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
}

body.login-active {
    overflow: hidden !important;
    position: fixed !important;
    width: 100vw !important;
    height: 100vh !important;
    touch-action: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
}

.sidebar-header {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: contain;
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 700;
}

.sidebar-nav {
    padding: 20px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #94A3B8;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition);
}

.nav-item:hover, .nav-item.active {
    background-color: var(--sidebar-hover);
    color: #fff;
}

.nav-item.active {
    border-left: 4px solid var(--primary);
}

.sidebar-footer {
    padding: 20px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
}

.top-header {
    height: 70px;
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
}

.header-search input {
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 20px;
    width: 300px;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.header-search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(10, 102, 194, 0.1);
}

.header-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    font-size: 14px;
}

.profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.content-wrapper {
    padding: 32px;
}

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

.page-header h1 {
    font-size: 24px;
    font-weight: 700;
}

.btn {
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-details h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-details p {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

/* Table */
.table-container {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    overflow: hidden;
}

.table-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    color: var(--text-main);
}

.table-responsive {
    overflow-x: auto;
}

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

.reviews-table th {
    text-align: left;
    padding: 16px 24px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    background-color: #F8FAFC;
    white-space: nowrap;
}

.reviews-table td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    vertical-align: middle;
    white-space: nowrap;
}

.reviews-table tbody tr:last-child td {
    border-bottom: none;
}

.reviewer-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reviewer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.reviewer-info strong {
    display: block;
    font-weight: 600;
    margin-bottom: 2px;
}

.reviewer-info span {
    font-size: 12px;
    color: var(--text-muted);
}

.stars {
    color: #F59E0B;
    letter-spacing: 2px;
}

.comment-cell {
    min-width: 250px;
    max-width: 300px;
    white-space: normal !important;
    line-height: 1.5;
    color: #475569;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-published {
    background-color: rgba(37, 211, 102, 0.1);
    color: #166534;
}

.action-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
}

.action-btn:hover {
    text-decoration: underline;
}

/* ── Mobile Responsiveness ── */
@media (max-width: 900px) {
    .dashboard-container {
        display: flex;
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        min-height: auto;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .top-header {
        flex-direction: column;
        height: auto;
        padding: 15px;
        gap: 15px;
    }
    
    .header-search input {
        width: 100%;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .content-wrapper {
        padding: 15px;
    }
}
