@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
html,
body {
    margin: 0;
    height: 100%;
    font-family: 'Inter', 'Poppins', sans-serif;
    background: #112c5e;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: radial-gradient(circle at 10% 10%, #dbe8fb 0%, #edf3fb 42%, #f7f9fc 100%);
}

.auth-container {
    width: min(1180px, 100%);
    min-height: 680px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #ffffff;
    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);
}

.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;
    align-items: center;
}

.decor-circle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.circle-top {
    width: 330px;
    height: 330px;
    top: -170px;
    right: -120px;
    background: rgba(255, 255, 255, 0.055);
}

.circle-bottom {
    width: 260px;
    height: 260px;
    bottom: -170px;
    left: -140px;
    background: rgba(255, 255, 255, 0.045);
}

.peso-logo {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.peso-logo img {
    width: 90px;
    height: 90px;
    object-fit: contain;
}

.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: 500px;
    font-size: clamp(34px, 3.1vw, 46px);
    line-height: 0.99;
    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;
}

.form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
}

.form-wrapper {
    width: 100%;
    max-width: 560px;
    padding: 50px 56px;
}

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

.form-eyebrow {
    display: block;
    color: #123b91;
    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: #70819a;
    font-size: 13px;
    line-height: 1.5;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 17px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.input-group label {
    color: #213653;
    font-size: 12px;
    font-weight: 700;
}

.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 45px 0 43px;
    border: 1px solid #d9e2ef;
    border-radius: 11px;
    background: #f9fbfd;
    color: #172942;
    font-size: 13px;
    outline: none;
}

/* Password toggle (eye) button inside input wrapper */
.password-toggle {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    width: 34px;
    border-radius: 6px;
    color: #64748b;
    font-size: 14px;
}

.password-toggle:focus{
    outline: none;
    box-shadow: 0 0 0 3px rgba(18, 59, 145, 0.08);
}

.password-toggle i{
    pointer-events: none;
}

.input-wrapper input:focus {
    border-color: #123b91;
    box-shadow: 0 0 0 3px rgba(18, 59, 145, 0.08);
}

.primary-btn {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 11px;
    background: #123b91;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.primary-btn:hover {
    background: #0b2c70;
}

.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 {
    color: #123b91;
    text-decoration: none;
    font-weight: 800;
}

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

.alert {
    padding: 10px;
    margin-bottom: 18px;
    border-radius: 6px;
    font-size: 14px;
}

.alert.success {
    background: #d1fae5;
    color: #065f46;
}

.alert.danger {
    background: #fee2e2;
    color: #991b1b;
}

@media (max-width: 900px) {
    .auth-container {
        grid-template-columns: 1fr;
        min-height: 0;
    }

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

/* Password reset feedback: explicit layout and visibility */
.reset-password-hint {font-size:12px;line-height:1.5;color:#64748b;margin:-5px 0 14px;}
.reset-client-alert[hidden] {display:none !important;}
.reset-client-alert {margin:0 0 14px;}
.form-wrapper .flash-messages-container {width:100%;margin-bottom:18px;}
.form-wrapper .flash-messages-container .alert {display:flex;gap:10px;align-items:flex-start;padding:12px 14px;border-radius:9px;font-size:13px;line-height:1.5;}
.form-wrapper .flash-messages-container .alert-danger {background:#fef2f2;border:1px solid #fecaca;color:#991b1b;}
.form-wrapper .flash-messages-container .alert-success {background:#ecfdf5;border:1px solid #a7f3d0;color:#065f46;}
.form-wrapper .flash-messages-container .alert-warning {background:#fffbeb;border:1px solid #fde68a;color:#92400e;}
.form-wrapper .flash-messages-container .alert-info {background:#eff6ff;border:1px solid #bfdbfe;color:#1e40af;}
