/* ====================================================================
   Apex International University - Admin Portal CSS
   ==================================================================== */

:root {
    --admin-sidebar-bg: #0f172a;
    --admin-sidebar-text: #94a3b8;
    --admin-sidebar-active: #38bdf8;
    --admin-content-bg: #f8fafc;
    --admin-card-bg: #ffffff;
    --admin-border: #e2e8f0;
}

body.admin-body {
    display: flex;
    min-height: 100vh;
    background-color: var(--admin-content-bg);
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1e293b;
}

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

.sidebar-brand {
    padding: 24px 20px;
    border-bottom: 1px solid #1e293b;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo {
    width: 38px;
    height: 38px;
    background: #2563eb;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
}

.sidebar-brand-text h2 {
    font-size: 1rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0;
    line-height: 1.2;
}

.sidebar-brand-text span {
    font-size: 0.75rem;
    color: #64748b;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 12px;
    margin: 0;
    flex: 1;
}

.sidebar-item {
    margin-bottom: 6px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar-link:hover, .sidebar-link.active {
    background-color: #1e293b;
    color: #ffffff;
}

.sidebar-link.active {
    color: #38bdf8;
    font-weight: 600;
}

.sidebar-footer {
    padding: 18px 20px;
    border-top: 1px solid #1e293b;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-user-info {
    display: flex;
    flex-direction: column;
}

.admin-user-name {
    font-size: 0.825rem;
    font-weight: 600;
    color: #f8fafc;
}

.admin-user-role {
    font-size: 0.725rem;
    color: #64748b;
}

/* Main Admin Layout */
.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-topbar {
    background: #ffffff;
    border-bottom: 1px solid var(--admin-border);
    padding: 16px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-topbar h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.admin-content {
    padding: 30px;
    flex: 1;
}

/* Stat Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: #ffffff;
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-label {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.icon-blue { background: #eff6ff; color: #2563eb; }
.icon-amber { background: #fef3c7; color: #d97706; }
.icon-emerald { background: #ecfdf5; color: #059669; }
.icon-rose { background: #fff1f2; color: #e11d48; }

/* Filter Bar */
.filter-card {
    background: #ffffff;
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.filter-form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    flex: 1;
}

/* Data Table */
.table-card {
    background: #ffffff;
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow: hidden;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

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

.data-table th {
    background: #f8fafc;
    padding: 14px 18px;
    font-size: 0.775rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--admin-border);
}

.data-table td {
    padding: 14px 18px;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--admin-border);
    vertical-align: middle;
}

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

.data-table tr:hover td {
    background-color: #f8fafc;
}

.student-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.student-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #475569;
    flex-shrink: 0;
}

.student-name-box a {
    color: #0f172a;
    font-weight: 600;
    text-decoration: none;
}

.student-name-box a:hover {
    color: #2563eb;
}

.student-sub {
    font-size: 0.75rem;
    color: #64748b;
}

/* Login Page Styling */
.admin-login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 20px;
}

.login-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.35);
    width: 100%;
    max-width: 440px;
    padding: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-logo {
    width: 54px;
    height: 54px;
    background: #1e40af;
    color: #ffffff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin: 0 auto 16px auto;
}

/* Responsive */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    body.admin-body {
        flex-direction: column;
    }
    .admin-sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .filter-card {
        flex-direction: column;
        align-items: stretch;
    }
}
