.auth-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.auth-card-header {
    background: linear-gradient(135deg, var(--traffic-blue) 0%, var(--traffic-blue-dark) 100%);
    color: var(--comp-blue);
    text-align: center;
    padding: 28px 32px 22px;
}

.auth-card-header h1 {
    margin: 0 0 6px 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: inherit;
}

.auth-card-header p {
    margin: 0;
    color: inherit;
    font-size: 0.95rem;
    opacity: 0.85;
}

.auth-card .auth-error {
    margin: 0 32px;
    margin-top: 20px;
}

.auth-card .auth-form {
    padding: 24px 32px 32px;
}

.auth-form {
    display: grid;
    gap: 16px;
}

.auth-form label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
    display: block;
    margin-bottom: 6px;
}

.auth-form input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text-dark);
    font-size: 0.95rem;
    font-family: var(--font-body);
    transition: border-color 0.2s;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 4px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 0;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.password-toggle:hover {
    color: var(--text-dark);
    background: rgba(0, 0, 0, 0.05);
}

.password-toggle:focus-visible {
    outline: 2px solid var(--traffic-blue);
    outline-offset: 2px;
}

.password-toggle svg {
    width: 18px;
    height: 18px;
    display: block;
}

.password-toggle .password-toggle-slash {
    display: none;
}

.password-toggle.is-visible .password-toggle-slash {
    display: block;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--traffic-blue);
    box-shadow: 0 0 0 3px rgba(0, 0, 255, 0.08);
}

.auth-actions {
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-forgot-link {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}

.auth-forgot-link:hover {
    text-decoration: underline;
}

.auth-actions .btn {
    padding: 10px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
}

.auth-error {
    background: rgba(220, 38, 38, 0.1);
    color: var(--danger);
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.auth-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success, #059669);
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    margin: 20px 32px 0;
}

.auth-note {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Make the login page fill the viewport so footer stays visible at bottom */
body:has(.auth-container) .container {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 70px);
    padding-bottom: 0;
}

body:has(.auth-container) footer {
    margin-top: auto;
}
