/*
 * Keep the standard Frappe password-reset form and its security checks intact.
 * Its inline .container { height: 100vh } also matches the site's header.
 * Override layout only on this route; never affect login, Desk or web forms.
 */
body[data-path="update-password"] {
    display: block;
    width: 100%;
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
    background: var(--bg-color, #f4f7fb);
}

/* The reset template omits navbar/footer, but the custom header is separate. */
body[data-path="update-password"] > .header-top {
    display: none !important;
}

body[data-path="update-password"] #page-update-password {
    width: 100%;
    min-width: 0;
}

body[data-path="update-password"] #page-update-password .container {
    width: 100%;
    max-width: none !important;
    height: auto;
    min-width: 0;
    margin: 0;
}

body[data-path="update-password"] #page-update-password main.container {
    display: grid;
    place-items: center;
    min-height: 100vh;
    min-height: 100svh;
    padding: 32px 20px 88px;
    box-sizing: border-box;
}

body[data-path="update-password"] #page-update-password .page_content {
    width: 100%;
    min-width: 0;
    padding: 0;
}

body[data-path="update-password"] .portal-container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 32px;
    box-sizing: border-box;
    background: var(--fg-color, #fff);
    border: 1px solid var(--border-color, #dce3ee);
    border-top: 4px solid #1f69b3;
    border-radius: 18px;
    box-shadow: 0 10px 32px rgba(24, 54, 89, 0.08);
}

body[data-path="update-password"] .portal-section.head {
    padding: 0 0 20px;
    text-align: center;
}

body[data-path="update-password"] .portal-section.head .title {
    color: var(--heading-color, #243b53);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

body[data-path="update-password"] #reset-password .form-group {
    margin-bottom: 16px;
}

body[data-path="update-password"] #reset-password .form-control {
    width: 100%;
    height: auto;
    min-height: 48px;
    margin-bottom: 0 !important;
    padding: 12px 14px;
    font-size: 16px;
    line-height: 1.5;
    border: 1px solid var(--border-color, #dce3ee);
    border-radius: 10px;
    box-sizing: border-box;
}

body[data-path="update-password"] #reset-password .password-field input {
    padding-inline-start: 36px;
    padding-inline-end: 64px;
}

body[data-path="update-password"] #reset-password .field-icon {
    left: auto;
    right: auto;
    inset-inline-start: 12px;
    top: 16px;
    fill: var(--text-muted, #617185);
    pointer-events: none;
}

body[data-path="update-password"] #reset-password .toggle-password {
    left: auto;
    right: auto;
    inset-inline-end: 10px;
    top: 0;
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    color: var(--text-color, #344a64) !important;
}

body[data-path="update-password"] #reset-password .text-muted {
    color: var(--text-muted, #617185) !important;
}

body[data-path="update-password"] #reset-password .password-strength-message {
    margin-top: 8px;
    line-height: 1.7;
}

body[data-path="update-password"] #reset-password .form-control:focus-visible {
    outline: 2px solid #1f69b3;
    outline-offset: 2px;
}

body[data-path="update-password"] #update {
    width: 100%;
    min-height: 48px;
    margin-top: 12px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
}

@media (max-width: 480px) {
    body[data-path="update-password"] #page-update-password main.container {
        padding: 24px 16px 88px;
    }

    body[data-path="update-password"] .portal-container {
        padding: 24px 20px;
    }

    body[data-path="update-password"] .portal-section.head .title {
        font-size: 22px;
    }
}
