:root {
    --bg: #f4f6fb;
    --card: #ffffff;
    --text: #1d2433;
    --muted: #667085;
    --brand: #1f2a44;
    --brand-hover: #16203a;
    --danger: #b42318;
    --border: #d0d5dd;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", "Helvetica Neue", sans-serif;
    background: radial-gradient(circle at 20% 20%, #e7ecfb 0%, var(--bg) 35%, #eef2f9 100%);
    min-height: 100vh;
    color: var(--text);
    display: grid;
    place-items: center;
    padding: 24px;
}

.card {
    width: 100%;
    max-width: 460px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
}

h1 {
    margin: 0 0 12px;
    text-align: center;
    font-size: 1.45rem;
}

p {
    margin: 0 0 20px;
    text-align: center;
    color: var(--muted);
    line-height: 1.45;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.92rem;
}

input[type="email"],
input[type="text"],
input[type="password"] {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 1rem;
    color: var(--text);
    background: #fff;
    appearance: none;
    -webkit-appearance: none;
}

.password-input-wrap {
    position: relative;
    margin-bottom: 12px;
}

.password-input-wrap input[type="password"],
.password-input-wrap input[type="text"] {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: #eef2f9;
    color: #1f2a44;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    margin-top: 0;
}

.password-toggle:focus {
    outline: 2px solid rgba(31, 42, 68, 0.25);
    outline-offset: 1px;
}

.password-toggle:hover {
    background: #e2e8f5;
}

.password-toggle svg {
    width: 16px;
    height: 16px;
}

.password-toggle .icon-eye-off {
    display: none;
}

.password-toggle.is-visible .icon-eye {
    display: none;
}

.password-toggle.is-visible .icon-eye-off {
    display: block;
}

input:focus {
    outline: 2px solid rgba(31, 42, 68, 0.2);
    border-color: var(--brand);
}

.field-errors {
    margin-top: 8px;
    margin-bottom: 8px;
    color: var(--danger);
    font-size: 0.88rem;
}

.field {
    margin-bottom: 14px;
}

.logo {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.logo img {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

.error-list {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fef3f2;
    color: var(--danger);
    border: 1px solid #fecdca;
    font-size: 0.9rem;
}

button {
    margin-top: 12px;
    width: 100%;
    border: 0;
    border-radius: 8px;
    background: var(--brand);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    padding: 11px 12px;
    cursor: pointer;
    transition: background 0.2s ease;
}

button:hover {
    background: var(--brand-hover);
}

.back-link,
.login-link {
    margin-top: 12px;
    text-align: center;
    font-size: 0.9rem;
}

.reset-link {
    margin-top: 12px;
    text-align: center;
    font-size: 0.9rem;
}

.action-button {
    display: inline-block;
    width: 100%;
    border: 0;
    border-radius: 8px;
    background: var(--brand);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    padding: 11px 12px;
    text-decoration: none;
    transition: background 0.2s ease;
    text-decoration: none;
}

.action-button:hover {
    background: var(--brand-hover);
    color: #fff;
    text-decoration: none;
}

.back-link a:not(.action-button),
.login-link a:not(.action-button) {
    color: var(--brand);
    text-decoration: none;
    font-weight: 600;
}

.reset-link a {
    color: var(--brand);
    text-decoration: none;
    font-weight: 600;
}

.back-link a:not(.action-button):hover,
.login-link a:not(.action-button):hover {
    text-decoration: underline;
}

.reset-link a:hover {
    text-decoration: underline;
}

.error-box {
    margin-bottom: 12px;
    padding: 10px;
    border: 1px solid #fecdca;
    background: #fef3f2;
    color: var(--danger);
    border-radius: 8px;
    font-size: 0.88rem;
}

.card p:last-of-type {
    margin-bottom: 0;
}

.auth-shell {
    width: 100%;
    max-width: 460px;
}

.page-footer {
    margin-top: 14px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--muted);
}

.page-footer a {
    color: inherit;
    text-decoration: none;
}

.page-footer a:hover {
    text-decoration: underline;
}

.footer-separator {
    margin: 0 0.45rem;
}
