/* Auth pages (login, register) */
.auth-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    background: radial-gradient(ellipse 100% 80% at 50% 0%, var(--green-50) 0%, transparent 55%);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    padding: 2.5rem;
}

.auth-card.wider {
    max-width: 440px;
}

.auth-card h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.auth-card .subtitle {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin-bottom: 1.75rem;
}

.auth-form .field {
    margin-bottom: 1.25rem;
}

.auth-form .field.smaller {
    margin-bottom: 1.1rem;
}

.auth-form .field-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.auth-form .field-checkbox input[type="checkbox"] {
    width: auto;
    margin-top: 0.25rem;
    cursor: pointer;
}

.auth-form .field-checkbox label {
    margin-bottom: 0;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.auth-form .field-checkbox label a {
    color: var(--green-600);
    text-decoration: none;
}

.auth-form .field-checkbox label a:hover {
    text-decoration: underline;
}

.auth-form .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.auth-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
}

.auth-form input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--green-500);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.auth-form .password-input {
    position: relative;
}

.auth-form .password-input input {
    padding-right: 3.25rem;
}

.auth-form .password-toggle {
    position: absolute;
    top: 50%;
    right: 0.55rem;
    width: 2.4rem;
    height: 2.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    cursor: pointer;
    transform: translateY(-50%);
    transition: color 0.2s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.auth-form .password-toggle:hover {
    color: var(--green-600);
    background: var(--green-50);
    border-color: var(--border);
}

.auth-form .password-toggle:focus-visible {
    outline: none;
    color: var(--green-600);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.16);
}

.auth-form .password-toggle svg {
    position: absolute;
    width: 1.25rem;
    height: 1.25rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.auth-form .password-toggle .icon-eye {
    opacity: 0;
    transform: scale(0.82) rotate(-10deg);
}

.auth-form .password-toggle .icon-eye-off {
    opacity: 1;
    transform: scale(1) rotate(0);
}

.auth-form .password-toggle.is-visible .icon-eye {
    opacity: 1;
    transform: scale(1) rotate(0);
}

.auth-form .password-toggle.is-visible .icon-eye-off {
    opacity: 0;
    transform: scale(0.82) rotate(10deg);
}

.auth-form .forgot-link {
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.auth-form .forgot-link a {
    color: var(--green-600);
    text-decoration: none;
}

.auth-form .forgot-link a:hover {
    text-decoration: underline;
}

.auth-form .errorlist {
    list-style: none;
    font-size: 0.8125rem;
    color: #b91c1c;
    margin-top: 0.375rem;
}

.auth-form .nonfield .errorlist {
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: #fef2f2;
    border-radius: var(--radius);
}

.auth-form .nonfield .errorlist.smaller {
    margin-bottom: 0.5rem;
}

.auth-form button[type="submit"] {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--on-primary);
    background: var(--green-500);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
    margin-top: 0.5rem;
}

.auth-form button[type="submit"].mt-more {
    margin-top: 0.75rem;
}

.auth-form button[type="submit"]:hover {
    background: var(--green-600);
    transform: translateY(-1px);
}

.auth-card .footer-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9375rem;
    color: var(--text-muted);
}

.auth-card .footer-link a {
    color: var(--green-600);
    font-weight: 500;
    text-decoration: none;
}

.auth-card .footer-link a:hover {
    text-decoration: underline;
}

.auth-card .verify-note {
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.auth-card .verify-note strong {
    color: var(--text);
}

.auth-form button[type="submit"].secondary {
    background: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28);
}

.auth-form button[type="submit"].secondary:hover:not(:disabled) {
    background: #1d4ed8;
}

.auth-form button[type="submit"]:disabled {
    background: #9ca3af;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 480px) {
    .auth-form .row {
        grid-template-columns: 1fr;
    }

    .auth-form .password-input input {
        padding-right: 3rem;
    }

    .auth-form .password-toggle {
        right: 0.45rem;
    }
}
