/* Public auth family — mobile-first, used only on auth_enhanced screens */

.auth-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f7f8fa;
}

.auth-layout .auth-nav {
    flex-shrink: 0;
    border-bottom: 1px solid #dee2e6;
}

.auth-layout .auth-nav .container,
.auth-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding-top: 8px;
    padding-bottom: 8px;
}

.auth-layout .auth-nav .navbar-brand {
    min-width: 0;
    margin-right: 0;
}

.auth-nav-cta {
    flex-shrink: 0;
    min-height: 44px;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-page {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    padding: 16px 16px 24px;
}

.auth-page-inner {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    min-width: 0;
}

.auth-page-inner .alert {
    margin-bottom: 12px;
}

.auth-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    padding: 24px 16px;
    min-width: 0;
}

.auth-card h1,
.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 8px;
    color: #212529;
}

.auth-sub {
    color: #6c757d;
    margin: 0 0 20px;
    font-size: 0.95rem;
}

.auth-card .form-group {
    margin-bottom: 16px;
}

.auth-card .form-group label {
    font-weight: 500;
    margin-bottom: 6px;
}

.auth-card .form-control {
    min-height: 44px;
    min-width: 0;
}

.auth-card .form-control:focus {
    border-color: var(--brand-accent, #007bff);
    box-shadow: 0 0 0 0.2rem var(--brand-accent-soft, #e3f2fd);
}

.auth-password-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    margin-bottom: 6px;
}

.auth-password-row label {
    margin-bottom: 0;
}

.auth-forgot-link {
    flex-shrink: 0;
    font-size: 0.875rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.auth-password-field {
    display: flex;
    min-width: 0;
}

.auth-password-field .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    flex: 1 1 auto;
    min-width: 0;
}

.auth-password-toggle {
    flex-shrink: 0;
    min-width: 44px;
    min-height: 44px;
    border: 1px solid #ced4da;
    border-left: 0;
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
    background: #f8f9fa;
    color: #495057;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus {
    background: #e9ecef;
    color: #212529;
}

.auth-submit,
.auth-card .btn-primary.btn-block {
    min-height: 44px;
    width: 100%;
    font-weight: 600;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: #6c757d;
    font-size: 0.85rem;
    min-width: 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1 1 auto;
    height: 1px;
    background: #dee2e6;
    min-width: 0;
}

.auth-google {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    background: #fff;
    color: #212529;
    border: 1px solid #ced4da;
    font-weight: 500;
}

.auth-google:hover,
.auth-google:focus {
    background: #f8f9fa;
    color: #212529;
    text-decoration: none;
    border-color: #adb5bd;
}

.auth-google i {
    color: #ea4335;
}

.auth-facebook {
    margin-top: 8px;
}

.auth-facebook i {
    color: #1877f2;
}

.auth-switch {
    text-align: center;
    margin-top: 16px;
    font-size: 0.95rem;
}

.auth-reqs {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 0.85rem;
}

.auth-reqs ul {
    margin: 8px 0 0;
    padding-left: 0;
    list-style: none;
}

.auth-reqs li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 4px;
    min-width: 0;
}

.auth-legal {
    text-align: center;
    margin-top: 16px;
    font-size: 0.8rem;
    color: #6c757d;
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    margin: 0 0 16px;
    font-weight: 500;
    cursor: pointer;
}

.auth-remember input {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.auth-alt-stack {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-top: 16px;
    min-width: 0;
}

.auth-alt-stack form {
    margin: 0;
    min-width: 0;
}

.auth-text-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    padding: 8px 12px;
    border: 0;
    background: transparent;
    color: var(--brand-accent, #1877f2);
    font-weight: 500;
}

.auth-text-btn:hover,
.auth-text-btn:focus {
    color: var(--brand-accent-dark, #0056b3);
    text-decoration: underline;
}

.auth-passkey-error {
    color: #dc3545;
    font-size: 0.875rem;
    margin: 8px 0 0;
}

.auth-subhead {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 12px;
}

.auth-passkey-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.auth-passkey-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
    min-width: 0;
}

.auth-passkey-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.auth-passkey-meta span {
    color: #6c757d;
    font-size: 0.85rem;
}

.auth-passkey-remove {
    width: auto;
    align-self: flex-start;
}

.settings-auth-wrap {
    width: 100%;
    max-width: 400px;
    min-width: 0;
}

.settings-auth-wrap .auth-card {
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .auth-passkey-row {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.auth-footer {
    flex-shrink: 0;
    background: #fff !important;
    color: #6c757d !important;
    border-top: 1px solid #dee2e6;
    padding: 16px;
    margin-top: 0;
}

.auth-footer .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 16px;
    text-align: center;
}

.auth-footer a {
    color: #6c757d;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.auth-footer a:hover {
    color: var(--brand-accent, #007bff);
}

@media (min-width: 768px) {
    .auth-page {
        justify-content: center;
        padding: 32px 16px 40px;
    }

    .auth-card {
        padding: 32px 28px;
    }

    .auth-footer {
        padding: 12px 16px;
    }

    .auth-footer a {
        min-height: auto;
    }
}
