@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
/* =========================================================
   RESET
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/* =========================================================
   ROOT
========================================================= */

:root {
    --peso-blue: #123b91;
    --peso-dark-blue: #0b2c70;
    --peso-mid-blue: #1c4ba3;
    --peso-light-blue: #dce8ff;

    --text-dark: #10213f;
    --text-muted: #70819a;

    --border: #d9e2ef;
    --background: #edf3fb;

    --white: #ffffff;
}


/* =========================================================
   BODY
========================================================= */

body {
    font-family: 'Inter', 'Poppins', sans-serif;

    background:
        radial-gradient(
            circle at 10% 10%,
            #dbe8fb 0%,
            #edf3fb 42%,
            #f7f9fc 100%
        );

    color: var(--text-dark);

    min-height: 100vh;
}


/* =========================================================
   AUTH PAGE
========================================================= */

.auth-page {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 30px;
}


/* =========================================================
   MAIN AUTH CONTAINER
========================================================= */

.auth-container {
    width: min(1180px, 100%);

    min-height: 680px;

    display: grid;

    grid-template-columns: 56% 44%;

    background: var(--white);

    border-radius: 30px;

    overflow: hidden;

    box-shadow:
        0 25px 70px rgba(24, 55, 105, 0.12);

    border: 1px solid rgba(255, 255, 255, 0.8);
}


/* =========================================================
   LEFT / BRANDING PANEL
========================================================= */

.branding-panel {
    position: relative;
    overflow: hidden;

    background:
        linear-gradient(
            145deg,
            #123b91 0%,
            #17469f 55%,
            #2256ad 100%
        );

    color: #ffffff;

    padding: 38px 48px;

    display: flex;
    flex-direction: column;

    min-width: 0;

    align-items: center;
}

/* =========================================================
   DECORATIVE CIRCLES
========================================================= */

.decor-circle {
    position: absolute;

    border-radius: 50%;

    pointer-events: none;
}


/* Top circle */

.circle-top {
    width: 330px;
    height: 330px;

    top: -170px;
    right: -120px;

    background: rgba(255, 255, 255, 0.055);
}


/* Bottom circle */

.circle-bottom {
    width: 260px;
    height: 260px;

    bottom: -170px;
    left: -140px;

    background: rgba(255, 255, 255, 0.045);
}


/* =========================================================
   LOGO
========================================================= */

.peso-logo {
    position: relative;

    z-index: 2;

    display: flex;
    justify-content: center;

    margin-bottom: 30px;
}


.peso-logo img {
    width: 90px;
    height: 90px;
    display: block;
    object-fit: contain;
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}


/* =========================================================
   BRANDING CONTENT
========================================================= */

.branding-content {
    position: relative;
    z-index: 2;
    width: 100%;
    text-align: center;
    margin-top: 36px;
}

.organization-name {
    display: block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.3px;
    color: #ffffff;
    margin-bottom: 24px;
    position: relative;
    top: -50px;
}

.branding-content h1 {
    max-width: 480px;
    font-size: clamp(34px, 3.1vw, 46px);
    line-height: 0.98;
    letter-spacing: -1.6px;
    font-weight: 900;
    margin: 0 auto 20px;
}


.branding-content p {
    max-width: 450px;
    font-size: 13px;
    line-height: 1.65;
    color: #dce8ff;
    margin: 0 auto;
}


/* =========================================================
   FEATURE CARD
========================================================= */

.feature-card {
    position: relative;
    z-index: 2;
    margin-top: auto;
    width: 100%;
    max-width: 420px;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

.feature-icon {
    width: 42px;
    height: 42px;

    flex-shrink: 0;

    border-radius: 11px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(255, 255, 255, 0.15);

    font-size: 16px;
}


.feature-card strong {
    display: block;

    font-size: 13px;

    margin-bottom: 3px;
}


.feature-card span {
    display: block;

    font-size: 10px;

    color: #d9e6ff;
}


/* =========================================================
   RIGHT FORM PANEL
========================================================= */

.form-panel {
    min-width: 0;

    background: #ffffff;

    display: flex;

    align-items: center;

    justify-content: center;
}


/* =========================================================
   FORM WRAPPER
========================================================= */

.form-wrapper {
    width: 100%;

    max-width: 560px;

    padding: 50px 56px;
}


/* =========================================================
   FORM HEADER
========================================================= */

.form-header {
    margin-bottom: 28px;
}


.form-eyebrow {
    display: block;

    color: var(--peso-blue);

    font-size: 12px;

    font-weight: 900;

    letter-spacing: 1.6px;

    margin-bottom: 11px;
}


.form-header h2 {
    color: #101e36;

    font-size: clamp(29px, 3vw, 38px);

    line-height: 1.1;

    letter-spacing: -1.2px;

    margin-bottom: 8px;
}


.form-header p {
    color: var(--text-muted);

    font-size: 13px;

    line-height: 1.5;
}


/* =========================================================
   FORM
========================================================= */

.auth-form {
    display: flex;

    flex-direction: column;

    gap: 17px;
}


.hidden {
    display: none;
}


/* =========================================================
   TWO COLUMN INPUTS
========================================================= */

.form-grid {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 14px;
}


/* =========================================================
   INPUT GROUP
========================================================= */

.input-group {
    display: flex;

    flex-direction: column;

    gap: 7px;
}


.input-group label {
    color: #213653;

    font-size: 12px;

    font-weight: 700;
}


.label-row {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 10px;
}


/* =========================================================
   FORGOT PASSWORD
========================================================= */

.forgot-link {
    color: var(--peso-blue);

    text-decoration: none;

    font-size: 11px;

    font-weight: 700;
}


.forgot-link:hover {
    text-decoration: underline;
}


/* =========================================================
   INPUT
========================================================= */

.input-wrapper {
    position: relative;

    display: flex;

    align-items: center;
}


.input-wrapper > i {
    position: absolute;

    left: 15px;

    color: #91a6c3;

    font-size: 14px;

    pointer-events: none;

    z-index: 2;
}


.input-wrapper input {
    width: 100%;

    height: 50px;

    padding: 0 43px;

    border: 1px solid var(--border);

    border-radius: 11px;

    background: #f9fbfd;

    color: #172942;

    font-family: inherit;

    font-size: 13px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}


.input-wrapper input::placeholder {
    color: #9aacbf;
}


.input-wrapper input:focus {
    background: #ffffff;

    border-color: var(--peso-blue);

    box-shadow:
        0 0 0 3px rgba(18, 59, 145, 0.08);
}


/* =========================================================
   PASSWORD TOGGLE
========================================================= */

.password-toggle {
    position: absolute;

    right: 11px;

    top: 50%;

    transform: translateY(-50%);

    border: none;

    background: transparent;

    color: #8da0ba;

    cursor: pointer;

    padding: 6px;

    z-index: 3;
}


.password-toggle:hover {
    color: var(--peso-blue);
}


/* =========================================================
   REMEMBER ME
========================================================= */

.remember-row {
    display: flex;

    align-items: center;

    gap: 8px;

    color: #6c7e97;

    font-size: 11px;

    cursor: pointer;
}


.remember-row input {
    width: 17px;
    height: 17px;

    accent-color: var(--peso-blue);

    cursor: pointer;
}


/* =========================================================
   PRIMARY BUTTON
========================================================= */

.primary-btn {
    width: 100%;

    height: 50px;

    border: none;

    border-radius: 11px;

    background: var(--peso-blue);

    color: #ffffff;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 10px;

    font-family: inherit;

    font-size: 13px;

    font-weight: 800;

    cursor: pointer;

    box-shadow:
        0 9px 20px rgba(18, 59, 145, 0.18);

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


.primary-btn:hover {
    background: #0d317c;

    transform: translateY(-1px);

    box-shadow:
        0 12px 25px rgba(18, 59, 145, 0.23);
}


.primary-btn:active {
    transform: translateY(0);
}


.primary-btn i {
    font-size: 12px;
}


/* =========================================================
   SWITCH ACCOUNT
========================================================= */

.switch-account {
    display: flex;

    justify-content: center;

    align-items: center;

    gap: 5px;

    margin-top: 2px;

    color: #7b8ba2;

    font-size: 11px;

    text-align: center;
}


.switch-account a,
.switch-account button {
    border: none;

    background: transparent;

    color: var(--peso-blue);

    font-family: inherit;

    font-size: 11px;

    font-weight: 800;

    cursor: pointer;
}


.switch-account a:hover,
.switch-account button:hover {
    text-decoration: underline;
}


.register-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    background: #f8fbff;
    border: 1px solid #e1e8f8;
    border-radius: 22px;
    padding: 24px;
}

.register-option {
    display: flex;
    align-items: center;
    gap: 18px;
    text-decoration: none;
    padding: 18px;
    border: 1px solid #dfe6f1;
    border-radius: 18px;
    transition: 0.25s;
    color: #172942;
    background: #ffffff;
}

.register-option:hover {
    border-color: #1f3c88;
    transform: translateY(-2px);
}

.register-option i {
    font-size: 30px;
    color: #1f3c88;
}

.register-option h3 {
    margin-bottom: 5px;
}

.register-option p {
    color: #6b7e96;
    font-size: 14px;
    margin: 0;
}

.form-instruction {
    color: #6b7e96;
    font-size: 13px;
    margin: 0 0 20px;
}


/* =========================================================
   REGISTRATION FORM
========================================================= */

#registerForm {
    gap: 13px;
}


#registerForm .form-header {
    margin-bottom: 22px;
}


#registerForm .primary-btn {
    margin-top: 2px;
}

/* Flash Messages Container */
.flash-messages-container {
    width: 100%;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Base Alert Styling */
.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    animation: fadeInSlide 0.3s ease-in-out;
}

.alert i {
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Category Variations */
.alert-success, .alert-message {
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

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

.alert-warning {
    background-color: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background-color: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* Smooth Entrance Animation */
@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================================
   LARGE DESKTOP
========================================================= */

@media (min-width: 1200px) {

    .auth-container {
        min-height: 700px;
    }

    .branding-panel {
        padding: 55px;
    }

    .form-wrapper {
        padding: 55px 60px;
    }
}


/* =========================================================
   LAPTOP / TABLET
========================================================= */

@media (max-width: 1050px) {

    .auth-page {
        padding: 20px;
    }


    .auth-container {
        width: 100%;

        min-height: 640px;
    }


    .branding-panel {
        padding: 40px;
    }


    .form-wrapper {
        padding: 40px;
    }


    .branding-content h1 {
        font-size: 42px;

        letter-spacing: -1.5px;
    }
}


/* =========================================================
   SMALL TABLET
========================================================= */

@media (max-width: 850px) {

    .auth-page {
        padding: 16px;
    }


    .auth-container {
        min-height: 600px;

        grid-template-columns: 48% 52%;

        border-radius: 24px;
    }


    .branding-panel {
        padding: 34px 28px;
    }


    .form-wrapper {
        padding: 34px 30px;
    }


    .peso-logo img {
        width: 78px;
        height: 78px;
    }


    .branding-content h1 {
        font-size: 36px;

        line-height: 1;

        letter-spacing: -1.2px;
    }


    .organization-name {
        font-size: 10px;

        letter-spacing: 1.1px;
    }


    .branding-content p {
        font-size: 12px;
    }


    .feature-card {
        padding: 11px 12px;
    }


    .feature-card strong {
        font-size: 11px;
    }


    .feature-card span {
        font-size: 9px;
    }


    .form-header h2 {
        font-size: 30px;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

    body {
        background: #edf3fb;
    }


    .auth-page {
        min-height: 100vh;

        padding: 12px;
    }


    .auth-container {
        width: 100%;

        min-height: 0;

        display: flex;

        flex-direction: column;

        border-radius: 20px;
    }


    /* =====================================================
       BRANDING
    ===================================================== */

    .branding-panel {
        width: 100%;

        min-height: 270px;

        padding: 28px 24px;

        text-align: center;

        align-items: center;
    }


    .peso-logo {
        margin-bottom: 14px;
    }


    .peso-logo img {
        width: 72px;
        height: 72px;
    }


    .organization-name {
        font-size: 9px;

        letter-spacing: 1px;

        margin-bottom: 11px;
    }


    .branding-content {
        width: 100%;
    }


    .branding-content h1 {
        max-width: 450px;

        margin: 0 auto 10px;

        font-size: 28px;

        line-height: 1.05;

        letter-spacing: -0.8px;
    }


    .branding-content p {
        max-width: 450px;

        margin: 0 auto;

        font-size: 11px;

        line-height: 1.5;
    }


    .feature-card {
        display: none;
    }


    /* =====================================================
       FORM
    ===================================================== */

    .form-panel {
        width: 100%;

        display: block;
    }


    .form-wrapper {
        width: 100%;

        max-width: none;

        padding: 30px 24px 34px;
    }


    .form-header {
        margin-bottom: 22px;
    }


    .form-eyebrow {
        font-size: 10px;
    }


    .form-header h2 {
        font-size: 26px;

        letter-spacing: -0.8px;
    }


    .form-header p {
        font-size: 12px;
    }


    .form-grid {
        grid-template-columns: 1fr;

        gap: 13px;
    }


    .auth-form {
        gap: 14px;
    }


    .input-wrapper input {
        height: 48px;
    }
}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 420px) {

    .auth-page {
        padding: 8px;
    }


    .auth-container {
        border-radius: 17px;
    }


    .branding-panel {
        min-height: 245px;

        padding: 24px 18px;
    }


    .peso-logo img {
        width: 66px;
        height: 66px;
    }


    .branding-content h1 {
        font-size: 25px;
    }


    .form-wrapper {
        padding: 26px 18px 30px;
    }


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


    .form-header h2 {
        font-size: 24px;
    }


    .form-header p {
        font-size: 11px;
    }


    .input-group label {
        font-size: 11px;
    }


    .input-wrapper input {
        height: 46px;

        font-size: 12px;
    }


    .primary-btn {
        height: 47px;
    }


    .switch-account {
        flex-wrap: wrap;
    }
}


/* =========================================================
   VERY SMALL DEVICES
========================================================= */

@media (max-width: 340px) {

    .branding-panel {
        padding: 22px 15px;

        min-height: 225px;
    }


    .branding-content h1 {
        font-size: 23px;
    }


    .form-wrapper {
        padding: 24px 15px 28px;
    }


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


    .form-header h2 {
        font-size: 22px;
    }
}

/* =========================================================
   AUTH SECONDARY / MFA ACTIONS
========================================================= */
.secondary-btn {
    width: 100%;
    height: 50px;
    border: 1px solid var(--peso-blue);
    border-radius: 11px;
    background: #ffffff;
    color: var(--peso-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}
.secondary-btn:hover { background: #f3f7ff; border-color: var(--peso-dark-blue); color: var(--peso-dark-blue); transform: translateY(-1px); }
.secondary-btn:active { transform: translateY(0); }
.secondary-btn:focus-visible, .verification-cancel:focus-visible, .forgot-link:focus-visible { outline: 3px solid rgba(18,59,145,.12); outline-offset: 2px; }
.verification-actions { margin-top: 12px; }
.verification-cancel-wrap { margin-top: 13px; text-align: center; }
.verification-cancel { border: 0; background: transparent; color: var(--peso-blue); font-family: inherit; font-size: 11px; font-weight: 800; cursor: pointer; padding: 7px 10px; border-radius: 7px; }
.verification-cancel:hover { text-decoration: underline; }
.form-note { display: flex; align-items: flex-start; gap: 7px; margin-top: 8px; line-height: 1.45; }
.form-note i { margin-top: 3px; flex: 0 0 auto; }

/* Forgot password belongs below the password field, not beside its label.
   Use .forgot-password-row directly after the password .input-wrapper. */
.forgot-password-row { display: flex; justify-content: flex-end; margin-top: 2px; }
.forgot-password-row .forgot-link { display: inline-flex; align-items: center; padding: 2px 0; }

@media (max-width: 700px) {
    .secondary-btn { height: 48px; }
    .verification-actions { margin-top: 10px; }
}

/* =========================================================
   OTP VERIFICATION INPUT
========================================================= */

.otp-group {
    gap: 9px;
}

.otp-inputs {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 9px;
    width: 100%;
}

.otp-box {
    width: 100%;
    min-width: 0;
    height: 56px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: #f9fbfd;
    color: #172942;
    font-family: inherit;
    font-size: 21px;
    font-weight: 800;
    text-align: center;
    caret-color: var(--peso-blue);
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.otp-box:hover {
    border-color: #b9c9dd;
}

.otp-box:focus {
    background: #ffffff;
    border-color: var(--peso-blue);
    box-shadow: 0 0 0 3px rgba(18, 59, 145, 0.09);
    transform: translateY(-1px);
}

.otp-box-error {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.07);
}

.otp-hidden-code {
    display: none !important;
}

.auth-form .primary-btn {
    margin-top: 4px;
}

@media (max-width: 420px) {
    .otp-inputs {
        gap: 6px;
    }

    .otp-box {
        height: 50px;
        border-radius: 9px;
        font-size: 18px;
    }
}

@media (max-width: 340px) {
    .otp-inputs {
        gap: 4px;
    }

    .otp-box {
        height: 46px;
        font-size: 17px;
    }
}


/* =========================================================
   CROSS-BROWSER / RESPONSIVE SAFETY BASELINE
========================================================= */
html,
body.auth-app {
    max-width: 100%;
    overflow-x: hidden;
}

.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
}

.auth-container,
.branding-panel,
.form-panel,
.form-wrapper,
.auth-form,
.input-group,
.input-wrapper {
    min-width: 0;
}

.auth-form input,
.auth-form select,
.auth-form textarea,
.auth-form button {
    max-width: 100%;
    box-sizing: border-box;
}

.flash-messages-container,
.alert,
.alert span,
.form-header,
.form-header p,
.switch-account {
    overflow-wrap: anywhere;
    word-break: break-word;
}

@media (max-height: 760px) and (min-width: 701px) {
    .auth-page {
        align-items: flex-start;
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .auth-container {
        min-height: 0;
    }

    .form-panel {
        align-items: flex-start;
    }
}

@media (max-width: 700px) {
    .auth-page {
        min-height: 100vh;
        min-height: 100dvh;
    }

    .form-control,
    .auth-form input,
    .auth-form select,
    .auth-form textarea {
        font-size: 16px;
    }

    .form-wrapper {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 360px) {
    .otp-inputs {
        gap: 3px;
    }

    .otp-box {
        height: 44px;
        font-size: 16px;
    }
}
