/* ============================================
   MODAL DE AUTENTICAÇÃO MODERNO
   BELMONTE DELIVERY
   ============================================ */

.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

.auth-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.auth-modal-container {
    position: relative;
    background: white;
    border-radius: 24px;
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.auth-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.auth-modal-close:hover {
    background: white;
    transform: rotate(90deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.auth-modal-close svg {
    width: 20px;
    height: 20px;
    color: #2c3e50;
}

.auth-modal-header {
    padding: 2.5rem 2rem 1.5rem;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
}

.auth-modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.auth-modal-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.auth-modal-header p {
    font-size: 0.95rem;
    opacity: 0.95;
    margin: 0;
}

.auth-modal-body {
    padding: 2rem;
    overflow-y: auto;
    max-height: calc(90vh - 200px);
}

.auth-modal-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e9ecef;
}

.auth-tab {
    flex: 1;
    padding: 1rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.auth-tab:hover {
    color: #3498db;
}

.auth-tab.active {
    color: #3498db;
    border-bottom-color: #3498db;
}

.auth-tab-content {
    display: none;
}

.auth-tab-content.active {
    display: block;
    animation: fadeInUp 0.3s ease-out;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.auth-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.auth-form-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-form-group label svg {
    width: 16px;
    height: 16px;
    color: #6c757d;
}

.auth-form-control {
    padding: 1rem 1.25rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #ffffff;
    color: #2c3e50;
    font-family: inherit;
    width: 100%;
}

.auth-form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
    transform: translateY(-1px);
}

.auth-form-control::placeholder {
    color: #adb5bd;
}

.auth-form-group small {
    color: #6c757d;
    font-size: 0.85rem;
    margin-top: -0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.auth-btn {
    width: 100%;
    padding: 1.125rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.auth-btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.auth-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.auth-btn-secondary {
    background: #f8f9fa;
    color: #2c3e50;
    border: 2px solid #e9ecef;
}

.auth-btn-secondary:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    transform: translateY(-2px);
}

.auth-btn svg {
    width: 20px;
    height: 20px;
}

.auth-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.auth-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.auth-alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    animation: slideDown 0.3s ease-out;
}

.auth-alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 4px solid #27ae60;
}

.auth-alert-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 4px solid #e74c3c;
}

.auth-alert svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.auth-link {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsividade */
@media (max-width: 768px) {
    .auth-modal-container {
        width: 95%;
        max-height: 95vh;
        border-radius: 16px;
    }
    
    .auth-modal-header {
        padding: 2rem 1.5rem 1.25rem;
    }
    
    .auth-modal-header h2 {
        font-size: 1.5rem;
    }
    
    .auth-modal-body {
        padding: 1.5rem;
    }
    
    .auth-form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .auth-modal-container {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .auth-modal-body {
        padding: 1rem;
        max-height: calc(100vh - 180px);
    }
    
    .auth-modal-tabs {
        margin-bottom: 1.5rem;
    }
    
    .auth-tab {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}

