/* Shared auth modal standard. Load after page styles. */
#loginModal.modal {
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(17, 24, 39, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

#loginModal .modal-content {
    width: min(390px, calc(100vw - 32px));
    max-width: 390px;
    height: auto;
    min-height: auto;
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 2.5rem;
    overflow-y: auto;
    overflow-x: hidden;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    animation: modalFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#loginModal .modal-content::-webkit-scrollbar {
    display: none;
}

#loginModal .close-button {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #f8f9fa;
    color: #6c757d;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
}

#loginModal .close-button:hover {
    background: #e9ecef;
    color: #212529;
    transform: rotate(90deg);
}

#loginModal .modal-content h2 {
    margin: 0 0 0.75rem;
    color: #1a1a1a;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    text-align: center;
}

#loginModal form {
    display: flex;
    flex-direction: column;
}

#loginModal .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    margin-bottom: 1rem;
}

#loginModal .form-group label {
    color: #374151;
    font-size: 0.825rem;
    font-weight: 600;
    line-height: 1.4;
}

#loginModal .form-group input {
    width: 100%;
    min-height: 42px;
    padding: 0.625rem 0.875rem;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    color: #1a1a1a;
    font-size: 0.9rem;
    line-height: 1.4;
    transition: all 0.2s ease;
}

#loginModal .form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

#loginModal button[type="submit"] {
    width: 100% !important;
    min-height: 44px;
    margin-top: 0.5rem !important;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
}

#loginModal p.mt-4,
#loginModal form > p {
    margin-top: 1rem;
    margin-bottom: 0;
    color: var(--muted-foreground, #6b7280);
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: center;
}

#loginModal p a {
    color: var(--primary);
    font-weight: 700;
}

@media (max-width: 576px) {
    #loginModal.modal {
        align-items: center;
        padding: 16px;
    }

    #loginModal .modal-content {
        width: calc(100vw - 32px);
        max-width: 390px;
        max-height: calc(100dvh - 32px);
        margin: auto;
        padding: 2rem 1.5rem;
    }
}
