@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

/* ============================================================
   Apollo Campus Connect - Premium Auth UI
   ============================================================ */

:root {
    --apollo-navy: #1e293b;
    --apollo-blue: #0e7fa3;
    --apollo-teal: #f59e0b;
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-blur: 32px;
}

body.auth-page {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    /* Use a high-quality modern background gradient if image fails */
    background: linear-gradient(135deg, #f0f9ff 0%, #cbebff 50%, #bae6fd 100%);
    background-image: url('../images/sample_background.svg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 2rem 5% 2rem 1rem;
    position: relative;
}

/* Subtle dark overlay to make the bright card pop */
body.auth-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 0;
}

.auth-card {
    background: #e9eaec;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4) inset, 0 15px 40px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 480px;
    overflow: hidden;
    position: relative;
    z-index: 1;
    animation: cardSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardSlideUp {
    0% { opacity: 0; transform: translateY(40px) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-header {
    background: #232f3e;
    padding: 2.5rem 2.5rem 2rem;
    text-align: center;
    color: #f8fafc;
    position: relative;
    overflow: hidden;
    border-bottom: 5px solid var(--apollo-teal);
}

.auth-header img {
    width: 150px;
    height: auto;
    max-height: 80px;
    object-fit: contain;
    margin-bottom: 0.75rem;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

.auth-header h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.auth-header p {
    font-size: 0.9rem;
    color: #94a3b8;
    margin: 0;
    font-weight: 500;
}

.auth-body {
    padding: 2rem;
    background: transparent;
}

/* Tabs for Login */
.auth-tabs {
    border-bottom: none;
    margin-bottom: 1.5rem !important;
    gap: 0.5rem;
    display: flex;
    justify-content: flex-start;
}



.auth-tabs .nav-link {
    color: #64748b;
    background: transparent;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    padding: 0.6rem 1rem;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 6px;
}

.auth-tabs .nav-link:hover {
    color: var(--apollo-navy);
}

.auth-tabs .nav-link.active {
    color: var(--apollo-navy);
    background: #ffffff;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Floating Inputs */
.form-floating > .form-control,
.form-floating > .form-select {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    height: 3.8rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: #334155;
    background-color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding-left: 2.75rem; /* Space for icon */
}

.form-floating > .form-control:focus,
.form-floating > .form-select:focus {
    border-color: var(--apollo-blue);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15);
}

.form-floating > label {
    padding-top: 1.15rem;
    padding-left: 2.75rem;
    color: #94a3b8;
    font-weight: 500;
    transition: all 0.3s ease;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select ~ label {
    color: var(--apollo-blue);
    transform: scale(0.85) translateY(-0.75rem) translateX(-0.15rem);
    opacity: 1;
}

.form-floating > i.position-absolute {
    left: 1rem !important;
    top: 1.25rem !important;
    font-size: 1.1rem;
    color: #94a3b8;
    z-index: 5;
    transition: color 0.3s ease;
}

.form-floating > .form-control:focus ~ i.position-absolute,
.form-floating > .form-select:focus ~ i.position-absolute {
    color: var(--apollo-blue) !important;
}

/* Buttons */
.btn-login {
    background: var(--apollo-navy);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 0.85rem 1.5rem;
    font-size: 1.05rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(30, 41, 59, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 41, 59, 0.4);
    color: #fff;
    background: #0f172a;
}

.btn-login:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(30, 41, 59, 0.3);
}

/* Auth links */
a.text-primary {
    color: var(--apollo-blue) !important;
    transition: color 0.2s;
    text-decoration: none;
}
a.text-primary:hover {
    color: #0b5d78 !important;
    text-decoration: underline;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 12px;
    padding: 1rem;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.alert-danger {
    background: #fef2f2;
    color: #b91c1c;
    border-left: 4px solid #ef4444;
}
.alert-success {
    background: #f0fdf4;
    color: #15803d;
    border-left: 4px solid #22c55e;
}

/* OTP Input */
.otp-input {
    font-size: 2rem !important;
    font-weight: 800 !important;
    text-align: center;
    letter-spacing: 0.5rem;
    height: 4.5rem !important;
    border-radius: 12px !important;
    padding-left: 1rem !important; /* Override floating input padding */
    border: 2px dashed #94a3b8 !important;
}

.otp-input:focus {
    border: 2px dashed var(--apollo-blue) !important;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15) !important;
}

/* Shake Animation for Errors */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake-error {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, .15) !important;
}

.btn-login {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: .85rem;
    font-weight: 600;
    font-size: 1.05rem;
    border-radius: 8px;
    width: 100%;
    transition: all .3s ease;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.3);
}

.btn-login:hover {
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
    color: #fff;
    box-shadow: 0 12px 25px rgba(15, 23, 42, 0.45);
    transform: translateY(-2px);
}

/* OTP input */
.otp-input {
    font-size: 1.6rem;
    font-family: 'Consolas', monospace;
    letter-spacing: .4rem;
    text-align: center;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: .75rem;
    font-weight: 700;
}

.otp-input:focus {
    border-color: var(--apollo-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 168, .15);
    outline: none;
}

/* countdown timer */
#otp-timer {
    font-size: .85rem;
    color: #dc2626;
    font-weight: 600;
}

/* Password strength meter */
.pwd-strength-bar {
    height: 4px;
    border-radius: 2px;
    transition: all .3s;
    background: #e2e8f0;
}

.pwd-strength-bar.weak {
    background: #ef4444;
    width: 33%;
}

.pwd-strength-bar.fair {
    background: #e5a832;
    width: 66%;
}

.pwd-strength-bar.strong {
    background: #22c55e;
    width: 100%;
}

.pwd-strength-text {
    font-size: .72rem;
}

/* Footer text links */
.auth-body a.text-primary {
    color: var(--apollo-blue) !important;
}

.auth-body a.text-primary:hover {
    color: var(--apollo-navy) !important;
}