/* =====================================================================
   Sign-in page (auth/login.php): one full screen, centered card
   ===================================================================== */
.auth-body {
    min-height: 100vh;
    background: #0b2e4a;
}

.auth-body > main { min-height: 100vh; }

/* Full-screen campus photo under a brand gradient */
.auth-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5rem 1rem 4.5rem;
    background:
        linear-gradient(150deg, rgba(0, 72, 132, .93) 0%, rgba(0, 120, 180, .84) 55%, rgba(0, 52, 96, .95) 100%),
        var(--auth-photo) center / cover no-repeat;
    overflow: hidden;
}

/* Soft gold glow for depth */
.auth-page::before {
    content: "";
    position: absolute;
    width: 620px;
    height: 620px;
    left: -180px;
    bottom: -260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201, 162, 39, .28), transparent 65%);
    pointer-events: none;
}

.auth-card {
    position: relative;
    width: 100%;
    max-width: 430px;
    padding: 2.75rem 2.5rem 2rem;
    border-radius: 1.5rem;
    background: #fff;
    box-shadow: 0 2rem 4rem rgba(0, 20, 40, .35);
    text-align: center;
    overflow: hidden;
}

/* College-colored strip at the top of the card */
.auth-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    background: linear-gradient(270deg, var(--gulf-blue-dark), var(--gulf-blue) 55%, var(--gulf-gold));
}

[data-bs-theme="dark"] .auth-card {
    background: #12212a;
    box-shadow: 0 2rem 4rem rgba(0, 0, 0, .55);
}

.auth-logo {
    height: 84px;
    width: auto;
    margin-bottom: 1.5rem;
}

.auth-logo-dark { display: none; }
[data-bs-theme="dark"] .auth-logo-light { display: none; }
[data-bs-theme="dark"] .auth-logo-dark { display: inline-block; }

.auth-title {
    font-size: 1.6rem;
    font-weight: 900;
    margin-bottom: .35rem;
}

.auth-subtitle {
    color: var(--bs-secondary-color);
    font-size: .95rem;
    margin-bottom: 2rem;
}

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    padding: .75rem .9rem;
    margin-bottom: 1.25rem;
    border-radius: .8rem;
    background: rgba(220, 53, 69, .08);
    border: 1px solid rgba(220, 53, 69, .22);
    color: #b02a37;
    font-size: .88rem;
    font-weight: 600;
    text-align: right;
}

.auth-alert i { margin-top: .12rem; }
[data-bs-theme="dark"] .auth-alert { color: #f1a1aa; }

/* Microsoft sign-in button: light = white with grey border, dark = #2F2F2F */
.ms-signin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    width: 100%;
    min-height: 52px;
    padding: .6rem 1.25rem;
    border: 1px solid #8c8c8c;
    border-radius: .6rem;
    background: #fff;
    color: #3b3b3b;
    font-family: "Segoe UI", "Tajawal", system-ui, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    transition: background .2s ease, box-shadow .2s ease, transform .15s ease;
}

.ms-signin-btn:hover {
    background: #f5f5f5;
    color: #1f1f1f;
    box-shadow: 0 .6rem 1.4rem rgba(0, 40, 70, .12);
}

.ms-signin-btn:active { transform: translateY(1px); }

.ms-signin-btn:focus-visible {
    outline: 3px solid rgba(0, 120, 180, .45);
    outline-offset: 2px;
}

[data-bs-theme="dark"] .ms-signin-btn {
    background: #2f2f2f;
    border-color: #2f2f2f;
    color: #fff;
}

[data-bs-theme="dark"] .ms-signin-btn:hover { background: #3a3a3a; }

.ms-logo { flex-shrink: 0; }
.ms-signin-spinner { display: none; }
.ms-signin-btn.is-loading { pointer-events: none; opacity: .8; }
.ms-signin-btn.is-loading .ms-signin-spinner { display: inline-block; }

.auth-hint {
    margin: 1rem 0 0;
    color: var(--bs-secondary-color);
    font-size: .85rem;
}

.auth-hint bdi {
    font-weight: 700;
    color: var(--bs-body-color);
}

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    width: 100%;
    justify-content: center;
    border-top: 1px solid rgba(0, 72, 132, .1);
    color: var(--bs-secondary-color);
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
}

[data-bs-theme="dark"] .auth-back { border-top-color: rgba(255, 255, 255, .08); }
.auth-back:hover { color: var(--gulf-blue); }

/* Theme switch floating in the corner */
.auth-theme-switch {
    position: fixed;
    top: 1.25rem;
    left: 1.25rem;
    z-index: 10;
}

/* Site footer sits over the background at the bottom */
.auth-body > footer {
    position: absolute;
    inset: auto 0 0 0;
    margin: 0 !important;
    border: 0 !important;
    color: rgba(255, 255, 255, .7) !important;
    background: transparent;
}

@media (max-width: 575.98px) {
    .auth-page { padding: 4.5rem .9rem 4rem; }
    .auth-card { padding: 2.25rem 1.4rem 1.6rem; border-radius: 1.25rem; }
    .auth-logo { height: 70px; margin-bottom: 1.2rem; }
    .auth-title { font-size: 1.4rem; }
    .auth-subtitle { margin-bottom: 1.5rem; }
    .ms-signin-btn { font-size: .9rem; gap: .6rem; padding: .6rem .8rem; }
    .auth-theme-switch { top: .9rem; left: .9rem; }
}

@media (max-width: 360px) {
    .ms-signin-btn { font-size: .8rem; gap: .45rem; padding: .55rem .6rem; }
    .auth-card { padding-inline: 1.1rem; }
}
