/* Login- og opret-siden (login.php). Flyttet ud af siden, så browseren og service workeren kan cache den. */
body {
    min-height: 100vh;
    background: var(--bg);
    font-family: var(--font-ui);
    color: var(--text);
}

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 6vw, 3.5rem) 1rem;
}

.auth-card {
    width: 100%;
    max-width: 480px;
    border-radius: 28px;
    border: none;
    background: var(--card-bg);
    box-shadow: 0 45px 85px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(14px);
    overflow: hidden;
}

.auth-card .card-body {
    padding: clamp(2.5rem, 6vw, 3.25rem);
}

.brand-logo {
    display: inline-block;
    width: 120px;
    height: auto;
    margin-bottom: 1.5rem;
}

.auth-title {
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--muted);
    font-weight: 500;
    margin-bottom: 2rem;
    white-space: pre-line;
}

.form-floating>.form-control, .form-floating>.form-select {
    border-radius: 14px;
    border-color: var(--border);
}

.form-floating>.form-control:focus {
    border-color: var(--link);
    box-shadow: 0 0 0 0.25rem rgba(99, 102, 241, 0.12);
}

.auth-submit {
    border-radius: 14px;
    font-weight: 600;
    padding-block: 0.85rem;
    background: var(--primary); /* FDF's primary blue */
    border: none;
    box-shadow: 0 18px 35px rgba(var(--primary-rgb), 0.32);
}

.auth-submit:hover {
    background: var(--primary-dark);
}

.passkey-or {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
    margin: 1.25rem 0 1rem;
}

.passkey-or::before,
.passkey-or::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.passkey-or span {
    padding: 0 0.75rem;
}

#passkeyLoginBtn {
    border-radius: 14px;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    border-color: var(--primary);
    color: var(--primary-text);
}

#passkeyLoginBtn:hover {
    background: var(--primary);
    color: var(--on-primary);
}

#passkeyLoginStatus:empty {
    display: none;
}

.auth-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 2.5rem;
}

.login-key-help {
    background: rgba(var(--primary-rgb), 0.08);
    border: 1px solid rgba(var(--primary-rgb), 0.22);
    border-radius: 14px;
    padding: 0.85rem 1rem;
    color: var(--text);
    font-size: 0.92rem;
    margin-bottom: 1rem;
}

.login-key-help strong {
    color: var(--primary-text);
}

.field-label-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    margin-bottom: 0.55rem;
    color: var(--text);
}

.field-label-inline .btn {
    --bs-btn-padding-y: 0;
    --bs-btn-padding-x: 0;
    --bs-btn-border-width: 0;
    color: var(--muted);
    line-height: 1;
}

.field-label-inline .btn:hover {
    color: var(--primary-text);
}

.auth-actions .btn {
    border-radius: 14px;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
}

.btn-outline-secondary {
    border-color: var(--border);
    color: var(--text);
}

.btn-outline-secondary:hover {
    background: var(--border);
    color: var(--text);
}

#signupFeedback {
    border-radius: 14px;
    font-weight: 500;
}

#addToHomeScreenBtn {
    border-radius: 14px;
    font-weight: 600;
    padding: 0.75rem;
    margin-top: 1rem;
}

.pw-strength-bar {
    height: 5px;
    border-radius: 999px;
    background: var(--border);
    overflow: hidden;
}
.pw-strength-fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    transition: background-color .25s;
}
.pw-strength-label { font-size: .8rem; }

.modal-content {
    border-radius: 24px;
    border: none;
    box-shadow: 0 28px 65px rgba(15, 23, 42, 0.18);
}

.modal-header {
    border-bottom: none;
}

.modal-title {
    font-weight: 600;
}

.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    margin-bottom: 1.75rem;
}

.step-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    color: var(--muted);
    font-weight: 600;
    min-width: 70px;
}

.step-dot .step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 2px solid currentColor;
    font-weight: 700;
}

.step-dot.active {
    color: var(--link);
}

.step-line {
    flex: 0 0 42px;
    height: 2px;
    background: linear-gradient(90deg, rgba(148, 163, 184, 0.45), rgba(148, 163, 184, 0.15));
}

.invalid-feedback {
    font-weight: 500;
}

.modal-footer {
    border-top: none;
}

.modal-footer .btn {
    border-radius: 12px;
    font-weight: 600;
}

.form-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 0.75rem;
}

.modal-body {
    padding: 2rem 2.25rem 2.25rem;
}

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

@media (max-width: 576px) {
    .auth-card {
        border-radius: 22px;
    }

    .modal-body {
        padding: 1.75rem;
    }
}
