/* Shared styles for the auth flow: Login, ForgotPassword, ResetPassword, VerifyResetCode */

:root {
    --bg-light: #f1f5f9;
    --panel-left-bg: #d1fae5;
    --panel-right-bg: #ffffff;
    --accent-cyan: #059669;
    --accent-teal: #0d9488;
    --accent-teal-hover: #0f766e;
    --input-bg: #f8fafc;
    --input-border: #e2e8f0;
    --text-heading: #0f172a;
    --text-sub: #64748b;

    /* Bootstrap "primary" re-themed from blue to green - see _Layout.cshtml for why
       these per-component overrides are needed instead of just --bs-primary. */
    --bs-primary: #059669;
    --bs-primary-rgb: 5, 150, 105;
    --bs-link-color: #059669;
    --bs-link-color-rgb: 5, 150, 105;
    --bs-link-hover-color: #047857;
    --bs-link-hover-color-rgb: 4, 120, 87;
}

.btn-primary {
    --bs-btn-bg: #059669;
    --bs-btn-border-color: #059669;
    --bs-btn-hover-bg: #047857;
    --bs-btn-hover-border-color: #047857;
    --bs-btn-active-bg: #065f46;
    --bs-btn-active-border-color: #065f46;
    --bs-btn-disabled-bg: #059669;
    --bs-btn-disabled-border-color: #059669;
    --bs-btn-focus-shadow-rgb: 5, 150, 105;
}

.btn-outline-primary {
    --bs-btn-color: #059669;
    --bs-btn-border-color: #059669;
    --bs-btn-hover-bg: #059669;
    --bs-btn-hover-border-color: #059669;
    --bs-btn-active-bg: #047857;
    --bs-btn-active-border-color: #047857;
    --bs-btn-focus-shadow-rgb: 5, 150, 105;
}

.form-control:focus,
.form-select:focus {
    border-color: #6ee7b7;
    box-shadow: 0 0 0 .25rem rgba(5, 150, 105, .25);
}

.form-check-input:checked {
    background-color: #059669;
    border-color: #059669;
}

.form-check-input:focus {
    border-color: #6ee7b7;
    box-shadow: 0 0 0 .25rem rgba(5, 150, 105, .25);
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: #eef2f9;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    margin: 0;
    overflow-x: hidden;
}

/* Ambient glow behind the card */
.ambient-glow {
    position: absolute;
    width: 700px;
    height: 500px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, rgba(241, 245, 249, 0) 70%);
    z-index: 0;
    pointer-events: none;
    filter: blur(50px);
}

/* Main split card shell */
.login-split-card {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 980px;
    background-color: var(--panel-right-bg);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12), 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    min-height: 580px;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

/* Left side: light branding panel */
.left-branding-panel {
    flex: 1;
    background: linear-gradient(165deg, #d1fae5 0%, #ecfdf5 100%);
    padding: 3.5rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    color: #0f172a;
}

/* Concentric circle graphic in the bottom right of the left panel */
.left-branding-panel::after {
    content: '';
    position: absolute;
    bottom: -80px;
    right: -80px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    border: 1px solid rgba(13, 148, 136, 0.15);
    box-shadow: 0 0 0 40px rgba(13, 148, 136, 0.05);
    pointer-events: none;
}

.brand-logo-badge {
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.brand-logo-img {
    object-fit: contain;
    width: 150px;
}

.system-sub-title {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    color: var(--accent-cyan);
    text-transform: uppercase;
    margin-bottom: 0.8rem;
}

.main-headline {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.25rem;
}

.main-headline span {
    color: var(--accent-cyan);
}

.brand-desc-text {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.brand-footer-line {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #64748b;
    text-transform: uppercase;
}

/* Multi-step progress indicator (password recovery flow) */
.step-progress-box {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    padding: 1rem;
    margin-bottom: 2rem;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.88rem;
    color: #64748b;
}

.step-item.active {
    color: #0f172a;
    font-weight: 600;
}

.step-item.completed {
    color: #059669;
}

.step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

.step-item.active .step-number {
    background: var(--accent-teal);
    color: #ffffff;
}

.step-item.completed .step-number {
    background: #059669;
    color: #ffffff;
}

/* Right side: clean white form panel */
.right-form-panel {
    flex: 1;
    background-color: var(--panel-right-bg);
    padding: 3.5rem 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.form-header-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2.1rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 0.35rem;
}

.form-header-sub {
    color: var(--text-sub);
    font-size: 0.92rem;
    margin-bottom: 2rem;
}

.form-label-custom {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.45rem;
    display: block;
}

.form-input-box {
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    color: #0f172a !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.85rem 1.1rem;
    border-radius: 12px;
    width: 100%;
    transition: all 0.2s ease;
}

.form-input-box:focus {
    background-color: #ffffff;
    border-color: var(--accent-teal);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
    outline: none;
}

.password-input-group {
    position: relative;
}

.toggle-show-btn {
    position: absolute;
    right: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--accent-teal);
    cursor: pointer;
    user-select: none;
    text-transform: uppercase;
}

.toggle-show-btn:hover {
    color: var(--accent-teal-hover);
}

/* Primary submit button used across the auth forms */
.btn-submit {
    background: linear-gradient(135deg, #0d9488 0%, #059669 100%);
    border: none;
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.9rem;
    border-radius: 14px;
    width: 100%;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 10px 25px rgba(13, 148, 136, 0.3);
    transition: all 0.25s ease;
}

.btn-submit:hover {
    background: linear-gradient(135deg, #0f766e 0%, #065f46 100%);
    transform: translateY(-1px);
}

/* Security code (Views/Shared/_BotProtection.cshtml) */
.captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.captcha-img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--input-border);
    border-radius: 12px;
    background-color: var(--input-bg);
}

.captcha-refresh {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    padding: 0;
    border: 1px solid var(--input-border);
    border-radius: 12px;
    background-color: var(--input-bg);
    color: var(--accent-teal);
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.captcha-refresh:hover {
    border-color: var(--accent-teal);
    background-color: var(--accent-teal);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(13, 148, 136, 0.25);
}

.captcha-refresh:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.25);
}

.captcha-refresh i {
    transition: transform 0.35s ease;
}

.captcha-refresh:hover i {
    transform: rotate(90deg);
}

.captcha-refresh.is-loading i {
    animation: captcha-spin 0.7s linear infinite;
}

@keyframes captcha-spin {
    to { transform: rotate(360deg); }
}

.captcha-input {
    text-transform: uppercase;
    letter-spacing: 0.35em;
    font-weight: 700;
}

.captcha-input::placeholder {
    text-transform: none;
    letter-spacing: normal;
    font-weight: 500;
}

@media (max-width: 900px) {
    .login-split-card {
        flex-direction: column;
    }

    .left-branding-panel,
    .right-form-panel {
        padding: 2.5rem 2rem;
    }
}

/* Short/landscape viewports: don't force extra scroll with a fixed min-height */
@media (max-height: 700px) {
    .login-split-card {
        min-height: 0;
    }
}

@media (max-width: 575.98px) {
    body {
        padding: 0.75rem;
    }

    .login-split-card {
        border-radius: 18px;
        min-height: 0;
    }

    .left-branding-panel,
    .right-form-panel {
        padding: 1.75rem 1.5rem;
    }

    .brand-logo-img {
        width: 180px;
    }

    .main-headline {
        font-size: 1.6rem;
        margin-bottom: 0.85rem;
    }

    .brand-desc-text {
        font-size: 0.85rem;
        margin-bottom: 1.25rem;
    }

    .brand-footer-line {
        font-size: 0.65rem;
    }

    .form-header-title {
        font-size: 1.6rem;
    }

    .btn-submit {
        padding: 0.8rem;
    }
}
