/* ========================================
   Admin Dashboard Styles for ScholarSkill Graduate Assist
   ======================================== */

.admin-body {
    min-height: 100vh;
    background: #F3F4F6;
    overflow-x: hidden;
}

/* ========================================
   Admin Header
   ======================================== */
.admin-header {
    position: fixed;
    top: 0;
    left: 260px;
    right: 0;
    height: 70px;
    background: var(--white);
    border-bottom: 2px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.admin-header .logo-text {
    font-size: 1.125rem;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-black) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--gray-100);
    border-radius: 10px;
}

.admin-user .user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-black) 0%, var(--gray-700) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1rem;
}

.user-role {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* ========================================
   Admin Sidebar
   ======================================== */
.admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: linear-gradient(180deg, var(--primary-black) 0%, #111827 100%);
    display: flex;
    flex-direction: column;
    z-index: 1001;
    overflow-y: auto;
}

.admin-sidebar .sidebar-nav {
    flex: 1;
    padding: 2rem 0;
}

.admin-sidebar .nav-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.5rem;
    color: #9CA3AF;
    text-decoration: none;
    transition: all var(--transition-fast);
    position: relative;
    font-weight: 500;
    font-size: 0.938rem;
}

.admin-sidebar .nav-item i {
    font-size: 1.125rem;
    width: 20px;
    text-align: center;
}

.admin-sidebar .nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
}

.admin-sidebar .nav-item.active {
    background: linear-gradient(90deg, var(--primary-red) 0%, transparent 100%);
    color: var(--white);
}

.admin-sidebar .nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-red);
}

.admin-sidebar .badge {
    background: var(--primary-red);
    color: var(--white);
    font-size: 0.688rem;
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    font-weight: 700;
    margin-left: auto;
}

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

/* ========================================
   Admin Main Content
   ======================================== */
.admin-main {
    margin-left: 260px;
    margin-top: 70px;
    padding: 2rem;
    min-height: calc(100vh - 70px);
}

.view-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

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

.stat-card {
    background: var(--white);
    padding: 1.75rem;
    border-radius: 12px;
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all var(--transition-fast);
}

.stat-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--white);
    flex-shrink: 0;
}

.stat-icon.blue {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
}

.stat-icon.green {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

.stat-icon.orange {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
}

.stat-icon.purple {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-black);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.stat-change {
    font-size: 0.813rem;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-change.positive {
    color: #10B981;
}

.stat-change.positive i {
    color: #10B981;
}

/* ========================================
   Charts Section
   ======================================== */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-card {
    background: var(--white);
    padding: 1.75rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.chart-card h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary-black);
    margin-bottom: 1.5rem;
}

/* ========================================
   Activity Section
   ======================================== */
.activity-section {
    background: var(--white);
    padding: 1.75rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.activity-section h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary-black);
    margin-bottom: 1.5rem;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 8px;
    border-left: 3px solid var(--primary-teal);
}

.activity-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-teal-light);
    color: var(--primary-teal-dark);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-content strong {
    display: block;
    font-size: 0.938rem;
    font-weight: 600;
    color: var(--primary-black);
    margin-bottom: 0.25rem;
}

.activity-content small {
    font-size: 0.813rem;
    color: var(--gray-600);
}

.activity-time {
    font-size: 0.75rem;
    color: var(--gray-500);
    font-weight: 500;
}

/* ========================================
   Search & Filter Bar
   ======================================== */
.search-filter-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 1.5px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.938rem;
    transition: all var(--transition-fast);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.search-filter-bar select {
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.938rem;
    background: var(--white);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.search-filter-bar select:focus {
    outline: none;
    border-color: var(--primary-red);
}

/* ========================================
   Data Table
   ======================================== */
.table-container {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow-x: auto;
}

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

.data-table thead {
    background: var(--gray-100);
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-size: 0.813rem;
    font-weight: 700;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--gray-200);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.938rem;
    color: var(--gray-700);
}

.data-table tbody tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--gray-50);
}

.status-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.status-active {
    background: #D1FAE5;
    color: #065F46;
}

.status-inactive {
    background: #FEE2E2;
    color: #991B1B;
}

.table-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--gray-100);
    color: var(--gray-700);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.action-btn:hover {
    background: var(--primary-red);
    color: var(--white);
}

/* ========================================
   Reviews Grid
   ======================================== */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.review-card {
    background: var(--white);
    padding: 1.75rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.review-rating {
    display: flex;
    gap: 0.25rem;
}

.review-rating i {
    color: #FCD34D;
    font-size: 1.125rem;
}

.review-text {
    color: var(--gray-700);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.review-author {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 600;
}

/* ========================================
   Settings Cards
   ======================================== */
.settings-card {
    background: var(--white);
    padding: 1.75rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-bottom: 1.5rem;
}

.settings-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary-black);
    margin-bottom: 0.5rem;
}

.settings-card p {
    color: var(--gray-600);
    margin-bottom: 1rem;
}

/* ========================================
   Page Header
   ======================================== */
.page-header {
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1 {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--primary-black);
    margin: 0;
}

.page-header p {
    font-size: 0.938rem;
    color: var(--gray-600);
    width: 100%;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .admin-header {
        left: 0;
    }
    
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition-base);
    }
    
    .admin-sidebar.active {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0;
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .table-container {
        overflow-x: scroll;
    }
}
