/* ============================================
   Auth Pages — shared styles for Login,
   Register, ForgotPassword, ResetPassword.
   Loaded from _AuthLayout.cshtml.
   ============================================ */

/* ── Shell ────────────────────────────────── */

.auth-shell {
    display: flex;
    min-height: 100vh;
}

/* ── Left Panel — image with gradient ────── */

.auth-image-panel {
    flex: 1;
    position: relative;
    background: linear-gradient(135deg,
        rgba(13, 110, 253, 0.75) 0%,
        rgba(13, 202, 240, 0.65) 100%),
        url('/images/FS1-Campus.jpeg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.auth-image-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg,
        rgba(13, 110, 253, 0.65) 0%,
        rgba(13, 202, 240, 0.55) 100%);
    z-index: 1;
}

.auth-image-panel::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(255,255,255,0.05) 0%, transparent 50%);
    z-index: 1;
}

.auth-image-overlay {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 3;
    transition: all 0.3s ease;
}

.auth-image-overlay:hover {
    transform: translateY(-2px);
}

[dir="rtl"] .auth-image-overlay {
    left: auto;
    right: 2rem;
}

.auth-welcome-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 3rem;
    max-width: 600px;
}

.auth-welcome-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 3px 15px rgba(0,0,0,0.3);
    line-height: 1.2;
}

.auth-welcome-content .lead {
    font-size: 1.5rem;
    font-weight: 500;
}

.auth-welcome-content .small {
    font-size: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

/* Feature icon (mortarboard, key, shield, etc.) */

.feature-icon {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    animation: authFloat 6s ease-in-out infinite;
}

.feature-icon i {
    font-size: 2rem;
}

@keyframes authFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}

/* ── Right Panel — form ──────────────────── */

.auth-form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 2rem;
    overflow-y: auto;
    background: #ffffff;
}

/* vertiically centre when content fits; allow scroll when it overflows */
.auth-form-inner {
    width: 100%;
    max-width: 420px;
    margin-top: auto;
    margin-bottom: auto;
    animation: authFadeInUp 0.6s ease-out;
}

@keyframes authFadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Step pill (ForgotPassword / ResetPassword) ── */

.step-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    background: rgba(13, 110, 253, 0.08);
    color: var(--bs-primary);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 1.25rem;
}

.step-pill .step-pill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--bs-primary);
}

/* ── Typography ───────────────────────────── */

.auth-form-inner h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.auth-form-inner .subtitle {
    color: #6c757d;
    font-size: 1rem;
    line-height: 1.55;
    margin-bottom: 2rem;
}

/* ── Forms ────────────────────────────────── */

.form-floating {
    margin-bottom: 1.5rem;
}

.form-control,
.form-select {
    border: 2px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 1rem 0.75rem;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

.form-floating > label {
    padding: 1rem 0.75rem;
    color: #6c757d;
}

/* validation */

.auth-form-inner .text-danger,
.auth-form-inner .field-validation-error {
    display: block;
    font-size: 0.82rem;
    margin-top: 4px;
}

.auth-form-inner .alert {
    border-radius: 0.5rem;
    border: none;
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* ── Checkbox ─────────────────────────────── */

.form-check-input:checked {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

/* ── Buttons — gold gradient ─────────────── */

.auth-form-inner .btn-primary {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    border: none;
    color: #000;
    font-weight: 600;
    padding: 0.875rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.auth-form-inner .btn-primary:hover {
    background: linear-gradient(135deg, #ffcd38 0%, #ffa726 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
    color: #000;
}

.auth-form-inner .btn-primary:active {
    transform: translateY(0);
}

.auth-form-inner .btn-primary:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 193, 7, 0.5);
    color: #000;
}

/* ── Text links ───────────────────────────── */

.text-link {
    color: var(--bs-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.text-link:hover {
    color: var(--bs-info);
    text-decoration: underline;
}

/* ── Footer (ForgotPassword / ResetPassword) ── */

.auth-form-footer {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #f1f3f5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.auth-form-footer p {
    margin: 0;
}

/* ── Code input (ResetPassword) ────────────── */

.code-input-wrapper {
    margin-bottom: 1.5rem;
}

.code-input-wrapper .form-floating {
    margin-bottom: 0.4rem;
}

.code-input {
    font-family: "SF Mono", "Consolas", "Courier New", monospace !important;
    font-size: 1.6rem !important;
    font-weight: 600;
    letter-spacing: 0.4em;
    text-align: center;
    padding-top: 1.6rem !important;
    padding-bottom: 0.7rem !important;
    height: calc(3.5rem + 14px);
    background: #fafbfc;
}

.code-input::placeholder {
    color: #ced4da;
    font-weight: 400;
}

.code-input:focus {
    background: #ffffff;
}

.code-input-wrapper .form-floating > label {
    display: none;
}

.code-input-help {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #6c757d;
    padding: 0 0.25rem;
}

.code-input-help i {
    color: #adb5bd;
}

/* ── Field section label ──────────────────── */

.field-section-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #adb5bd;
    margin: 0.5rem 0 0.75rem;
}

/* ── Alert variants ───────────────────────── */

.alert-code-sent {
    background: #e8f5ec;
    color: #1f7a3e;
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    line-height: 1.4;
}

.alert-code-sent i {
    font-size: 1.1rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

/* ── Mobile brand ─────────────────────────── */

.mobile-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
}

.mobile-brand img {
    height: 48px;
}

.mobile-brand span {
    font-size: 1.25rem;
    font-weight: 500;
    color: #1a1a1a;
}

/* ── Responsive ───────────────────────────── */

@media (max-width: 767.98px) {
    .auth-shell {
        flex-direction: column;
    }

    .auth-image-panel {
        display: none !important;
    }

    .auth-form-panel {
        padding: 2rem 1.5rem;
    }

    .auth-form-inner {
        max-width: 100%;
    }

    .auth-form-inner h2 {
        font-size: 1.75rem;
    }

    .auth-welcome-content h1 {
        font-size: 2rem;
    }

    .code-input {
        font-size: 1.4rem !important;
        letter-spacing: 0.3em;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .auth-welcome-content h1 {
        font-size: 2.5rem;
    }

    .auth-form-inner {
        max-width: 380px;
    }
}
