@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
    --ink: #16263d;
    --muted: #697789;
    --brand: #0c6d73;
    --brand-dark: #07545a;
    --surface: #ffffff;
    --line: #d7e1e5;
    --focus: #f2a541;
}

* {
    box-sizing: border-box;
}

body {
    min-width: 320px;
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding: clamp(24px, 6vh, 72px) 24px;
    color: var(--ink);
    font-family: 'DM Sans', Arial, sans-serif;
    background:
        radial-gradient(circle at 8% 4%, rgba(77, 184, 180, .32), transparent 30rem),
        radial-gradient(circle at 96% 96%, rgba(244, 180, 89, .23), transparent 27rem),
        #eef5f5;
}

.container {
    width: min(100%, 460px);
    padding: 42px;
    background: var(--surface);
    border: 1px solid rgba(215, 225, 229, .85);
    border-radius: 20px;
    box-shadow: 0 22px 55px rgba(20, 54, 65, .16);
}

h2 {
    margin: 0 0 10px;
    color: var(--ink);
    font-size: clamp(1.7rem, 4vw, 2rem);
    line-height: 1.2;
    letter-spacing: -.035em;
}

.intro {
    margin: 0 0 28px;
    color: var(--muted);
    font-size: .96rem;
    line-height: 1.6;
}

form {
    display: grid;
    gap: 9px;
}

label {
    margin-top: 8px;
    color: var(--ink);
    font-size: .88rem;
    font-weight: 700;
}

input {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    color: var(--ink);
    font: inherit;
    background: #fbfdfd;
    border: 1px solid var(--line);
    border-radius: 10px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

input::placeholder {
    color: #97a5ae;
}

input:hover {
    border-color: #a9c0c4;
}

input:focus {
    background: #fff;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(12, 109, 115, .13);
}

.captcha-row {
    display: flex;
    justify-content: center;
}

.captcha-row img {
    display: block;
}

#captchaImage {
    width: 80%;
    height: 65px;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: 9px;
    cursor: pointer;
}

.captcha-note {
    color: var(--muted);
    font-size: .8rem;
    line-height: 1.35;
}

button {
    width: 100%;
    min-height: 50px;
    margin-top: 16px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    font: inherit;
    font-weight: 700;
    background: var(--brand);
    cursor: pointer;
    box-shadow: 0 8px 16px rgba(12, 109, 115, .2);
    transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}

button:hover {
    background: var(--brand-dark);
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
    box-shadow: none;
}

button:focus-visible,
a:focus-visible,
#captchaImage:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

#message {
    min-height: 1.25em;
    margin: 20px 0 0;
    color: var(--muted);
    font-size: .9rem;
    text-align: center;
}

.back-link {
    margin: 18px 0 0;
    text-align: center;
}

a {
    color: var(--brand);
    font-weight: 700;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
}

a:hover {
    color: var(--brand-dark);
}

@media (max-width: 500px) {
    body {
        padding: 16px;
    }

    .container {
        padding: 30px 24px;
        border-radius: 16px;
    }
}

/* A short landscape phone must always show the card from its top and remain scrollable. */
@media (max-height: 640px) {
    body {
        padding-block: 16px;
    }

    .container {
        padding-block: 26px;
    }

    .intro {
        margin-bottom: 18px;
    }

    button {
        margin-top: 10px;
    }
}
#captchaImage.disabled {
    pointer-events: none;
    cursor: not-allowed;
    opacity: 0.55;
}

#forgotPasswordForm :disabled {
    cursor: not-allowed;
    opacity: 0.65;
}