/* =====================================================
   FBA — Auth pages & Student Portal
   Loaded after style.css (design tokens live there).
   ===================================================== */

/* =====================================================
   1. Auth layout (admin login, student login)
   ===================================================== */
.auth-body {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    background:
        radial-gradient(900px 500px at 110% -10%, rgba(99, 174, 242, 0.25), transparent 60%),
        radial-gradient(700px 420px at -10% 110%, rgba(156, 202, 247, 0.35), transparent 60%),
        #f3f7fc;
}

.auth-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}

/* Brand / hero side */
.auth-hero {
    position: relative;
    overflow: hidden;
    padding: 56px 56px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: var(--brand-900);
    background:
        radial-gradient(520px 320px at 85% 12%, rgba(255, 255, 255, 0.75), transparent 70%),
        linear-gradient(145deg, #e3f0fd 0%, #c7e0fb 45%, #9ccaf7 100%);
}

.auth-hero::before,
.auth-hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.auth-hero::before {
    width: 520px; height: 520px;
    right: -180px; bottom: -200px;
    border: 60px solid rgba(255, 255, 255, 0.28);
}

.auth-hero::after {
    width: 220px; height: 220px;
    left: -70px; top: 38%;
    background: rgba(255, 255, 255, 0.25);
}

.auth-hero > * { position: relative; z-index: 1; }

.auth-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.auth-brand-mark {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: #fff;
    color: var(--brand-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 10px 24px rgba(26, 115, 209, 0.22);
    flex-shrink: 0;
}

.auth-brand-text strong { display: block; font-size: 17px; line-height: 1.3; }
.auth-brand-text span { font-size: 13px; color: var(--brand-700); }

.auth-hero-copy { max-width: 520px; margin: 48px 0; }
.auth-hero-copy .eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 5px 14px; border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid #fff;
    font-size: 13px; font-weight: 600; color: var(--brand-700);
    margin-bottom: 16px;
}
.auth-hero-copy h2 {
    font-size: clamp(1.7rem, 2.6vw, 2.4rem);
    line-height: 1.35;
    color: var(--brand-900);
    margin: 0 0 12px;
}
.auth-hero-copy p { font-size: 15.5px; color: var(--brand-800); opacity: 0.9; margin: 0; }

.auth-features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    max-width: 540px;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(6px);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--brand-900);
}

.auth-feature i {
    width: 34px; height: 34px;
    border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--brand-600); color: #fff; font-size: 14px;
    flex-shrink: 0;
}

.auth-hero-foot { font-size: 12.5px; color: var(--brand-800); opacity: 0.85; margin-top: 32px; }

/* Form side */
.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.auth-card {
    width: 100%;
    max-width: 430px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 38px 34px 30px;
    box-shadow: 0 24px 60px rgba(15, 39, 68, 0.10);
    animation: fadeInUp 0.5s ease both;
}

.auth-card-head { text-align: center; margin-bottom: 26px; }

.auth-card-head .brand-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--brand-400), var(--brand-600));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    box-shadow: 0 12px 26px rgba(26, 115, 209, 0.3);
}

.auth-card-head h1 { font-size: 1.35rem; margin: 0 0 4px; color: var(--ink-strong); }
.auth-card-head p { font-size: 14px; color: var(--text-secondary); margin: 0; }

.auth-card .form-group { margin-bottom: 18px; }

.auth-card label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 7px;
}

.input-wrapper { position: relative; }

.input-wrapper .input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--brand-400);
    font-size: 15px;
    pointer-events: none;
    transition: color 0.15s ease;
}

.form-input {
    width: 100%;
    height: 50px;
    padding: 0 46px 0 44px;
    font-family: var(--font-ui);
    font-size: 15px;
    color: var(--ink);
    background: var(--surface-2);
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.form-input::placeholder { color: #9fb0c6; }

.form-input:hover { border-color: #bcd0e5; }

.form-input:focus {
    outline: none;
    background: #fff;
    border-color: var(--brand-400);
    box-shadow: var(--ring);
}

.input-wrapper:focus-within .input-icon { color: var(--brand-600); }

.toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
}

.toggle-password:hover { background: var(--brand-50); color: var(--brand-700); }

.btn-login {
    position: relative;
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-700) 100%);
    color: #fff;
    font-family: var(--font-ui);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(26, 115, 209, 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-login:hover { filter: brightness(1.05); box-shadow: 0 14px 28px rgba(26, 115, 209, 0.34); }
.btn-login:active { transform: translateY(1px); }
.btn-login:disabled { cursor: wait; opacity: 0.9; }
.btn-login .btn-text { display: inline-flex; align-items: center; gap: 8px; }
.btn-login .spinner-border { display: none; width: 22px; height: 22px; border-width: 3px; }
.btn-login.loading .btn-text { display: none; }
.btn-login.loading .spinner-border { display: inline-block; }

.login-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 18px;
    border: 1px solid transparent;
    border-left-width: 4px;
}

.login-alert.alert-error { background: var(--danger-soft); color: #991b1b; border-color: #f7cfcf; border-left-color: #dc2626; animation: shake 0.4s ease; }
.login-alert.alert-success { background: var(--success-soft); color: #166534; border-color: #c5ead3; border-left-color: #16a34a; }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 16px;
    color: var(--text-soft);
    font-size: 12.5px;
}

.auth-divider::before,
.auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.auth-alt-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 46px;
    border-radius: 14px;
    border: 1px solid var(--brand-200);
    background: var(--brand-50);
    color: var(--brand-700);
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition-fast);
}

.auth-alt-link:hover { background: var(--brand-100); color: var(--brand-800); border-color: var(--brand-300); }

.auth-foot {
    text-align: center;
    margin-top: 20px;
    font-size: 12.5px;
    color: var(--text-soft);
}

@media (max-width: 991.98px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-hero { padding: 26px 22px 70px; }
    .auth-hero-copy { margin: 22px 0 0; }
    .auth-hero-copy h2 { font-size: 1.45rem; }
    .auth-features, .auth-hero-foot { display: none; }
    .auth-panel { padding: 0 16px 32px; margin-top: -52px; align-items: flex-start; }
}

@media (max-width: 480px) {
    .auth-card { padding: 28px 20px 22px; border-radius: 20px; }
    .auth-hero-copy .eyebrow { font-size: 12px; }
    .auth-brand-text strong { font-size: 15.5px; }
}

/* =====================================================
   2. Student portal
   ===================================================== */
.portal-body {
    font-family: var(--font-ui) !important;
    background-color: var(--bg-main) !important;
}

.navbar-custom {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 2px 14px rgba(15, 39, 68, 0.05) !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.navbar-custom .navbar-brand {
    color: var(--brand-900) !important;
    font-weight: 700 !important;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.navbar-custom .navbar-brand i {
    width: 38px; height: 38px;
    border-radius: 11px;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--brand-400), var(--brand-600));
    color: #fff !important;
    font-size: 16px;
}

.navbar-custom .navbar-toggler {
    width: 42px; height: 42px;
    border-radius: 12px !important;
    background: var(--brand-50);
    border: 1px solid var(--brand-100) !important;
}

.navbar-custom .navbar-toggler i { color: var(--brand-700) !important; }
.navbar-custom .navbar-toggler:focus { box-shadow: var(--ring); }

.navbar-custom .nav-link {
    color: #3b5474 !important;
    font-weight: 500;
    border-radius: 10px;
    padding: 8px 14px !important;
    margin: 0 2px;
    transition: var(--transition-fast);
}

.navbar-custom .nav-link:hover { background: var(--brand-50); color: var(--brand-800) !important; }

.navbar-custom .nav-link.fw-bold,
.navbar-custom .nav-link.active {
    background: var(--brand-600);
    color: #fff !important;
}

.navbar-custom .text-white { color: var(--ink) !important; }

.navbar-custom .btn-outline-light {
    --bs-btn-color: #c81e1e;
    --bs-btn-border-color: #f3b4b4;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #dc2626;
    --bs-btn-hover-border-color: #dc2626;
    background: #fff;
}

@media (max-width: 991.98px) {
    .navbar-custom .navbar-nav { margin: 10px 0 0 !important; gap: 2px; }
    .navbar-custom .nav-link { margin: 0; }
}

.portal-body .card {
    border: 1px solid var(--line) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-sm) !important;
}

.portal-body .card-header {
    background: #fff;
    border-bottom: 1px solid var(--line) !important;
    font-weight: 700;
    color: var(--ink-strong);
}

.portal-body .card-header.bg-primary { color: #fff; }

.profile-img,
.profile-img-preview {
    width: 132px !important;
    height: 132px !important;
    border-radius: 28px !important;
    object-fit: cover;
    border: 4px solid #fff !important;
    box-shadow: 0 0 0 1px var(--brand-200), 0 10px 24px rgba(26, 115, 209, 0.18) !important;
}

.portal-body .info-label { color: var(--text-secondary) !important; font-size: 13px !important; }
.portal-body .info-value { color: var(--ink-strong) !important; font-weight: 600 !important; }

.portal-body .list-group-item { border-color: var(--line); padding-top: 11px; padding-bottom: 11px; }

.star-rating label { transition: color 0.12s ease, transform 0.12s ease; }
.star-rating label:hover { transform: scale(1.1); }

@media print {
    .navbar-custom { display: none !important; }
    .portal-body { background: #fff !important; }
}

/* =====================================================
   3. Vivid theme layer
   ===================================================== */
.auth-body {
    background:
        radial-gradient(900px 500px at 110% -10%, rgba(61, 149, 247, 0.35), transparent 60%),
        radial-gradient(700px 420px at -10% 110%, rgba(116, 179, 255, 0.4), transparent 60%),
        #e6f0fb;
}
.auth-hero {
    color: #fff;
    background:
        radial-gradient(520px 320px at 85% 12%, rgba(255, 255, 255, 0.25), transparent 70%),
        linear-gradient(145deg, #3d95f7 0%, #1a7ceb 45%, #0a55b6 100%);
}
.auth-hero::before { border-color: rgba(255, 255, 255, 0.12); }
.auth-hero::after { background: rgba(255, 255, 255, 0.1); }
.auth-brand-text strong, .auth-hero-copy h2 { color: #fff; }
.auth-brand-text span, .auth-hero-copy p, .auth-hero-foot { color: rgba(255, 255, 255, 0.88); }
.auth-hero-copy .eyebrow { background: rgba(255, 255, 255, 0.18); border-color: rgba(255, 255, 255, 0.4); color: #fff; }
.auth-feature { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.3); color: #fff; }
.auth-feature i { background: #fff; color: var(--brand-700); }
.auth-card { border-color: #cfe1f6; box-shadow: 0 24px 60px rgba(11, 100, 208, 0.18); }
.form-input { background: #f2f8ff; border-color: var(--line-strong); }

.navbar-custom {
    background: linear-gradient(90deg, #1a7ceb 0%, #0b64d0 100%) !important;
    border-bottom: 0;
    box-shadow: 0 6px 20px rgba(11, 100, 208, 0.25) !important;
}
.navbar-custom .navbar-brand { color: #fff !important; }
.navbar-custom .navbar-brand i { background: #fff; color: var(--brand-700) !important; }
.navbar-custom .nav-link { color: rgba(255, 255, 255, 0.92) !important; }
.navbar-custom .nav-link:hover { background: rgba(255, 255, 255, 0.15); color: #fff !important; }
.navbar-custom .nav-link.fw-bold,
.navbar-custom .nav-link.active { background: #fff; color: var(--brand-700) !important; }
.navbar-custom .text-white { color: #fff !important; }
.navbar-custom .navbar-toggler { background: rgba(255, 255, 255, 0.15); border-color: rgba(255, 255, 255, 0.3) !important; }
.navbar-custom .navbar-toggler i { color: #fff !important; }
.navbar-custom .btn-outline-light { --bs-btn-color: #fff; --bs-btn-border-color: rgba(255,255,255,.6); --bs-btn-hover-bg: #fff; --bs-btn-hover-color: #c81e1e; --bs-btn-hover-border-color: #fff; background: transparent; }
.portal-body .card-header { background: linear-gradient(180deg, #f5faff 0%, #e9f3ff 100%) !important; }

/* 8-item feature grid on the login hero */
.auth-features { max-width: 620px; gap: 10px; }
.auth-feature { padding: 10px 12px; font-size: 13px; line-height: 1.35; }
.auth-feature i { width: 32px; height: 32px; font-size: 13.5px; }
@media (min-width: 992px) and (max-height: 820px) {
    .auth-hero { padding-top: 36px; padding-bottom: 28px; }
    .auth-hero-copy { margin: 28px 0; }
    .auth-feature { padding: 8px 10px; }
    .auth-feature i { width: 28px; height: 28px; }
}
@media (min-width: 992px) and (max-height: 680px) {
    .auth-features { display: none; }
}

/* Faculty logo (from Settings) on the login pages */
.auth-brand-mark.has-logo { padding: 5px; overflow: hidden; }
.auth-brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.auth-card-head .brand-logo {
    width: 96px;
    height: 96px;
    margin: 0 auto 14px;
    border-radius: 24px;
    background: #fff;
    border: 1px solid var(--brand-100);
    padding: 8px;
    box-shadow: 0 12px 26px rgba(11, 100, 208, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-card-head .brand-logo img { width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 480px) {
    .auth-card-head .brand-logo { width: 80px; height: 80px; border-radius: 20px; }
}
