:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-darker: #1e3a8a;
    --primary-light: #dbeafe;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --ink: #0f172a;
    --ink-soft: #475569;
    --ink-muted: #94a3b8;
    --bg: #eef2f8;
    --card: #ffffff;
    --border: #e2e8f0;
    --shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.14);
    --radius: 14px;
    --radius-sm: 9px;
    --grad: linear-gradient(135deg, #2563eb 0%, #1e3a8a 100%);
}

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

body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
    background: linear-gradient(160deg, #eef2f8 0%, #e4ebf6 100%);
    color: var(--ink);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* ============ LOGIN PAGES ============ */
body.login-page {
    justify-content: center;
    align-items: center;
    background:
        radial-gradient(1100px 520px at 88% -12%, rgba(37, 99, 235, 0.4), transparent 60%),
        radial-gradient(900px 480px at 8% 112%, rgba(245, 158, 11, 0.28), transparent 55%),
        radial-gradient(700px 400px at 50% 50%, rgba(30, 64, 175, 0.25), transparent 60%),
        linear-gradient(140deg, #0f172a 0%, #1e3a8a 55%, #172554 100%);
    color: #fff;
    position: relative;
    overflow-x: hidden;
}

.login-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(2px 2px at 70% 20%, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(3px 3px at 40% 80%, rgba(255, 255, 255, 0.35), transparent),
        radial-gradient(2px 2px at 85% 65%, rgba(255, 255, 255, 0.4), transparent);
    background-size: 220px 220px, 300px 300px, 260px 260px, 320px 320px;
    pointer-events: none;
    opacity: 0.35;
}

.glass-container {
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
    animation: fadeInUp 0.7s ease-out;
}

.glass-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.login-box {
    width: 100%;
    max-width: 430px;
    padding: 2.8rem 2.2rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.logo-area { margin-bottom: 1.8rem; }

.logo-wrapper {
    margin: 0 auto 1.4rem auto;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.06));
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.logo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.logo-icon {
    width: 64px;
    height: 64px;
    color: var(--primary);
}

.institute-title {
    font-size: 1.28rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.5;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.institute-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 1rem;
}

.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    margin: 1rem auto;
    width: 100%;
}

.portal-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.3rem;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.portal-instruction {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.6rem;
}

.input-group { text-align: right; margin-bottom: 1.2rem; }

.input-group label {
    display: block;
    margin-bottom: 0.45rem;
    font-weight: 600;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.85);
}

.input-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(15, 23, 42, 0.55);
    color: #fff;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    transition: all 0.25s ease;
}

.input-group input::placeholder { color: rgba(255, 255, 255, 0.4); }

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.75);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.25);
}

/* ============ BUTTONS ============ */
.btn-primary {
    width: 100%;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 12px;
    background: var(--grad);
    color: #fff;
    font-family: 'Cairo', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-block;
    text-align: center;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
    margin-top: 1rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.45);
    filter: brightness(1.05);
}

.btn-secondary {
    padding: 0.55rem 1.3rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.25s ease;
    display: inline-block;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

/* ============ ALERTS ============ */
.alert {
    padding: 0.95rem 1.2rem;
    border-radius: 12px;
    margin-bottom: 1.4rem;
    font-size: 0.92rem;
    font-weight: 600;
    text-align: center;
    border: 1px solid transparent;
}

.alert-error {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.45);
    color: #fecaca;
}

.alert-success {
    background: rgba(16, 185, 129, 0.16);
    border-color: rgba(16, 185, 129, 0.45);
    color: #a7f3d0;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.16);
    border-color: rgba(245, 158, 11, 0.45);
    color: #fde68a;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.45);
    color: #fecaca;
}

/* ============ SHARED TABLES ============ */
.table-responsive { overflow-x: auto; }

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

th, td {
    padding: 0.9rem 1rem;
    text-align: right;
    border-bottom: 1px solid var(--border);
}

th {
    color: var(--ink-soft);
    font-weight: 700;
    font-size: 0.92rem;
}

tbody tr { transition: background 0.18s ease; }

tbody tr:hover { background: rgba(37, 99, 235, 0.04); }

/* ============ BADGES ============ */
.badge {
    display: inline-block;
    padding: 0.3rem 0.85rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    background: var(--primary-light);
    color: var(--primary-darker);
}

.badge-grade {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 800;
    text-align: center;
    min-width: 46px;
}

.text-center { text-align: center; }
.text-muted { color: var(--ink-muted); }
.font-bold { font-weight: 700; }

/* ============ BLOCKED CARD ============ */
.blocked-card {
    padding: 2.6rem 2rem;
    text-align: center;
    border: 1px solid rgba(239, 68, 68, 0.3);
    background: linear-gradient(160deg, rgba(239, 68, 68, 0.08), rgba(239, 68, 68, 0.02));
    border-radius: 16px;
    margin-top: 1.6rem;
    box-shadow: 0 14px 40px rgba(239, 68, 68, 0.12);
}

.blocked-icon-wrapper {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.2rem auto;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.blocked-icon { width: 40px; height: 40px; color: #ef4444; }

.blocked-title { font-size: 1.6rem; font-weight: 800; color: #dc2626; margin-bottom: 0.7rem; }

.blocked-message { font-size: 1.05rem; color: var(--ink-soft); line-height: 1.6; }

.blocked-divider {
    height: 1px;
    background: rgba(239, 68, 68, 0.2);
    width: 55%;
    margin: 1.2rem auto;
}

.blocked-contact { font-size: 1rem; color: var(--ink-muted); }

.phone-link {
    color: #dc2626;
    text-decoration: none;
    font-weight: 800;
    margin-right: 0.4rem;
    padding: 0.25rem 0.8rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(239, 68, 68, 0.25);
    display: inline-block;
    transition: all 0.2s ease;
}

.phone-link:hover {
    color: #fff;
    background: #dc2626;
    transform: scale(1.05);
}

/* ============ ANIMATIONS ============ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============ MISC ============ */
.highlight-code { color: var(--primary); font-weight: 700; }
.text-muted-small { color: var(--ink-muted); font-size: 0.85rem; }
.course-name { font-weight: 600; color: var(--ink); }
.text-status { font-size: 0.9rem; color: var(--ink-soft); font-weight: 500; }
.logo-image-small { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(37, 99, 235, 0.25); }
.logo-text-small h3 { font-size: 1rem; color: var(--ink); }
.logo-text-small p { font-size: 0.75rem; color: var(--ink-muted); }
