:root {
    --primary: #1357a6;
    --primary-dark: #0c4384;
    --primary-soft: #edf5ff;
    --text: #172033;
    --muted: #5f6b7a;
    --line: #dfe5ec;
    --surface: #ffffff;
    --background: #f4f7fb;
    --success: #17834a;
    --success-soft: #edf9f2;
    --error: #bc2f3b;
    --error-soft: #fff1f2;
    --shadow: 0 18px 50px rgba(24, 44, 76, 0.13);
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text);
    background: var(--background);
    -webkit-font-smoothing: antialiased;
}

button, a { font: inherit; }

.page-shell {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 32px 20px;
    isolation: isolate;
}

.background-shape {
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    filter: blur(2px);
    opacity: .55;
}

.background-shape--one {
    width: 430px;
    height: 430px;
    top: -230px;
    right: -120px;
    background: #dbeeff;
}

.background-shape--two {
    width: 360px;
    height: 360px;
    bottom: -220px;
    left: -130px;
    background: #e4eef9;
}

.reset-card {
    width: min(100%, 540px);
    background: var(--surface);
    border: 1px solid rgba(211, 220, 231, .9);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 38px 42px 24px;
    animation: card-in .4s ease-out both;
}

.brand-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-bottom: 28px;
    margin-bottom: 26px;
    border-bottom: 1px solid var(--line);
}

.brand-logo {
    display: block;
    width: 154px;
    height: auto;
}

.brand-name {
    color: var(--primary);
    font-size: 1.15rem;
    font-weight: 750;
    letter-spacing: .02em;
    line-height: 1.2;
}

.state-icon {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    margin: 0 auto 20px;
    border-radius: 50%;
}

.state-icon svg { width: 34px; height: 34px; fill: currentColor; }
.state-icon--primary { color: var(--primary); background: var(--primary-soft); }
.state-icon--success { color: var(--success); background: var(--success-soft); }
.state-icon--error { color: var(--error); background: var(--error-soft); font-size: 30px; font-weight: 700; }

.copy-block { text-align: center; }

.eyebrow {
    margin: 0 0 7px;
    color: var(--primary);
    font-size: .78rem;
    font-weight: 750;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.eyebrow--success { color: var(--success); }
.eyebrow--error { color: var(--error); }

h1 {
    margin: 0;
    font-size: clamp(1.65rem, 5vw, 2rem);
    line-height: 1.2;
    letter-spacing: -.025em;
}

.lead {
    margin: 14px auto 0;
    max-width: 430px;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.65;
}

.notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 26px 0 22px;
    padding: 15px 16px;
    color: #31445c;
    background: #f6f9fc;
    border: 1px solid #e0e8f1;
    border-left: 4px solid var(--primary);
    border-radius: 4px;
}
.notice svg { width: 21px; min-width: 21px; fill: var(--primary); margin-top: 1px; }
.notice p { margin: 0; font-size: .92rem; line-height: 1.5; }
.notice--success { background: var(--success-soft); border-color: #caead8; border-left-color: var(--success); }
.notice--success svg { fill: var(--success); }
.notice--error { background: var(--error-soft); border-color: #f0ccd0; border-left-color: var(--error); }
.notice--error svg { fill: var(--error); }

.action-form { margin-top: 20px; }

.primary-button,
.secondary-button {
    width: 100%;
    min-height: 50px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
    text-decoration: none;
    transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}

.primary-button {
    color: #fff;
    background: var(--primary);
    border: 1px solid var(--primary);
}
.primary-button:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.primary-button:active, .secondary-button:active { transform: translateY(1px); }
.primary-button:focus-visible, .secondary-button:focus-visible { outline: 3px solid rgba(19,87,166,.25); outline-offset: 3px; }
.primary-button:disabled { cursor: not-allowed; opacity: .78; }
.primary-button--link { margin-top: 24px; }

.secondary-button {
    color: var(--primary);
    background: #fff;
    border: 1px solid var(--primary);
}
.secondary-button:hover { color: #fff; background: var(--primary); }

.button-loading { display: none; align-items: center; gap: 10px; }
.is-loading .button-label { display: none; }
.is-loading .button-loading { display: inline-flex; }

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .75s linear infinite;
}
.secondary-button .spinner { border-color: rgba(19,87,166,.25); border-top-color: var(--primary); }
.secondary-button:hover .spinner { border-color: rgba(255,255,255,.4); border-top-color: #fff; }

.security-note {
    margin: 18px 10px 0;
    color: var(--muted);
    font-size: .82rem;
    line-height: 1.5;
    text-align: center;
}

.card-footer {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    color: #8490a0;
    font-size: .76rem;
    text-align: center;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes card-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 560px) {
    .page-shell { padding: 16px; align-items: center; }
    .reset-card { padding: 28px 22px 20px; border-radius: 6px; }
    .brand-header { padding-bottom: 22px; margin-bottom: 22px; }
    .brand-logo { width: 138px; }
    .state-icon { width: 58px; height: 58px; }
    .lead { font-size: .95rem; }
    .notice { padding: 13px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
