html {
    font-size: 16px;
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    background: radial-gradient(circle at top, #ffffff 0, #f6f8fb 40%, #edf1f6 100%);
    color: #243247;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Header */

.app-header {
    height: 72px;
    background: linear-gradient(135deg, #1e2b3d, #293b53);
    color: #fff;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(20, 32, 50, 0.12);
}

.app-header-content {
    width: min(1420px, calc(100% - 48px));
    margin: 0 auto;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.app-brand-logo {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: block;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

/* Main */

.app-main {
    width: 100%;
    padding: 48px 24px 32px;
}

.password-reset-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

.password-reset-card {
    width: min(1020px, 100%);
    padding: 40px 44px 36px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(219, 225, 233, 0.9);
    border-radius: 12px;
    box-shadow: 0 18px 50px rgba(43, 56, 76, 0.08), 0 3px 10px rgba(43, 56, 76, 0.04);
}

/* Intro */

.intro-section {
    display: flex;
    align-items: flex-start;
    gap: 28px;
}

.intro-icon {
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e66d00;
    background: #fff5ec;
    border: 1px solid #f4e3d4;
}

.intro-section h1 {
    margin: 3px 0 10px;
    font-size: 1.6rem;
    line-height: 1.2;
    font-weight: 700;
    color: #17263b;
}

.intro-section p {
    margin: 0;
    line-height: 1.65;
    color: #506077;
}

.intro-section a {
    color: #e66d00;
    font-weight: 600;
    text-decoration: none;
}

    .intro-section a:hover {
        text-decoration: underline;
    }

/* Sections */

.section-separator {
    height: 1px;
    margin: 34px 0;
    background: #e5e9ef;
}

.reset-step {
    display: flex;
    gap: 28px;
}

.step-number {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #3558ff, #536dfe);
    font-weight: 700;
    box-shadow: 0 5px 15px rgba(66, 91, 255, 0.2);
}

.step-content {
    width: 100%;
}

    .step-content h2 {
        margin: 2px 0 12px;
        font-size: 1.1rem;
        font-weight: 700;
        color: #17263b;
    }

    .step-content p {
        margin: 0 0 26px;
        color: #506077;
        line-height: 1.65;
    }

/* Login */

.login-control {
    width: 100%;
    display: flex;
    align-items: stretch;
    border: 1px solid #d4dbe5;
    border-radius: 7px;
    background: #fff;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

    .login-control:focus-within {
        border-color: #627aff;
        box-shadow: 0 0 0 4px rgba(81, 105, 255, 0.10);
    }

.login-icon {
    width: 58px;
    min-width: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #69788d;
    border-right: 1px solid #e0e5ec;
}

.login-input {
    height: 58px;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-size: 1rem;
    padding: 0 20px;
}

    .login-input::placeholder {
        color: #8d98a8;
    }

.validation-message {
    display: block;
    margin-top: 8px;
}

/* reCAPTCHA */

.recaptcha-container {
    display: inline-flex;
    min-height: 78px;
    align-items: center;
}

/* Alerts */

.reset-alert {
    border-radius: 7px;
    margin-bottom: 28px;
}

/* Primary button */

.reset-button {
    width: 100%;
    min-height: 58px;
    margin-top: 38px;
    border: 0;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #fff;
    background: linear-gradient(135deg, #e86f00, #f58400);
    font-size: 1rem;
    font-weight: 700;
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

    .reset-button:hover {
        filter: brightness(1.03);
        box-shadow: 0 8px 22px rgba(232, 111, 0, 0.22);
        transform: translateY(-1px);
    }

    .reset-button:active {
        transform: translateY(0);
        box-shadow: none;
    }

/* Password change page */

.password-change-card {
    max-width: 900px;
}

.password-icon {
    color: #e66d00;
}

.password-requirements {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 24px;
    padding: 18px 20px;
    margin-bottom: 26px;
    background: #f7f9fc;
    border: 1px solid #e3e8ef;
    border-radius: 8px;
}

.requirement-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #526176;
    font-size: 0.94rem;
}

.requirement-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: #536dfe;
}

.password-field {
    width: 100%;
}

    .password-field .form-label {
        margin-bottom: 8px;
        color: #35455c;
        font-weight: 600;
    }

.password-input {
    min-height: 56px;
    border: 1px solid #d4dbe5;
    border-radius: 7px;
    padding: 0 18px;
    box-shadow: none;
}

    .password-input:focus {
        border-color: #627aff;
        box-shadow: 0 0 0 4px rgba(81, 105, 255, 0.10);
    }

/* Result states */

.result-state {
    padding: 42px 20px;
    text-align: center;
}

.result-icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.success-icon {
    color: #27864b;
    background: #eaf8ef;
    border: 1px solid #ccebd7;
}

.warning-icon {
    color: #c47700;
    background: #fff6e4;
    border: 1px solid #f1ddae;
}

.error-icon {
    color: #b53b3b;
    background: #fff0f0;
    border: 1px solid #f1cccc;
}

.result-state h1 {
    margin-bottom: 12px;
    color: #17263b;
    font-size: 1.6rem;
    font-weight: 700;
}

.result-state p {
    max-width: 600px;
    margin: 0 auto 28px;
    color: #5c6a7e;
    line-height: 1.65;
}

.secondary-action {
    min-height: 48px;
    padding: 0 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d5dce6;
    border-radius: 7px;
    background: #fff;
    color: #35455c;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

    .secondary-action:hover {
        background: #f7f9fc;
        border-color: #bec8d5;
        color: #243247;
    }

/* Footer */

.app-footer {
    min-height: 70px;
    padding: 16px 24px 28px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    color: #69778a;
    font-size: 0.9rem;
}

.footer-separator {
    color: #b0b8c3;
}

.footer-newrest {
    color: #e66d00;
}

/* Responsive */

@media (max-width: 768px) {
    .app-header {
        height: 64px;
    }

    .app-header-content {
        width: calc(100% - 32px);
    }

    .app-brand {
        font-size: 1rem;
    }

    .app-main {
        padding: 24px 14px;
    }

    .password-reset-card {
        padding: 28px 22px;
    }

    .intro-section {
        gap: 18px;
    }

    .intro-icon {
        width: 54px;
        height: 54px;
        flex-basis: 54px;
    }

    .intro-section h1 {
        font-size: 1.35rem;
    }

    .reset-step {
        gap: 16px;
    }

    .step-number {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
    }

    .section-separator {
        margin: 28px 0;
    }

    .login-input {
        height: 54px;
    }

    .reset-button {
        margin-top: 30px;
    }

    .password-requirements {
        grid-template-columns: 1fr;
    }
}

/* Interactive password policy */

.password-policy {
    margin-bottom: 28px;
    border: 1px solid #e3e8ef;
    border-radius: 9px;
    background: #f8fafc;
    overflow: hidden;
}

.policy-header {
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #e3e8ef;
    color: #35455c;
    font-size: 0.92rem;
    font-weight: 600;
}

.policy-count {
    padding: 4px 9px;
    border-radius: 20px;
    background: #e8ecf2;
    color: #657389;
    font-size: 0.78rem;
    transition: color 0.15s ease, background 0.15s ease;
}

.policy-count-valid {
    background: #e7f7ed;
    color: #27864b;
}

.password-requirements {
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.requirement-item {
    transition: color 0.15s ease;
}

.requirement-status {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e4e8ee;
    color: #9aa5b3;
    font-size: 0.72rem;
    font-weight: 700;
    transition: background 0.15s ease, color 0.15s ease;
}

.requirement-valid {
    color: #27864b;
}

    .requirement-valid .requirement-status {
        background: #dff3e7;
        color: #27864b;
    }

.password-input-wrapper {
    position: relative;
    width: 100%;
}

    .password-input-wrapper .password-input {
        padding-right: 82px;
    }

.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    min-width: 58px;
    height: 36px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #56657a;
    font-size: 0.85rem;
    font-weight: 600;
}

    .password-toggle:hover {
        background: #f0f3f7;
        color: #243247;
    }

    .password-toggle:focus-visible {
        outline: 2px solid #627aff;
        outline-offset: 1px;
    }

.password-match-status {
    min-height: 22px;
    margin-top: 8px;
    font-size: 0.88rem;
    font-weight: 500;
}

.password-match-valid {
    color: #27864b;
}

.password-match-invalid {
    color: #b53b3b;
}

.reset-button:disabled {
    background: #b7bec9;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
    filter: none;
}

.validation-summary-valid,
.field-validation-valid {
    display: none;
}