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

body {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 32px 20px;
    font-family: var(--tems-font-body, Arial, Helvetica, sans-serif);
    color: var(--ink);
    background:
        radial-gradient(ellipse at top left, color-mix(in srgb, var(--tems-color-blue) 12%, transparent), transparent 58%),
        radial-gradient(ellipse at bottom right, color-mix(in srgb, var(--tems-color-red) 8%, transparent), transparent 52%),
        var(--tems-background);
    line-height: 1.5;
}

.container {
    position: relative;
    width: 100%;
    max-width: 440px;
    padding: 32px;
    overflow: hidden;
    background: var(--tems-surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 22px 64px color-mix(in srgb, var(--tems-color-blue-dark) 10%, transparent);
}

.container::before {
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: linear-gradient(90deg, var(--red), var(--blue));
    content: "";
}

.auth-brand {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    border-radius: 4px;
    color: var(--blue-dark);
    font-size: 27px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.2;
    text-decoration: none;
}

.auth-brand small {
    padding: 6px 10px;
    border: 1px solid var(--tems-border);
    border-radius: 999px;
    background: var(--tems-surface-blue);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
}

.eyebrow {
    margin-bottom: 8px;
    color: var(--blue);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.container h1,
.container h2 {
    margin-bottom: 12px;
    font-size: 30px;
    line-height: 1.2;
    letter-spacing: -0.7px;
    overflow-wrap: anywhere;
}

.intro {
    margin-bottom: 26px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.65;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
}

input[type="email"],
input[type="password"],
input[type="text"] {
    width: 100%;
    min-height: 50px;
    padding: 13px 14px;
    border: 1px solid var(--tems-border-strong);
    border-radius: 12px;
    outline: none;
    background: var(--tems-surface-subtle);
    color: var(--ink);
    font: inherit;
    font-size: 16px;
    line-height: 1.4;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

input::placeholder {
    color: var(--tems-color-muted);
    opacity: 1;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus {
    border-color: var(--blue);
    background: var(--tems-surface);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--tems-color-blue) 13%, transparent);
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 76px;
}

button,
.primary-link {
    display: inline-flex;
    width: 100%;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    padding: 13px 18px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: var(--blue);
    color: var(--tems-color-on-brand);
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.18s ease, box-shadow 0.18s ease;
}

button:hover:not(:disabled),
.primary-link:hover {
    background: var(--blue-dark);
    box-shadow: 0 5px 16px color-mix(in srgb, var(--tems-color-blue) 18%, transparent);
}

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

.toggle-password {
    position: absolute;
    top: 50%;
    right: 4px;
    width: 64px;
    min-height: 44px;
    padding: 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--blue-dark);
    font-size: 13px;
    font-weight: 700;
    transform: translateY(-50%);
}

.toggle-password:hover:not(:disabled) {
    background: var(--tems-surface-blue);
    box-shadow: none;
}

.toggle-password:focus-visible {
    outline-offset: -3px;
}

.field-hint {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

button:disabled {
    background: var(--tems-disabled-bg);
    color: var(--tems-color-muted);
    cursor: not-allowed;
    box-shadow: none;
}

.message,
.reset-status {
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--tems-surface-blue);
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.reset-status h2 {
    margin-bottom: 8px;
    color: var(--ink);
    font-size: 20px;
    letter-spacing: -0.3px;
}

.reset-status p {
    margin-bottom: 16px;
}

.message.success,
.reset-status.success {
    border-color: var(--tems-success-border);
    background: var(--tems-success-bg);
    color: var(--tems-success-text);
}

.message.error,
.reset-status.error {
    border-color: var(--tems-danger-border);
    background: var(--tems-danger-bg);
    color: var(--tems-danger-text);
}

.back-link {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    margin-top: 18px;
    border-radius: 8px;
    color: var(--blue);
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.back-link:hover {
    color: var(--blue-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

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

    .container {
        padding: 28px 22px 22px;
        border-radius: 20px;
    }

    .container h1,
    .container h2 {
        font-size: 27px;
    }

    .reset-status h2 {
        font-size: 20px;
    }

    .auth-brand {
        margin-bottom: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
    }
}
