/* Auth Theme Stylesheet - Uses seasonal --theme-* CSS variables from layouts/theme-head */

body {
    background-color: var(--theme-page-bg, #eef5f9);
}

#auth-shell {
    min-height: calc(100vh - 78px);
    display: flex;
    flex-direction: column;
    background-color: var(--theme-page-bg, #eef5f9);
}

.auth-main {
    flex: 1 0 auto;
    overflow-x: hidden;
}

.auth-stage {
    position: relative;
    padding: 48px 0 56px;
}

.auth-stage::before,
.auth-stage::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.auth-stage::before {
    width: 340px;
    height: 340px;
    top: -110px;
    left: -120px;
    background: var(--theme-primary, #6257e8);
    opacity: 0.06;
}

.auth-stage::after {
    width: 280px;
    height: 280px;
    bottom: -90px;
    right: -100px;
    background: var(--theme-accent, #ffb47d);
    opacity: 0.1;
}

.auth-card {
    position: relative;
    z-index: 1;
    max-width: 960px;
    min-height: 550px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 44fr 56fr;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid rgba(22, 33, 62, 0.06);
    box-shadow: 0 24px 60px rgba(22, 33, 62, 0.12), 0 4px 16px rgba(22, 33, 62, 0.05);
    overflow: hidden;
}

.auth-desktop-wave {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
    z-index: 1;
}

/* Left branded column (Desktop) / Top curved dome (Mobile) */
.auth-aside {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 56px 38px 36px;
    color: #ffffff;
}

.auth-aside-inner {
    width: 100%;
    max-width: 280px;
    margin: auto 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.auth-logo-badge {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    margin-bottom: 14px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
}

.auth-logo-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.auth-site-name {
    font-family: 'Manrope', Arial, sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #ffffff;
    margin-bottom: 24px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.14);
}

.auth-aside-title {
    font-family: 'Manrope', Arial, sans-serif;
    font-size: 29px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #ffffff;
    margin: 0 0 12px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
}

.auth-aside-desc {
    font-size: 14px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 28px;
    max-width: 255px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.auth-aside-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 168px;
    padding: 11px 28px;
    border-radius: 999px;
    border: 1.5px solid rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff !important;
    font-family: 'Manrope', Arial, sans-serif;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none !important;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-aside-cta:hover,
.auth-aside-cta:focus {
    background: #ffffff;
    color: var(--theme-primary-dark, #4437c7) !important;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.auth-aside-links {
    margin-top: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.78);
}

.auth-aside-links a {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    transition: color 0.18s ease;
}

.auth-aside-links a:hover,
.auth-aside-links a:focus {
    color: #ffffff;
    text-decoration: underline;
}

.auth-aside-divider {
    opacity: 0.48;
}

.auth-mobile-wave {
    display: none;
}

/* Right form column */
.auth-main-panel {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 52px 54px 44px 52px;
    background: transparent;
}

.auth-form-box {
    width: 100%;
    max-width: 360px;
    position: relative;
    z-index: 2;
}

.auth-form-header {
    text-align: center;
    margin-bottom: 26px;
}

.auth-form-title {
    font-family: 'Manrope', Arial, sans-serif;
    font-size: 31px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: var(--theme-primary-dark, #4437c7);
    margin: 0 0 8px;
}

.auth-form-subtitle {
    font-size: 13.5px;
    line-height: 1.5;
    color: #64748b;
    margin: 0;
}

.auth-mobile-corner {
    display: none;
}

/* Form fields & pill inputs */
.auth-form {
    width: 100%;
}

.auth-field {
    margin-bottom: 16px;
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--theme-primary, #6257e8);
    opacity: 0.8;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-input-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.auth-input {
    width: 100%;
    height: 48px;
    padding: 11px 20px 11px 46px;
    border-radius: 999px;
    border: 1.5px solid transparent;
    background-color: var(--theme-surface-pale, #f3f5ff);
    color: #16213e;
    font-size: 14px;
    font-weight: 500;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input::placeholder {
    color: #7b869e;
    font-weight: 400;
}

.auth-input:focus {
    background-color: #ffffff;
    border-color: var(--theme-primary, #6257e8);
    box-shadow: 0 0 0 4px var(--theme-surface-pale, #f3f5ff);
}

.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--theme-surface-pale, #f3f5ff) inset;
    -webkit-text-fill-color: #16213e;
    transition: background-color 5000s ease-in-out 0s;
}

.auth-input.is-invalid {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.auth-input.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.14);
}

.auth-input-wrap.has-toggle .auth-input {
    padding-right: 48px;
}

.auth-input-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    border-radius: 50%;
    color: #7b869e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.18s ease, background-color 0.18s ease;
    z-index: 2;
}

.auth-input-toggle:hover,
.auth-input-toggle:focus {
    color: var(--theme-primary, #6257e8);
    background-color: rgba(98, 87, 232, 0.08);
    outline: none;
}

.auth-input-toggle svg {
    width: 18px;
    height: 18px;
    display: block;
    pointer-events: none;
}

.auth-error-msg {
    display: block;
    margin-top: 6px;
    padding-left: 18px;
    font-size: 12px;
    font-weight: 600;
    color: #dc3545;
    line-height: 1.4;
    text-align: left;
}

/* Account Info Badge (Reset Password, etc.) */
.auth-account-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    margin-bottom: 18px;
    border-radius: 14px;
    background: var(--theme-surface-pale, #f3f5ff);
    border: 1px solid rgba(98, 87, 232, 0.14);
    box-shadow: inset 0 1px 2px rgba(22, 33, 62, 0.03);
}

.auth-account-badge-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffffff;
    color: var(--theme-primary, #6257e8);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(22, 33, 62, 0.06);
}

.auth-account-badge-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.auth-account-badge-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    text-align: left;
}

.auth-account-badge-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #7b869e;
    line-height: 1.2;
    margin-bottom: 2px;
}

.auth-account-badge-email {
    font-size: 13.5px;
    font-weight: 700;
    color: #16213e;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Alerts & Promo Banner */
.auth-alert {
    border-radius: 14px;
    padding: 11px 16px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 18px;
    text-align: left;
}

.auth-alert-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.auth-alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.auth-promo-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 14px;
    background: var(--theme-surface-pale, #f3f5ff);
    border: 1px dashed var(--theme-primary, #6257e8);
    color: #16213e;
    font-size: 12.5px;
    line-height: 1.45;
    margin-bottom: 16px;
    text-align: left;
}

.auth-promo-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--theme-primary, #6257e8);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Remember & Forgot row */
.auth-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin: 2px 6px 20px;
    font-size: 12.5px;
}

.auth-remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #475569;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
}

.auth-remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--theme-primary, #6257e8);
    cursor: pointer;
    margin: 0;
}

.auth-forgot-link {
    color: #475569;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.18s ease;
}

.auth-forgot-link:hover,
.auth-forgot-link:focus {
    color: var(--theme-primary, #6257e8);
    text-decoration: underline;
}

/* Submit pill gradient button - higher specificity than theme-head.blade.php button[type="submit"] */
#auth-shell .auth-card .auth-form button[type="submit"].auth-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 220px;
    height: 46px;
    margin: 8px auto 0;
    padding: 0 26px;
    border: 0 !important;
    border-color: transparent !important;
    border-radius: 999px;
    background-color: var(--theme-primary, #6257e8) !important;
    background-image: linear-gradient(110deg, var(--theme-primary, #6257e8) 0%, var(--theme-primary-dark, #4437c7) 100%) !important;
    color: #ffffff !important;
    font-family: 'Manrope', Arial, sans-serif;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(22, 33, 62, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

#auth-shell .auth-card .auth-form button[type="submit"].auth-submit-btn:hover,
#auth-shell .auth-card .auth-form button[type="submit"].auth-submit-btn:focus {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(22, 33, 62, 0.24);
    filter: brightness(1.04);
    outline: none;
}

#auth-shell .auth-card .auth-form button[type="submit"].auth-submit-btn:active {
    transform: translateY(0);
}

.auth-switch-text {
    margin: 20px 0 0;
    text-align: center;
    font-size: 13px;
    color: #64748b;
}

.auth-switch-text a {
    color: var(--theme-primary, #6257e8);
    font-weight: 700;
    text-decoration: none;
    margin-left: 4px;
    transition: color 0.18s ease;
}

.auth-switch-text a:hover,
.auth-switch-text a:focus {
    color: var(--theme-primary-dark, #4437c7);
    text-decoration: underline;
}

/* Tablet */
@media (max-width: 991.98px) {
    .auth-stage {
        padding: 34px 0 44px;
    }

    .auth-aside {
        padding: 40px 44px 32px 28px;
    }

    .auth-main-panel {
        padding: 42px 36px 38px 40px;
    }

    .auth-aside-title {
        font-size: 25px;
    }

    .auth-form-title {
        font-size: 27px;
    }
}

/* Mobile (<= 767.98px) */
@media (max-width: 767.98px) {
    .auth-stage {
        padding: 22px 0 34px;
    }

    .auth-card {
        grid-template-columns: 1fr;
        min-height: auto;
        max-width: 460px;
        border-radius: 22px;
    }

    .auth-desktop-wave {
        display: none;
    }

    .auth-aside {
        background: linear-gradient(155deg, var(--theme-primary, #6257e8) 0%, var(--theme-primary-dark, #4437c7) 100%);
        padding: 30px 20px 62px;
        overflow: hidden;
    }

    .auth-aside::before,
    .auth-aside::after {
        content: "";
        position: absolute;
        border-radius: 50%;
        pointer-events: none;
    }

    .auth-aside::before {
        width: 240px;
        height: 240px;
        top: -90px;
        right: -70px;
        background: rgba(255, 255, 255, 0.08);
    }

    .auth-aside::after {
        width: 220px;
        height: 220px;
        bottom: -70px;
        left: -60px;
        background: rgba(0, 0, 0, 0.1);
    }

    .auth-logo-badge {
        width: 64px;
        height: 64px;
        padding: 11px;
        margin-bottom: 10px;
    }

    .auth-site-name {
        font-size: 15px;
        margin-bottom: 10px;
    }

    .auth-aside-title {
        font-size: 22px;
        margin-bottom: 6px;
    }

    .auth-aside-desc {
        font-size: 13px;
        margin-bottom: 0;
        max-width: 270px;
    }

    .auth-aside-cta,
    .auth-aside-links {
        display: none;
    }

    .auth-mobile-wave {
        display: block;
        position: absolute;
        left: 0;
        right: 0;
        bottom: -1px;
        width: 100%;
        height: 48px;
        pointer-events: none;
        z-index: 2;
    }

    .auth-main-panel {
        padding: 20px 22px 44px;
    }

    .auth-form-header {
        margin-bottom: 20px;
    }

    .auth-form-title {
        font-size: 25px;
    }

    .auth-mobile-corner {
        display: block;
        position: absolute;
        left: 0;
        bottom: 0;
        width: 76px;
        height: 76px;
        pointer-events: none;
        z-index: 1;
    }
}

/* Extra narrow phones (320px / 375px) */
@media (max-width: 374.98px) {
    .auth-stage .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .auth-card {
        border-radius: 18px;
    }

    .auth-aside {
        padding: 26px 16px 54px;
    }

    .auth-main-panel {
        padding: 18px 16px 38px;
    }

    .auth-input {
        height: 44px;
        font-size: 13.5px;
        padding: 10px 16px 10px 42px;
    }

    .auth-input-icon {
        left: 15px;
        width: 16px;
        height: 16px;
    }

    #auth-shell .auth-card .auth-form button[type="submit"].auth-submit-btn {
        max-width: 100%;
        height: 44px;
        font-size: 12.5px;
    }

    .auth-aside-title {
        font-size: 20px;
    }

    .auth-form-title {
        font-size: 23px;
    }

    .auth-mobile-corner {
        width: 58px;
        height: 58px;
    }

    .auth-account-badge {
        padding: 8px 12px;
        gap: 10px;
    }

    .auth-account-badge-icon {
        width: 32px;
        height: 32px;
    }

    .auth-account-badge-icon svg {
        width: 16px;
        height: 16px;
    }

    .auth-account-badge-email {
        font-size: 12.5px;
    }

    .auth-input-wrap.has-toggle .auth-input {
        padding-right: 42px;
    }

    .auth-input-toggle {
        right: 10px;
        width: 28px;
        height: 28px;
    }

    .auth-input-toggle svg {
        width: 16px;
        height: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-aside-cta,
    .auth-input,
    .auth-input-toggle,
    #auth-shell .auth-card .auth-form button[type="submit"].auth-submit-btn {
        transition: none;
    }
}
