:root {
    --primary: #0275d8;
    --primary-dark: #025fae;
    --text: #17283d;
    --muted: #65758a;
    --border: #d7e0ea;
    --surface: #ffffff;
    --background: #f5f9fd;
    --danger: #a8252b;
    --success: #176e33;
}

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

html,
body {
    min-height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: var(--text);
    font-family: "Inter", Arial, sans-serif;
    background:
        radial-gradient(circle at 20% 15%, rgba(2, 117, 216, 0.10), transparent 30%),
        linear-gradient(135deg, #f4f9ff, #ffffff 52%, #f5f9fd);
}

.password-card {
    width: 100%;
    max-width: 520px;
    padding: 38px 42px 34px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(22, 38, 59, 0.10);
    border-radius: 18px;
    box-shadow: 0 20px 58px rgba(38, 64, 94, 0.13);
}

.password-card__icon {
    width: 62px;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    color: #ffffff;
    font-size: 25px;
    background: linear-gradient(135deg, #087bdd, #1764bd);
    border-radius: 18px;
    box-shadow: 0 12px 24px rgba(2, 117, 216, 0.22);
}

.password-card__eyebrow {
    margin-bottom: 7px;
    color: var(--primary);
    text-align: center;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.password-card h1 {
    margin-bottom: 12px;
    text-align: center;
    font-size: 27px;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.password-card__description {
    margin-bottom: 24px;
    color: var(--muted);
    text-align: center;
    font-size: 13px;
    line-height: 1.65;
}

.password-message {
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid;
    border-radius: 9px;
    font-size: 12px;
    line-height: 1.55;
}

.password-message--error {
    color: var(--danger);
    background: #fff0f1;
    border-color: #f3c2c5;
}

.password-message--success {
    color: var(--success);
    background: #e9f9ed;
    border-color: #bde8c8;
}

.field-label {
    display: block;
    margin: 0 0 7px;
    font-size: 12px;
    font-weight: 800;
}

.field-wrap {
    position: relative;
    margin-bottom: 17px;
}

.field-wrap > i {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 17px;
    pointer-events: none;
}

.field-wrap input {
    width: 100%;
    height: 51px;
    padding: 0 48px;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    border: 1.5px solid var(--border);
    border-radius: 9px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field-wrap input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(2, 117, 216, 0.11);
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 9px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    color: #49617a;
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.password-toggle:hover {
    color: var(--primary);
    background: #eaf4ff;
}

.password-rules {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px 16px;
    margin: -2px 0 20px;
    padding: 14px 15px 14px 32px;
    color: #758397;
    font-size: 11px;
    line-height: 1.35;
    background: #f7fafc;
    border: 1px solid #e4ebf2;
    border-radius: 9px;
}

.password-rules li.is-valid {
    color: var(--success);
    font-weight: 700;
}

.primary-button {
    width: 100%;
    height: 53px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    padding: 0 18px;
    color: #ffffff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    background: linear-gradient(135deg, #087bdd, #1764bd);
    border: 0;
    border-radius: 9px;
    box-shadow: 0 9px 18px rgba(2, 117, 216, 0.20);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-button i,
.primary-button span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.primary-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 23px rgba(2, 117, 216, 0.26);
}

.primary-button:disabled {
    cursor: wait;
    opacity: 0.72;
    transform: none;
}

.primary-button--link {
    margin-top: 4px;
}

.back-link {
    width: fit-content;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px auto 0;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.back-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

@media (max-width: 560px) {
    body {
        align-items: flex-start;
        padding: 14px;
    }

    .password-card {
        padding: 30px 22px 28px;
    }

    .password-card h1 {
        font-size: 23px;
    }

    .password-rules {
        grid-template-columns: 1fr;
    }
}
