/* ============================================
   AFM Onboarding Platform — Auth Pages
   ============================================ */

.auth-body {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, #0f2744 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.auth-wrapper {
    width: 100%;
    max-width: 480px;
}

.auth-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 2rem 1.75rem;
    box-shadow: var(--shadow-lg);
}

.auth-brand-text {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary-dark);
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.35rem;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.auth-form .form-label {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.auth-form .form-control {
    border-radius: 8px;
    border-color: var(--border);
    padding: 0.55rem 0.85rem;
    font-size: 0.9rem;
}

.auth-form .form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.password-field {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0;
    line-height: 1;
    cursor: pointer;
}

.password-toggle:hover {
    color: var(--accent);
}

.password-strength {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.password-strength.weak { color: #dc2626; }
.password-strength.fair { color: #f59e0b; }
.password-strength.good { color: #0d9488; }
.password-strength.strong { color: #16a34a; }

.auth-link {
    color: var(--accent);
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
}

.auth-switch a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.auth-footer a {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    text-decoration: none;
}

.auth-footer a:hover {
    color: #fff;
}

@media (max-width: 575.98px) {
    .auth-card {
        padding: 1.5rem 1.25rem;
    }

    .auth-title {
        font-size: 1.3rem;
    }
}

/* ============================================
   Cursor-style dark login
   ============================================ */

.auth-page--login-dark {
    min-height: 100vh;
    background: #0a0a0a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 5rem 1.25rem 2rem;
    position: relative;
}

.auth-login-navbrand {
    position: fixed;
    top: 1.25rem;
    left: 1.25rem;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-login-navbrand-logo {
    height: 28px;
    width: auto;
    object-fit: contain;
}

.auth-login-navbrand-text {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #fafafa;
}

.auth-login-shell {
    width: 100%;
    max-width: 400px;
    flex: 0 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 1.25rem;
}

.auth-login-stack {
    width: 100%;
}

.auth-login-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fafafa;
    text-align: center;
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
}

.auth-login-tagline {
    font-size: 0.95rem;
    color: #737373;
    text-align: center;
    margin: 0 0 1.75rem;
}

.auth-login-alert {
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.35);
    color: #fca5a5;
    font-size: 0.85rem;
    padding: 0.65rem 0.85rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
}

.auth-login-alert--success {
    background: rgba(22, 163, 74, 0.15);
    border-color: rgba(22, 163, 74, 0.35);
    color: #86efac;
}

.auth-login-social {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1.5rem;
}

.auth-login-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #fafafa;
    background: #171717;
    border: 1px solid #262626;
    border-radius: 6px;
    cursor: pointer;
    opacity: 1;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.auth-login-social-btn:hover {
    background: #262626;
    border-color: #404040;
}

.auth-login-oauth-hint {
    font-size: 0.8rem;
    color: #a3a3a3;
    text-align: center;
    margin: -0.5rem 0 1rem;
    min-height: 1.25rem;
}

.auth-login-inline-error {
    color: #f87171;
}

.auth-login-social-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.auth-login-social-icon.bi-icon {
    font-size: 1.1rem;
    width: auto;
    height: auto;
}

.auth-login-form {
    margin-bottom: 1.5rem;
}

.auth-login-field {
    margin-bottom: 1rem;
}

.auth-login-field--hidden {
    display: none;
}

.auth-login-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: #a3a3a3;
    margin-bottom: 0.4rem;
}

.auth-login-input {
    display: block;
    width: 100%;
    padding: 0.65rem 0.85rem;
    font-size: 0.9rem;
    color: #fafafa;
    background: #171717;
    border: 1px solid #404040;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-login-input::placeholder {
    color: #525252;
}

.auth-login-input:focus {
    border-color: #737373;
    box-shadow: 0 0 0 1px rgba(250, 250, 250, 0.06);
}

.auth-login-password-wrap {
    position: relative;
}

.auth-login-password-wrap .auth-login-input {
    padding-right: 2.75rem;
}

.auth-login-password-toggle {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #737373;
    padding: 0.35rem;
    cursor: pointer;
    line-height: 1;
}

.auth-login-password-toggle:hover {
    color: #a3a3a3;
}

.auth-login-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.65rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.auth-login-check {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: #a3a3a3;
    cursor: pointer;
    margin: 0;
}

.auth-login-check-input {
    accent-color: #fafafa;
}

.auth-login-link-muted {
    font-size: 0.8rem;
    color: #737373;
    text-decoration: none;
}

.auth-login-link-muted:hover {
    color: #a3a3a3;
}

.auth-login-primary {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #0a0a0a;
    background: #fafafa;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease, opacity 0.15s ease;
}

.auth-login-primary:hover {
    background: #e5e5e5;
}

.auth-login-primary--hidden {
    display: none;
}

.auth-login-signup {
    text-align: center;
    font-size: 0.9rem;
    color: #737373;
    margin: 0;
}

.auth-login-signup a {
    color: #a3a3a3;
    font-weight: 500;
    text-decoration: none;
}

.auth-login-signup a:hover {
    color: #fafafa;
    text-decoration: underline;
}

.auth-login-legal {
    margin-top: auto;
    padding-top: 2rem;
    padding-bottom: 0.5rem;
    font-size: 0.8rem;
}

.auth-login-legal a {
    color: #737373;
    text-decoration: none;
}

.auth-login-legal a:hover {
    color: #fafafa;
    text-decoration: underline;
}

.auth-login-legal-sep {
    color: #525252;
    margin: 0 0.35rem;
}

.auth-login-legal-agreement {
    margin-top: auto;
    padding-top: 1.5rem;
    padding-bottom: 0.5rem;
    font-size: 0.75rem;
    line-height: 1.5;
    color: #737373;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

.auth-login-legal-agreement a {
    color: #a3a3a3;
    text-decoration: none;
}

.auth-login-legal-agreement a:hover {
    color: #fafafa;
    text-decoration: underline;
}

.auth-login-name-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    margin-bottom: 0;
    width: 100%;
}

.auth-login-name-row .auth-login-field--half {
    flex: none;
    width: auto;
    min-width: 0;
    margin-bottom: 1rem;
}

#registerStep1 .auth-login-field:last-child {
    margin-bottom: 1rem;
}

#registerStep2.auth-login-field--hidden,
#registerStep2 .auth-login-field--hidden {
    display: none;
}

#registerStep2:not(.auth-login-field--hidden) {
    display: block;
}

.auth-page--login-dark .password-strength {
    color: #737373;
}

@media (max-width: 340px) {
    .auth-login-name-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .auth-login-title {
        font-size: 1.45rem;
    }

    .auth-login-navbrand {
        position: absolute;
    }
}

/* ============================================
   AFM full-screen login
   ============================================ */

.auth-page--login-dark {
    display: block;
    padding: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 35% 20%, rgba(39, 193, 91, .08), transparent 30%),
        linear-gradient(110deg, rgba(3, 18, 16, .35), rgba(4, 8, 10, .5) 52%, rgba(8, 12, 15, .62) 100%),
        url("../images/bg.png") center / cover fixed;
    color: #fff;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.auth-login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr);
    position: relative;
}

.auth-login-page::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, .12), transparent 45%),
        linear-gradient(0deg, rgba(1, 8, 7, .2), rgba(1, 8, 7, .04) 42%, rgba(1, 8, 7, .18));
}

.auth-login-hero,
.auth-login-shell,
.auth-login-footer {
    position: relative;
    z-index: 1;
}

.auth-login-hero {
    min-height: calc(100vh - 58px);
    box-sizing: border-box;
    padding: 58px 56px 110px;
    display: flex;
    flex-direction: column;
}

.auth-login-brand {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    color: #fff;
    width: max-content;
}

.auth-login-brand:hover {
    color: #fff;
}

.auth-login-brand-mark {
    width: 72px;
    height: 72px;
    border: 3px solid #34c759;
    border-radius: 50%;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 0 24px rgba(52, 199, 89, .24);
}

.auth-login-brand-mark img {
    width: 86%;
    height: 86%;
    object-fit: contain;
}

.auth-login-brand-copy strong,
.auth-login-brand-copy small {
    display: block;
    text-transform: uppercase;
    line-height: 1.05;
}

.auth-login-brand-copy strong {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: .01em;
}

.auth-login-brand-copy small {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: .03em;
}

.auth-login-hero-copy {
    max-width: 560px;
    margin-top: 58px;
}

.auth-login-hero-copy h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(30px, 3vw, 44px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.auth-login-hero-copy h1 span {
    color: #51c865;
}

.auth-login-hero-copy p {
    max-width: 520px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, .82);
    font-size: 16px;
    line-height: 1.45;
}

.auth-login-shell {
    min-height: calc(100vh - 58px);
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    padding: 18px 56px 70px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-login-stack {
    width: min(100%, 430px);
    padding: 20px 32px 22px;
    border: 1px solid rgba(255, 255, 255, .19);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(23, 27, 30, .76), rgba(11, 14, 16, .82));
    box-shadow: 0 18px 56px rgba(0, 0, 0, .32);
    backdrop-filter: blur(14px);
}

.auth-login-card-head {
    text-align: center;
    margin-bottom: 10px;
}

.auth-login-title {
    font-size: 21px;
    font-weight: 800;
    margin: 0 0 3px;
    letter-spacing: -0.03em;
}

.auth-login-tagline {
    color: rgba(255, 255, 255, .76);
    font-size: 12px;
    margin: 0;
}

.auth-login-social {
    gap: 8px;
    margin-bottom: 10px;
}

.auth-login-social-btn {
    min-height: 36px;
    border-color: rgba(255, 255, 255, .22);
    border-radius: 7px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .03));
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.auth-login-social-btn:hover {
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .34);
}

.auth-login-oauth-hint {
    min-height: 0;
    margin: 0;
    color: #86efac;
}

.auth-login-inline-error {
    margin-bottom: 6px;
    color: #fca5a5;
}

.auth-login-social + .auth-login-oauth-hint::after {
    content: "OR";
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 10px 0 10px;
    color: rgba(255, 255, 255, .75);
    font-size: 14px;
}

.auth-login-form {
    margin-bottom: 10px;
}

.auth-login-field {
    margin-bottom: 10px;
}

.auth-login-label {
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 5px;
}

.auth-login-input {
    min-height: 36px;
    padding: 0 12px;
    border-color: rgba(255, 255, 255, .16);
    border-radius: 7px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .03));
    color: #fff;
    font-size: 12px;
}

.auth-login-input::placeholder {
    color: rgba(255, 255, 255, .45);
}

.auth-login-input:focus {
    border-color: rgba(78, 219, 99, .75);
    box-shadow: 0 0 0 3px rgba(48, 199, 89, .18);
}

.auth-login-password-toggle {
    right: 10px;
    color: rgba(255, 255, 255, .65);
    font-size: 15px;
}

.auth-login-row {
    margin-top: 8px;
}

.auth-login-check {
    color: #fff;
    font-size: 12px;
}

.auth-login-check-input {
    width: 14px;
    height: 14px;
    appearance: none;
    border: 1px solid #2dd05f;
    border-radius: 4px;
    background: transparent;
    accent-color: #2cc75d;
    display: grid;
    place-content: center;
    flex: 0 0 auto;
}

.auth-login-check-input:checked {
    background: #2cc75d;
}

.auth-login-check-input:checked::before {
    content: "";
    width: 7px;
    height: 4px;
    border: solid #07120b;
    border-width: 0 0 2px 2px;
    transform: rotate(-45deg);
    margin-top: -1px;
}

.auth-login-link-muted {
    color: #57e66a;
    font-size: 12px;
    text-decoration: none;
}

.auth-login-link-muted:hover {
    color: #7df58a;
    text-decoration: none;
}

.auth-login-primary {
    min-height: 36px;
    margin-top: 10px;
    border-radius: 7px;
    background: linear-gradient(90deg, #28bd65, #25a959);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

.auth-login-primary:hover {
    background: linear-gradient(90deg, #31cc70, #2dbf65);
}

.auth-login-toast-stack {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 30;
    display: grid;
    gap: 10px;
    width: min(380px, calc(100vw - 36px));
    transform: translate(-50%, -50%);
    pointer-events: auto;
}

.auth-login-alert {
    margin: 0;
    padding: 16px 44px 16px 18px;
    border: 1px solid rgba(239, 68, 68, .58);
    border-radius: 10px;
    background: rgba(61, 20, 20, .94);
    color: #ffb4b4;
    box-shadow: 0 16px 42px rgba(0, 0, 0, .32);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
    position: relative;
    text-align: left;
}

.auth-login-alert-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #dc2626;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    box-shadow: 0 8px 18px rgba(220, 38, 38, .35);
}

.auth-login-alert-close:hover {
    background: #b91c1c;
}

.auth-login-alert--success {
    border-color: rgba(45, 212, 100, .58);
    background: rgba(16, 55, 31, .94);
    color: #a7f3d0;
}

.auth-login-footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 0 48px;
    border-top: 1px solid rgba(255, 255, 255, .18);
    background: rgba(6, 13, 14, .72);
    color: rgba(255, 255, 255, .72);
    font-size: 12px;
}

.auth-login-footer-contact {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px 18px;
    text-align: right;
}

.auth-login-footer-contact span {
    white-space: nowrap;
}

.auth-login-footer-contact strong {
    color: rgba(255, 255, 255, .9);
    font-weight: 700;
    margin-right: 5px;
}

@media (max-width: 1180px) {
    .auth-login-page {
        grid-template-columns: 1fr;
    }

    .auth-login-hero {
        min-height: auto;
        padding: 36px 28px 32px;
    }

    .auth-login-shell {
        min-height: auto;
        padding: 18px 24px 76px;
    }

}

@media (max-width: 760px) {
    .auth-login-stack {
        padding: 18px 18px;
    }

    .auth-login-footer {
        position: relative;
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 22px;
    }

    .auth-login-footer-contact {
        justify-content: flex-start;
        text-align: left;
    }

    .auth-login-footer-contact span {
        white-space: normal;
    }

}
